發表文章

目前顯示的是有「ESP32」標籤的文章

Meshtastic LilyGo lora32 pins? which can be used, which is used on meshtastic

圖片
 The story of ESP32 pin are old, Andreas made few videos on it: 2017 esp32 review  with first table of pins. 2020  #363  Which ESP32 pins are safe to use? with another table esp32 lora heltec and lilygo pins are so so confusing: https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436 base on my ttgo lora32, I want to know what are lead out, what are used, and what left for me. I wish to add: GPS, serial button ( or if possible rotary encoder, need 3 GPIO), SD is not necessary. The closest data to my board is this one  it's called TTGO lora V2 Check pin used, I used TloraV2.1-1.6 with web flasher, check define on git variants/tlora_v2_1_16/variant.h it seems 35 is used as battery pin 21/22 are IIC SDA/SCL some are not clear, when checkin schematic , beside these questionale pins, it leave me few pins to use, seems fine, What I tested: 1. Add rotary: pin are connected as rotary A on GPIO15, rotary B on GOIP2 and rotary push on GPIO14, But th...

micropython on esp32 Part2: IDE

圖片
For the IDE, uPyCraft, you will need python 3.7, so go to their page and down load: The good thing is that in 3.7, the installer will add python path to PATH wait for the installation to complete Install uPyCraft IDE – Windows PC it could ask for update.. it seems uPyCraft can also burn uPy firmware on to ESP https://randomnerdtutorials.com/flash-upload-micropython-firmware-esp32-esp8266/ This is the article I refered to start with uPyCraft https://randomnerdtutorials.com/getting-started-micropython-esp32-esp8266/ I copy and past the LED code, the great thing is that you don't have to wait form the compiling time, just down load it and run... But there are chances that the communication with the board goes wrong, then you can always press STOP, or reset the board.

Micropython in esp32 part1: install firmware

圖片
The first trick is to install micropython firmware to esp32 in windows. you can find firmware for esp32 from here: http://micropython.org/download make sure you down load the right one, I down loaded the non spiram version, the standard one. Then, it comes to how to write firmware to board under windows. I have python 2.7 on my PC, so install esptool through pip seems easy. pip install esptool Then in the folder you put the downloaded firmware, esptool.exe  --chip esp32 --port COM26 write_flash -z 0x1000 esp32-20190113-v1.9.4.bin the it would do the trick...

2018/2/22..Webserver, EEPROM,SD on ESP..

Passing few days in Kaushong lib, I managed to get some very slow progress in my porgramming; 1. Webserver I have first took a example on esp32 with BME280, work note: http://ldsrc.blogspot.tw/2018/02/esp32-web-server-http-learning-with.html and fall into trouble with bme280 lib for esp32, since the adafruit lib is for it's own board, so there is no way to assigned IIC pins. With my heltec wemos esp32 boards, I do need this function to assigned the IIC pins to cowork with other device. After alomost one day of work, I found out that the example use an modified lib of adafruit for BME280, which is able to assign pins. As to web server, I have to attack the knowage of HTML from zero, there are several stuff on html, after some basic knowage, I took the lib from bbx10 to modify it, so that I can show data, base on some parameter to change the html page,get input (i.e. device_ID), and possible to save it to EEPROM. The web server lib is working on both 8266 and 32. the wifi lib...

LoraWan working example from network search : Single Channel Gateway using Heltec WiFi LoRa 32 OLED and code for device

圖片
Found this post, but their device is for 868Mhz... The description below is much clear then the wiki of the code V5 https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-1/10247/128 by  CurlyWurly 1) Single Channel Gateway using Heltec WiFi LoRa 32 (with OLED display) Thanks  @Kersing Got the single channel gateway working on my Heltec WiFi LoRa 32 (with OLED display) https://www.aliexpress.com/item/868MHz-915MHz-SX1276-ESP32-LoRa-0-96-Inch-OLED-Display-Bluetooth-WIFI-Lora-Kit-32-Module/32835492243.html?ws_ab_test=searchweb0_0,searchweb201602_1_10152_10065_10151_10344_10068_10130_10345_10324_10342_10547_10325_10343_10340_10341_10548_10192_10541_10190_10084_10083_10307_10301_10303_10539_10312_10059_10313_10314_10184_10534_100031_10604_10603_10103_10605_10594_10596_10142_10107,searchweb201603_25,ppcSwitch_5&algo_expid=2ba45802-8bfd-4728-b9ca-e592aea6c379-19&algo_pvid=2ba45802-8bfd-4728-b9ca-e592aea6c379&rmStoreLevelAB=5 Very nice Just...

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-S...