Close

New version and REPL macro musings

A project log for Android Circuit Python Editor

Use a USB OTG cable with Android devices for Serial, REPL, and a basic code editor for use withCircuit Python Boards.

foamyguyfoamyguy 12/18/2018 at 04:120 Comments

There is a new build live in the Play Store, and a debug signed copy has been updated in the repo. This version brings some more improved error handling. Now if you try to do some action (load, save, run macro) and are in the wrong mode it will prompt you with a dialog that has the option to send the the correct CTRL key without leaving the page.

I think at this point we've reached what I'd consider a pretty good version of everything I had originally envisioned when I set out to create this app. I will keep using the app and look for ways to improve but I have nothing else specifically in mind. If you have ideas for this app please feel free to share!

REPL macros

This feature was honestly a bit of surprise to me. I did not really think of this concept until after the basics of the app were already working. It was a natural extension of what the app uses internally to load and save the code.py file. 

The core concept here is: create and store files with python code in them. Whenever you are ready to execute it, send it into the REPL line by line rather than saving it to code.py and then restarting the board. 

This is an interesting way to use CircuitPython, it's grown on me quite a bit I must say. 

It's "temporary" in that it doesn't overwrite the code.py file so if your board is set up to do whatever it is doing in your project you can leave that in place but still execute some other useful code perhaps related, to the project, or maybe not even, maybe you're warm and just want to send an IR blast to turn on the fan.

The files are stored on the computer (or Android device in our case) instead of the board so we aren't really limited by storage size. You could conceivably keep a large library organized into sub-folders and everything then pull out the proper script and use it as needed.

It's QUICK! If you've already got your code ready to go you can rapidly switch between different programs running on the board. It makes it possible to demonstrate a few different features or neat things that you can do with a Circuit Playground (or CircuitPython in general) in just a few seconds. Once you've shown them the effect you can also dive in and show the code that drives it.

Discussions