Heltec ESP32+OLED+Lora, hardware testing
you can easily find some good boards from china, but most of them lack of accurate document...
Hrere is an example;
https://hackaday.io/project/26991-esp32-board-wifi-lora-32
the board looks good with lora and a 128x64 OLED, but the IIC and reset connection is important, since pin can be muxing easily, so every board could be different.
pinMode(16,OUTPUT);
digitalWrite(16, LOW); // set GPIO16 low to reset OLED
delay(50);
digitalWrite(16, HIGH); // while OLED is running, must set GPIO16 to high
and, if needed, edit your Wire.begin() to Wire.begin(4,15); (4 = SDA 15 SCL)
i tested it with the Adafruit SSD1306 and the Acrobotics SSD1306 Librarys
both work.
Display size is 128x64
There are discussions on these boards on TTN as a LORA node..or maybee single ch gateway?
Heltec has a git : https://github.com/Heltec-Aaron-Lee
And there is another copy call TTGO
https://de.aliexpress.com/item/TTGO-LORA32-868-915-Mhz-SX1276-ESP32-Oled-display-Bluetooth-WIFI-Lora/32840222847.html
Compare to the board I was using from wemos, heltec seems to have a better pin out...
Topic | WEMOS OLED with GPS | Heltec OLED+Lora | |
Link | https://github.com/Ldsrc2008/AIS-encode-arduino | ||
# PINS | 18 | ||
Pin Label Top | X | ||
Pin Label Bottom | |||
EN Button | X | ||
BOOT Button | X | ||
Battery | |||
Breadboard friendly | |||
Battery Mgmt | |||
GPIO00 | bootmode | X | X |
GPIO01 | TXD0 touch1 | X | X |
GPIO02 | GPIO2 must also be either left unconnected/floating, or driven Low, in order to enter the serial bootloader | X | |
GPIO03 | RXD0 | X | X |
GPIO04 | IIC SCL, touch0 | IIC SCL OLED | OLED_SDA |
GPIO05 | IIC SDA | IIC SDA OLED | LORA_SCK |
GPIO06 | SCK/CLK* | X | |
GPIO07 | SDO/SD0* | X | |
GPIO08 | SDI/SD1* | X | |
GPIO09 | SHD/SD2* | ||
GPIO10 | SWP/SD3* | ||
GPIO11 | SCS/CMD* | X | |
GPIO12 | Internal flash stuff, touch5 | X | X |
GPIO13 | RX1 | X | |
GPIO14 | touch6 | LORA_RST | |
GPIO15 | boot message,touch3 | OLED_SCL | |
GPIO16 | TX1 | OLED_RST | |
GPIO17 | X | ||
GPIO18 | LORA_CS | ||
GPIO19 | LORA_MISO | ||
GPIO21 | X | ||
GPIO22 | X | ||
GPIO23 | X | ||
GPIO25 | Rx2 | X | |
GPIO26 | TX2 | LORA_IRQ | |
GPIO27 | touch7 | LORA_MOSI | |
GPIO32 | touch9 | X | |
GPIO33 | touch8 | X | |
GPIO34 | X | ||
GPIO35 | X | ||
GPIO36 | SENSOR_VP | X | X |
GPIO37 | X | ||
GPIO38 | X | ||
GPIO39 | SENSOR_VN | X | X |
3.3v | 2 | ||
5v | 2 | ||
Vin/Vcc | |||
GND | 3 | ||
RST | |||
EN | |||
BATT | |||
NC |
The goods are finally here, I was thinking they were using module, but Heltec mount all the chips on one PCB....For cost down I guess....
the little copper coil is for wifi or BT...
There is a PCB printed antenna on board, but they did not use it...
maybe there is some thing wrong with the PCB antenna
there is a battery connector on it, need to find out if there is a charging IC??
you can see the lora chip is under the OLED
I read a test from here:
it leads to here https://www.alictronix.com/archives/860
the code use SSD1306 lib, but the code is on the web page, you need to check the "", since my arduino did not accept the word type, so need to change it. and you also need to have arduino lora lib.
#include “SSD1306.h”<===check this and all other serial print...
there is another example:
https://robotzero.one/heltec-wifi-lora-32/
this one using u8x8 lib for OLED.....which I did not use...
but robotzone has more clear note on the code and pin out...
https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic/10247/40
this post give me a lot of information:
such as this board use MCP73831 lipo charger, and the battery connector is a micro JST 1.25mm.
For the internal connection with lora chip, according to this:
// GPIO5 -- SX1278's SCK // GPIO19 -- SX1278's MISO // GPIO27 -- SX1278's MOSI // GPIO18 -- SX1278's CS // GPIO14 -- SX1278's RESET // GPIO26 -- SX1278's IRQ(Interrupt Request)
To get TTN work on this board:
https://github.com/matthijskooijman/arduino-lmic
discussion:
https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic/10247/31
Single Channel Gateway part 2
it's actually using https://github.com/kersing/ESP-1ch-Gateway-v5.0 for ESP32 and 8266, but when compiling I got an error on wpa.h....no idea where should I find it.....
留言
張貼留言