PlatformIO Community

Platformio and telegram bot


#1

I have very strange situation. I wrote for nodemcu 1.0 (telegram bot) and compiled and uploaded it with arduino ide. And it works perfectly.
After I installed visual studio code and PlatformIO with the same versions of libraries. Code was successfully compiled and uploaded into the same board. But it doesn’t work.
In serial monitor I can see that Bboard connect to my Wi-Fi spot, but it seems that bot doesn’t receive any messages.
Any ideas?


#2

Without knowing your exact code, platformio.ini and the library and Arduino versions used previously, it’s hard to solve the problem.


#3

https://pastebin.com/Jd3Ly0ce here is the code
Arduino IDE version : 1.8.5
VSCode version: 1.31.1

Libraries versions:
UniversalTelegramBot : 1.1.0
ArduinoJson : 5.13.1
Adafruit BME280 Library : 1.0.8
Adafruit Unified Sensor: 1.0.2

platformio.ini

[env:nodemcuv2]
platform = espressif8266
board = nodemcuv2
framework = arduino
lib_extra_dirs = C:\Users\Slip.platformio\lib
monitor_speed = 115200
upload_speed = 115200
upload_port = COM3


#4

In your Arduino IDE, what’s the version of the ESP8266 platform package?


#5

I don’t know.
How can I check it?


#6

Seems like your problem is known here: https://github.com/witnessmenow/Universal-Arduino-Telegram-Bot/issues/104

They say you need Arduino core 2.4. You can get that by going into your platformio.ini and stating

platform = espressif8266@1.8.0 

#7

In your Arduino IDE, ‘Tools -> Board -> Boards Manager’, there should be ESP8266 with a version string.


#8

Yes. Version of esp8266 core in ArduinoIDE is 2.4.2

Will try to recomplie with platform = espressif8266@1.8.0

Thanks a lot!


#9

Thank you so much!
Everything works!
Now I can uninstall Arduino IDE )))


#10

Cool :slight_smile: remember to have look at https://github.com/platformio/platform-espressif8266/releases and https://github.com/witnessmenow/Universal-Arduino-Telegram-Bot/issues/104 so that you can use the latest Arduino core releases once the library is fixed :+1: