TTGO T-BEAM Installation using PlatformIO

Hi everyone,

I’ve bought a TTGO T-BEAM 868[MHz] board and I tried to flash the official GitHub code (GitHub - LilyGO/TTGO-T-Beam) on it using PlatformIO.

The TTGO T-BEAM is registred among the supported boards by PlatformIO and I downloaded the ESP-IDF framework as requested. What is the proper way to flash the code on the board ?
The GitHub code is made of .ino files so there is no main.cpp to build the code.

Did I miss something about .ino files in PlatformIO ? I get the following error when building :

Error: Nothing to build. Please put your source code files to ‘C:\Users\Francois\Desktop\TTGO-BEAM\src’ folder

Here is my platformio.ini :

[env:ttgo-t-beam]
platform = espressif32
board = ttgo-t-beam
framework = espidf
src_dir = Blink

Regards,

François

The firmware you linked uses arduino, not ESP-IDF. You can see that because it has setup() and loop() functions.

Place the .ino and .h files into the src/ folder. PIO should be able to build the INO file without modifications. Of course, you can manually convert it, too, as seen in the FAQ.

Hi,

Thanks for the quick answer, I’ve made the changes and the command ‘platformio run’ worked :

CONFIGURATION: Redirecting...
PLATFORM: Espressif 32 > TTGO T-Beam
HARDWARE: ESP32 240MHz 1.25MB RAM (4MB Flash)
DEBUG: CURRENT(esp-prog) EXTERNAL(esp-prog, iot
DEBUG: CURRENT(esp-prog) EXTERNAL(esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
Converting Blink.ino
LDF MODES: FINDER(chain) COMPATIBILITY(soft)
Collected 26 compatible libraries
Scanning dependencies…
No dependencies
Compiling .pioenvs\ttgo-t-beam\src\Blink.ino.cpp.o
Retrieving maximum program size .pioenvs\ttgo-t-beam\firmware.elf
Checking size .pioenvs\ttgo-t-beam\firmware.elf
Memory Usage → Redirecting...
DATA: [ ] 1.0% (used 13460 bytes from 1310720 bytes)
PROGRAM: [== ] 15.1% (used 198428 bytes from 1310720 bytes)

Do I consider the code has been uploaded on the TTGO TBEAM board already, or do I need to enter another command for this ? (I’m sorry if it’s an obvious question, I’m quite new to PlatformIO)

Regards,

François

You use it from the commandline, yes? Or from VSCode? Always refer to the documentation.

For the CLI, and for VSCode.

For the CLI, upload it by executing the upload target, i.e. run platformio run -t upload.

Yes, I do use the command line.

Thanks again for the help, much appreciated !