How to upload Arduino sketch from AI2 via BLE

Hello there, I'm looking to implement firmware upload for Arduino device in my app. I already do bidirectional communication with the Arduino. Anyone can help me? Regards


You essentially want to do what? Change the Arduino program by sending a Sketch?
I could be wrong but I don’t think App Inventor can do it… though you might be able to create a boot loader via the Arduino IDE and use App Inventor to execute that.

Assigning to Juan_Antonio.

Hi Chris, Yes it’s that I want to achieve. Using my app to use the device (function XYX) and implement a firmware upload function with a .HEX file somewhere on my website. Download then remote flash the device. I also think that I’ll have to create a custom Bootloader. Looking already made AP2 blocs to help to start. :slight_smile:

The only thing I can think of is OTA, this is updating a Sketch by WiFi. It can be done but with the ESP32 board. Search for information about OTA and ESP32.

Theoretically, it is possible because all communication is via uart. You just need to know the bootloader commands that will initiate the firmware upload. You will also need to press the reset button in arduino. You can also use extension for communication with arduino but via USB.

Patryk, I can use an IO connected to RESET pin to trig a reboot!

@mhpro_net I`m trying to solve same issue. Did you find out a way how to update arduino hex file by using app inventor?

It has been achieved - search the Forum

@mstone ,
@mhpro_net ,

Can you please point towards where in the forum this is solved. I found a few references but nothing solved as requested by mhpro_net


Thank you. Let me check and try...

Take a look at this package, it might be of some help to you. The ESP32 flutter_ota package supports various Flutter SDK versions, ensuring compatibility with a wide range of projects.