Wireless stick lite v3 and Platformio

“Hello, I’m new to these development boards. I’ve done my research to get the board working with the Arduino IDE, but I want to migrate to Visual Studio Code with PlatformIO. Based on what I’ve found, I can’t find information to help me achieve the same connectivity examples with PlatformIO. Can someone give me a hint on how to carry out the entire migration of this board with PlatformIO?”

I’m interested too. I love Platformio and VSC.
I’ll follow this topic. Thanks in advance to anyone who wants to replay.
According to my research there still is no full support for V3 boards:
https://docs.platformio.org/en/latest//boards/espressif32/heltec_wifi_lora_32_V3.html
Furthermore, I’m afraid there is not so easy to migrate from Arduino IDE. Compiling with Arduino IDE 2.3.2 I can see a lot of warning for duplicated declarations between all the libraries included, that this IDE accepts but I guess they are blocking in a less tolerant environment.

I’m looking for Wireless stick(V3)
https://docs.platformio.org/en/latest//boards/espressif32/heltec_wireless_stick.html

Just use RadioLib and get away from any Heltec provided code. The startup with be harder but your development will be a lot easier after your are over the learning curve. Another post on Radiolib and Wireless Stick V3 Wireless Stick Lite V3 w/ RadioLib

2 Likes

hi,

what info is that you want? for which format do you want to use this?

a custom lora packet tx and rx ?

My intention is to use this board with PlatformIO and take advantage of its programming features, in addition to using the library recommended by Heltec since it seems simple and functional to me. However, I can’t find a way to export everything to PlatformIO.

in platformio you can define all the pins to turn in on. Turn oled+TFT screens, init lora and wifi

I use Radiolib for lora and it runs very well (look for CA2RXU LoRa APRS iGate) :wink:

Perfect, I will read that information. Thank you for the help.Did you use RadioLib with the Heltec Wireless Stick Lite v3 on PlatformIO? If I have any question could you help me?,

; PlatformIO Project Configuration File
[env:heltec_wireless_stick_lite]
platform = espressif32
framework = arduino
board = heltec_wifi_lora_32_V3
monitor_speed = 115200
monitor_filters = time
lib_deps =
jgromes/RadioLib @ ^6.6.0

// Radio Lib version of Ping Pong. //https://github.com/jgromes/RadioLib/blob/bc36c1e98afdc5f05402d129a2dc54184b7db453/examples/SX126x/SX126x_PingPong/SX126x_PingPong.ino
#include <Arduino.h>
/*
RadioLib SX126x Ping-Pong Example
For default module settings, see the wiki page
https://github.com/jgromes/RadioLib/wiki/Default-configuration#sx126x---lora-modem
For full API reference, see the GitHub Pages
https://jgromes.github.io/RadioLib/
*/
// include the library
#include <RadioLib.h>
#define FREQUENCY 902.02 // for US
#define BANDWIDTH 125.0 // Allowed values are 7.8, 10.4, 15.6, 20.8, 31.25, 41.7, 62.5, 125.0, 250.0 and 500.0 kHz.
#define SPREADING_FACTOR 7 // Number from 5 to 12. Higher means slower but higher “processor gain”,
// uncomment the following only on one
// of the nodes to initiate the pings
// #define INITIATING_NODE
// Heltec Wireless Stick Lite V3 LoRa Radio pins
#define SS GPIO_NUM_8
#define DIO1 GPIO_NUM_14
#define RST_LoRa GPIO_NUM_12
#define BUSY_LoRa GPIO_NUM_13
SX1262 radio = new Module(SS, DIO1, RST_LoRa, BUSY_LoRa);
// or using RadioShield
// https://github.com/jgromes/RadioShield
// SX1262 radio = RadioShield.ModuleA;
// or using CubeCell
// SX1262 radio = new Module(RADIOLIB_BUILTIN_MODULE);
// save transmission states between loops
int transmissionState = RADIOLIB_ERR_NONE;
// flag to indicate transmission or reception state
bool transmitFlag = false;
// flag to indicate that a packet was sent or received
volatile bool operationDone = false;
// this function is called when a complete packet
// is transmitted or received by the module
// IMPORTANT: this function MUST be ‘void’ type
// and MUST NOT have any arguments!
#if defined(ESP8266) || defined(ESP32)
ICACHE_RAM_ATTR
#endif
void setFlag(void)
{
// we sent or received a packet, set the flag
operationDone = true;
}
void setup()
{
Serial.begin(115200);
delay(5000);
// initialize SX1262 with default settings
Serial.print(F("[SX1262] Initializing … “));
int state = radio.begin();
if (state == RADIOLIB_ERR_NONE)
{
Serial.println(F(“success!”));
}
else
{
Serial.print(F(“failed, code “));
Serial.println(state);
while (true)
;
}
// set the function that will be called
// when new packet is received
radio.setDio1Action(setFlag);
radio.setFrequency(FREQUENCY);
radio.setBandwidth(BANDWIDTH);
radio.setSpreadingFactor(SPREADING_FACTOR);
#if defined(INITIATING_NODE)
// send the first packet on this node
Serial.print(F(”[SX1262] Sending first packet … “));
transmissionState = radio.startTransmit(“Hello World!”);
transmitFlag = true;
#else
// start listening for LoRa packets on this node
Serial.print(F(”[SX1262] Starting to listen … “));
state = radio.startReceive();
if (state == RADIOLIB_ERR_NONE)
{
Serial.println(F(“success!”));
}
else
{
Serial.print(F(“failed, code “));
Serial.println(state);
while (true)
;
}
#endif
}
void loop()
{
// check if the previous operation finished
if (operationDone)
{
// reset flag
operationDone = false;
if (transmitFlag)
{
// the previous operation was transmission, listen for response
// print the result
if (transmissionState == RADIOLIB_ERR_NONE)
{
// packet was successfully sent
Serial.println(F(“transmission finished!”));
}
else
{
Serial.print(F(“failed, code “));
Serial.println(transmissionState);
}
// listen for response
radio.startReceive();
transmitFlag = false;
}
else
{
// the previous operation was reception
// print data and send another packet
String str;
int state = radio.readData(str);
if (state == RADIOLIB_ERR_NONE)
{
// packet was successfully received
Serial.println(F(”[SX1262] Received packet!”));
// print data of the packet
Serial.print(F(”[SX1262] Data:\t\t”));
Serial.println(str);
// print RSSI (Received Signal Strength Indicator)
Serial.print(F(”[SX1262] RSSI:\t\t”));
Serial.print(radio.getRSSI());
Serial.println(F(” dBm"));
// print SNR (Signal-to-Noise Ratio)
Serial.print(F("[SX1262] SNR:\t\t"));
Serial.print(radio.getSNR());
Serial.println(F(" dB"));
}
// wait a second before transmitting again
delay(1000);
// send another one
Serial.print(F("[SX1262] Sending another packet … "));
transmissionState = radio.startTransmit(“Hello World!”);
transmitFlag = true;
}
}
}

sure!

Radiolib 6.6.0 works right away