Update examples
This commit is contained in:
parent
9cce0266b1
commit
fc1ed63c29
9 changed files with 596 additions and 482 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -6,4 +6,5 @@
|
||||||
.vscode
|
.vscode
|
||||||
test
|
test
|
||||||
.gitignore
|
.gitignore
|
||||||
.travis.yml
|
.travis.yml
|
||||||
|
lib
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
TTGO-T-Beam
|
TTGO-T-Beam
|
||||||
=====================
|
=====================
|
||||||
|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
|
|
@ -12,7 +11,9 @@ TTGO-T-Beam
|
||||||
| LORA_MISO | 19 | 19 |
|
| LORA_MISO | 19 | 19 |
|
||||||
| LORA_MOSI | 27 | 27 |
|
| LORA_MOSI | 27 | 27 |
|
||||||
| LORA_SS | 18 | 18 |
|
| LORA_SS | 18 | 18 |
|
||||||
| LORA_DI0 | 26 | 26 |
|
| LORA_DIO0 | 26 | 26 |
|
||||||
|
| LORA_DIO1 | 33 | 33 |
|
||||||
|
| LORA_DIO2 | 32 | 32 |
|
||||||
| LORA_RST | 23 | 23 |
|
| LORA_RST | 23 | 23 |
|
||||||
| GPS_RX_PIN | 34 | 12 |
|
| GPS_RX_PIN | 34 | 12 |
|
||||||
| GPS_TX_PIN | 12 | 15 |
|
| GPS_TX_PIN | 12 | 15 |
|
||||||
|
|
@ -37,7 +38,7 @@ TTGO-T-Beam
|
||||||
|
|
||||||
|
|
||||||
## Button Function:
|
## Button Function:
|
||||||
- Click button 2 will cycle the motherboard function, the default start to enable GPS positioning, the second click will be set to lora send, the third click will be set to lora receive, long press for two seconds and then release, will enter deep sleep
|
- Click button 2 will cycle the user function, the default start to enable GPS positioning, the second click will be set to lora send, the third click will be set to lora receive, long press for two seconds and then release, will enter deep sleep
|
||||||
|
|
||||||
## About OLED:
|
## About OLED:
|
||||||
- The boot will scan the I2C device. If the OLED is found, all log information will be displayed in the OLED. If not, it will be printed on the serial port.
|
- The boot will scan the I2C device. If the OLED is found, all log information will be displayed in the OLED. If not, it will be printed on the serial port.
|
||||||
|
|
|
||||||
BIN
image/deepsleep.jpg
Normal file
BIN
image/deepsleep.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 64 KiB |
BIN
image/product.jpg
Normal file
BIN
image/product.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 66 KiB |
|
|
@ -13,10 +13,8 @@ platform = espressif32
|
||||||
board = esp32dev
|
board = esp32dev
|
||||||
framework = arduino
|
framework = arduino
|
||||||
|
|
||||||
upload_port = COM11
|
upload_port = COM26
|
||||||
monitor_port = COM11
|
monitor_port = COM26
|
||||||
; upload_port = COM8
|
|
||||||
; monitor_port = COM8
|
|
||||||
|
|
||||||
monitor_speed = 115200
|
monitor_speed = 115200
|
||||||
upload_speed = 2000000
|
upload_speed = 2000000
|
||||||
|
|
@ -26,7 +24,7 @@ lib_deps =
|
||||||
AXP202X_Library ;https://github.com/lewisxhe/AXP202X_Library
|
AXP202X_Library ;https://github.com/lewisxhe/AXP202X_Library
|
||||||
TinyGPSPlus ;https://github.com/mikalhart/TinyGPSPlus
|
TinyGPSPlus ;https://github.com/mikalhart/TinyGPSPlus
|
||||||
ESP8266_SSD1306 ;https://github.com/ThingPulse/esp8266-oled-ssd1306
|
ESP8266_SSD1306 ;https://github.com/ThingPulse/esp8266-oled-ssd1306
|
||||||
LoRa ;https://github.com/dragino/Lora
|
RadioLib ;https://github.com/jgromes/RadioLib
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
BIN
schematic/T_BeamV1.0.pdf
Normal file
BIN
schematic/T_BeamV1.0.pdf
Normal file
Binary file not shown.
File diff suppressed because it is too large
Load diff
|
|
@ -1,3 +1,7 @@
|
||||||
|
/*
|
||||||
|
* This factory is just to test LilyGo T-Beam series hardware
|
||||||
|
* Created by Lewis he
|
||||||
|
* */
|
||||||
#ifndef BOARD_DEF_H
|
#ifndef BOARD_DEF_H
|
||||||
#define BOARD_DEF_H
|
#define BOARD_DEF_H
|
||||||
|
|
||||||
|
|
@ -8,8 +12,7 @@
|
||||||
#define ENABLE_GPS
|
#define ENABLE_GPS
|
||||||
#define ENABLE_LOAR
|
#define ENABLE_LOAR
|
||||||
|
|
||||||
|
#define SSD1306_ADDRESS 0x3C
|
||||||
#define SSD1306_ADDRESS 0x3c
|
|
||||||
#ifdef ENABLE_SSD1306
|
#ifdef ENABLE_SSD1306
|
||||||
#include "SSD1306.h"
|
#include "SSD1306.h"
|
||||||
#include "OLEDDisplayUi.h"
|
#include "OLEDDisplayUi.h"
|
||||||
|
|
@ -20,20 +23,38 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ENABLE_LOAR
|
#ifdef ENABLE_LOAR
|
||||||
#include <LoRa.h>
|
#include <RadioLib.h>
|
||||||
|
|
||||||
#define LORA_PERIOD 868
|
/*
|
||||||
|
Replace the model according to the actual situation
|
||||||
|
|
||||||
|
RADIO_TYPE option:
|
||||||
|
- SX1278
|
||||||
|
- SX1276
|
||||||
|
- SX1262
|
||||||
|
*/
|
||||||
|
#define RADIO_TYPE SX1262
|
||||||
|
|
||||||
|
/*
|
||||||
|
Fill in the frequency according to the actual situation
|
||||||
|
LORA_PERIOD option:
|
||||||
|
- 433,470,868,915
|
||||||
|
*/
|
||||||
|
#define LORA_PERIOD 915
|
||||||
|
|
||||||
|
|
||||||
|
#define LORA_SCK 5
|
||||||
|
#define LORA_MISO 19
|
||||||
|
#define LORA_MOSI 27
|
||||||
|
#define LORA_SS 18
|
||||||
|
#define LORA_DI0 26
|
||||||
|
#define LORA_RST 23
|
||||||
|
#define LORA_DIO1 33
|
||||||
|
#define LORA_BUSY 32
|
||||||
|
|
||||||
#define LORA_SCK 5
|
|
||||||
#define LORA_MISO 19
|
|
||||||
#define LORA_MOSI 27
|
|
||||||
#define LORA_SS 18
|
|
||||||
#define LORA_DI0 26
|
|
||||||
#define LORA_RST 23
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//GPS模块
|
|
||||||
#ifdef ENABLE_GPS
|
#ifdef ENABLE_GPS
|
||||||
#include <TinyGPS++.h>
|
#include <TinyGPS++.h>
|
||||||
#define UBLOX_GPS_OBJECT() TinyGPSPlus gps
|
#define UBLOX_GPS_OBJECT() TinyGPSPlus gps
|
||||||
|
|
@ -57,13 +78,15 @@ UBLOX_GPS_OBJECT()
|
||||||
|
|
||||||
#ifdef ENABLE_LOAR
|
#ifdef ENABLE_LOAR
|
||||||
#if LORA_PERIOD == 433
|
#if LORA_PERIOD == 433
|
||||||
#define BAND 433E6
|
#define BAND 433.0
|
||||||
#elif LORA_PERIOD == 868
|
#elif LORA_PERIOD == 868
|
||||||
#define BAND 868E6
|
#define BAND 868.0
|
||||||
#elif LORA_PERIOD == 915
|
#elif LORA_PERIOD == 915
|
||||||
#define BAND 915E6
|
#define BAND 915.0
|
||||||
|
#elif LORA_PERIOD == 470
|
||||||
|
#define BAND 470.0
|
||||||
#else
|
#else
|
||||||
#define BAND 433E6
|
#define BAND 433.0
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -71,8 +94,6 @@ UBLOX_GPS_OBJECT()
|
||||||
#define I2C_SDA 21
|
#define I2C_SDA 21
|
||||||
#define I2C_SCL 22
|
#define I2C_SCL 22
|
||||||
#define PMU_IRQ 35
|
#define PMU_IRQ 35
|
||||||
#define GPS_POWER_CTRL_CH 3
|
|
||||||
#define LORA_POWER_CTRL_CH 2
|
|
||||||
|
|
||||||
#define ENABLE_BUZZER
|
#define ENABLE_BUZZER
|
||||||
#define BUZZER_PIN 4
|
#define BUZZER_PIN 4
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue