LilyGO / LORA-ESP32-OLED

LORA-ESP32-OLED
27 stars 12 forks source link

How can I get the sketch going that came with my TTDO LoRa oled esp32? #2

Open bootrino opened 6 years ago

bootrino commented 6 years ago

I got this device:

https://www.aliexpress.com/item/1-Pcs-TTGO-LORA32-V2-0-433-868Mhz-ESP32-LoRa-OLED-0-96-Inch-Blue-Display/32847499968.html?spm=a2g0s.9042311.0.0.MnBocO

It came installed with a program that sent LoRa packets and displayed on the oled display what it was doing.

Despite downloading and installing and reinstalling a vast array of libraries and examples and sketches, I don't seem to be able to find where the source code is for the original program, or how to install it via Arduino. Can anyone point me in the right direction please?

boydsta commented 6 years ago

I had the same issue, I used this https://github.com/sandeepmistry/arduino-LoRa You will need to set the correct band (frequency) for your device

LoRa.begin(frequency); frequency - frequency in Hz (433E6, 866E6, 915E6)

all commands here https://github.com/sandeepmistry/arduino-LoRa/blob/master/API.md

I haven't done anything further other than getting the sender receiver sketch to work.

bootrino commented 6 years ago

I worked it out with the help of the comment below from tobozo user on Reddit.

To recompile lora oled code on OSX:

Put the sketch source from here https://github.com/LilyGO/TTGO-LORA32-V2.0 and put it somewhere on your disk (your source code directory for development files):

Unzip the libraries zipfile from here: https://github.com/LilyGO/LORA-ESP32-OLED.git

Into the top level of this directory: ~/Documents/Arduino/libraries

Load the sketch source via the Arduino IDE.

Recompile the sketch and run - should now display "Sending packet X...." on the oled display

proempiet commented 6 years ago

Got a headache but this thread point me in the right direction.

At first it did not work because I unziped the zip I got in step 2 (the libraries step) directly in "C:\Users\username\Documents\Arduino\libraries" Then I unziped the three zip files in this zip to there own directory but then you get three directory with the names: C:\Users\username\Documents\Arduino\libraries\libraries C:\Users\username\Documents\Arduino\libraries\lora C:\Users\username\Documents\Arduino\libraries\PhotoRec But this is not the right way and then you get errors in the IDE complaining that the libraries are not OK The error is "Invalid library found in C:\Users..........."

But when you extract the zip files directly to the directory "C:\Users\username\Documents\Arduino\libraries" it works like an charm.

Then you will get an structure with: C:\Users\username\Documents\Arduino\libraries\ESP32 C:\Users\username\Documents\Arduino\libraries\lora C:\Users\username\Documents\Arduino\libraries\OLED etc, etc

Then you should be able to Verify/Compile your Sketch