feat(wemos32oled): Added support for Wemos32 OLED board

This commit adds support for what I call the 'Wemos32 OLED' board.
It's a Wemos branded board, however it does not appear on Wemos'
website.
This commit is contained in:
Alex Goris 2019-05-06 14:04:46 +02:00
parent 0060b101df
commit 13f89a45e5
2 changed files with 61 additions and 0 deletions

View File

@ -24,6 +24,7 @@ env_default = generic
;env_default = lolin32litelora ;env_default = lolin32litelora
;env_default = lolin32lora ;env_default = lolin32lora
;env_default = lolin32lite ;env_default = lolin32lite
;env_default = wemos32oled
;env_default = octopus32 ;env_default = octopus32
;env_default = ecopower, eboxtube, heltec, ttgobeam, lopy4, lopy, ttgov21old, ttgov21new, ttgofox ;env_default = ecopower, eboxtube, heltec, ttgobeam, lopy4, lopy, ttgov21old, ttgov21new, ttgofox
; ;
@ -360,6 +361,21 @@ upload_protocol = ${common.upload_protocol}
extra_scripts = ${common.extra_scripts} extra_scripts = ${common.extra_scripts}
monitor_speed = ${common.monitor_speed} monitor_speed = ${common.monitor_speed}
[env:wemos32oled]
platform = ${common.platform_espressif32}
framework = arduino
board = lolin32
board_build.partitions = ${common.board_build.partitions}
upload_speed = 921600
lib_deps =
${common.lib_deps_basic}
${common.lib_deps_display}
build_flags =
${common.build_flags_all}
upload_protocol = ${common.upload_protocol}
extra_scripts = ${common.extra_scripts}
monitor_speed = ${common.monitor_speed}
[env:octopus32] [env:octopus32]
platform = ${common.platform_espressif32} platform = ${common.platform_espressif32}
framework = arduino framework = arduino

45
src/hal/wemos32oled.h Normal file
View File

@ -0,0 +1,45 @@
// clang-format off
#ifndef _WEMOS32OLED_H
#define _WEMOS32OLED_H
#include <stdint.h>
// Hardware related definitions for TTGO T-Beam board
// (only) for older T-Beam version T22_V05 eternal wiring LORA_IO1 to GPIO33 is needed!
//
// pinouts taken from http://tinymicros.com/wiki/TTGO_T-Beam
#define HAS_LED NOT_A_PIN // no LED
//#define HAS_LORA 1 // comment out if device shall not send data via LoRa
//#define CFG_sx1276_radio 1 // HPD13A LoRa SoC
//#define BOARD_HAS_PSRAM // use extra 4MB external RAM
//#define HAS_BUTTON GPIO_NUM_39 // on board button (next to reset)
//#define BAT_MEASURE_ADC ADC1_GPIO35_CHANNEL // battery probe GPIO pin -> ADC1_CHANNEL_7
//#define BAT_VOLTAGE_DIVIDER 2 // voltage divider 100k/100k on board
// GPS settings
//#define HAS_GPS 1 // use on board GPS
//#define GPS_SERIAL 9600, SERIAL_8N1, GPIO_NUM_12, GPIO_NUM_15 // UBlox NEO 6M
//#define GPS_INT GPIO_NUM_34 // 30ns accurary timepulse, to be external wired on pcb: NEO 6M Pin#3 -> GPIO34
// enable only if device has these sensors, otherwise comment these lines
// BME680 sensor on I2C bus
//#define HAS_BME 1 // Enable BME sensors in general
//#define HAS_BME680 SDA, SCL
//#define BME680_ADDR BME680_I2C_ADDR_PRIMARY // !! connect SDIO of BME680 to GND !!
// display (if connected)
#define HAS_DISPLAY U8X8_SSD1306_128X64_NONAME_HW_I2C
#define MY_OLED_SDA (5)
#define MY_OLED_SCL (4)
#define MY_OLED_RST U8X8_PIN_NONE
#define DISPLAY_FLIP 1 // use if display is rotated
// user defined sensors (if connected)
//#define HAS_SENSORS 1 // comment out if device has user defined sensors
//#define DISABLE_BROWNOUT 1 // comment out if you want to keep brownout feature
#endif