I want to build my own sketch upload app for my Arduino UNO. I have an USB cable which connects my Android smartphone with my UNO. Now I'd like to do something similar to the ArduinoDroid app: Read a .ino file from my Android device, compile and upload it with MY OWN app to the Arduino Board. Can someone give a clue? That would be great, thanks!
So there are 2 tasks here that your Android program will have to perform:
The Arduino IDE uses the gcc/g++ open source compiler to compile the code. It then uses AVRDude to download the compiled source into the Arduino.
Both of these programs run on Linux, which is what Android OS is based upon. Download and install a Linux OS like Ubuntu. Then install gcc & AVRdude on that Linux OS (Google for instructions).
Once you have done that, read up on how to use both programs and play around until you get it working. Then all you have to do is have your Android program execute the same steps to compile and download the Arduino program.
Your Android program will have to somehow package or include the gcc compiler and AVRDude programs. Alternatively, you could send the ino files to a server to be compiled and then receive back the compiled program. Then all you would have to do is download the program into the Arduino.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With