You could write your microcontroller code on your desktop PC, or you could do it on your laptop on the go. Or, if you want to get really portable about things, you could write your embedded code on your phone. Enter DroidScript.
Basically, DroidScript is a JavaScript and Python IDE for Android phones and tablets. Simple enough. You can use it to write apps for your phone or tablet. But its party piece? You can now also use it to program for embedded devices—namely, a range of those based on the RP2040 microcontroller. For example, the Adafruit QT-Py RP2040, the Pimoroni TinyFX, or the Pimoroni Yukon. They run MicroPython and CircuitPython, and you can program them from DroidScript. Easy.
A decade ago, this would have been a royal pain in the butt. But today? It’s easy, because the smartphones and devboards both use USB-C connectors. All you need is a regular USB-C cable and you can hook straight up to the board and burn your code.
You can get the app on the Google Play Store if you’re so inclined. We’ve seen some other neat smartphone programming projects over the years, too. Meanwhile, if you’ve found any other nifty ways to get your code on to a dev board, don’t hesitate to let us know!
Hmm I wonder if Droidscript can initiate a serial connection with the board via pyserial.
It’s a pita to get a serial connection with termux
Probably not, happy to be proven wrong though.
I remember in the old days before termux, I had to root my android phones, transfer a debian filesystem in a file, mount that, “mount -o bind /dev /debian_filesystem/root/dev” to get access to hardware and finally chroot into it.
I could program AVRs using my phone. It was a bit cumbersome but it worked in a pinch
my ‘pico’ rp2040 board has micro usb but i’m sure it would work with otg
imo this really highlights the strength of rp2040 over alternatives like ‘blue pill’. the usb programming is so easy. you don’t need a second board with a special firmware. you don’t need a more expensive ‘development’ board that has the optional usb interface. you don’t need to do any soldering or use a proprietary cable.
i don’t personally like python or the raspi sdk or arduino or etc. so i also like that the bootloader is so open! i can bypass all that garbage. it was trivial to make a libusb-based program to directly talk the “PICOBOOT” protocol. the only part that was any question at all was the crc, and it wasn’t hard to nail down.
it’s a truly easy board to load your code into.
Most of Droidscript is paid.
No, this is not Die Hard 4.
I assume you meant this as a response to me. If so, what are you even talking about?
I wrote a program for a microcontroller that has 2-way communication via serial. To make things easier I wrote python functions leveraging pyserial to detect the board, open the serial port, send user input and get back information from the board. These function can be imported for use in other scripts.
There is nothing crazy about it, it works great on all my linux computers and even a chromebook. Obviously I wold like to use it on a phone, and there are (free) android apps which can open serial connections and communicate back and forth. The issue with that is it doesn’t support python so nothing prescripted.
Termux can run python scripts but it is a pita to open a local serial port.
So essentially this is a glorified serial terminal that uploads python code.
Try ViperIDE, it works on the smartphone, tablet, desktop and supports almost any MicroPython and CircuitPython board. And its free.