0

CircuitPython 1.0.0 Release Candidate 4
Moderators: adafruit_support_bill, adafruit

Forum rules
Adafruit MicroPython is currently EXPERIMENTAL and BETA - Please visit https://learn.adafruit.com/category/micropython and http://forum.micropython.org/ in addition to our section here!
Please be positive and constructive with your questions and comments.

CircuitPython 1.0.0 Release Candidate 4

by tannewt2 on Fri Jul 07, 2017 2:52 pm

From the GitHub release page:

One consistency change thanks to @ladyada! This release was made from the stable branch. The master branch is now working towards the 2.0.0 release.


This release is based on MicroPython 1.8.7.

Change highlights since 1.0.0-rc.3:

  • atmel-samd: Change to non-blocking mode for streams. That means UART.read() will return None when no data is available instead of raising OSError.
  • atmel-samd: Reboot to bootloader after 1200 baud serial connection is closed. Arduino uses this to flash a new sketch.
  • atmel-samd: Give on-board flash file systems unique Volume IDs based on the serial number of the MCU.
  • atmel-samd: Prep for Gemma M0 and Trinket M0.

To install, download a .bin file and follow the guide here for M0 and here for ESP8266.

Have a Feather M0 Express, Metro M0 Express, or Circuit Playground Express? Download a .uf2 and follow these instructions. To install our libraries simply download the latest bundle and copy the lib folder onto your CIRCUITPY drive.


tannewt2
 
Posts: 361
Joined: Thu Oct 06, 2016 8:48 pm

Re: CircuitPython 1.0.0 Release Candidate 4

by hwiguna on Mon Jul 10, 2017 1:52 pm

Hi! I'm thinking of using CircuitPython for my Giant RGB LED Cube project. My idea is to have a web page that embeds one of the streaming services to live broadcast the physical cube and visitors could click preset effects AND write their own animations by modifying/writing Python code in a text area on that page. I'm a Python n00b -- I imagine since Python is interpreted, it would be possible to give it a Python script as a string and compile a new function dynamically? CircuitPython runs on ESP32 right? there's a webserver and Neopixel support for it too, right?

hwiguna
 
Posts: 23
Joined: Wed Nov 16, 2011 10:33 am

Re: CircuitPython 1.0.0 Release Candidate 4

by tannewt2 on Mon Jul 10, 2017 2:44 pm

Hi hwiguna,
That project looks amazing! You should share it on the Adafruit Show and Tell.

Python does make it easier to load new code than with Arduino. However, since Arduino code is compiled, it tends to run faster.

There tends to be two bottle necks to refresh rate of neopixels. The first is computing the new colors of each pixel which tends to involve a bunch of math. The second bottleneck is actually communicating the data out to the pixels. Each bit takes a certain amount of time to communicate and chaining them serializes those bits. So, I'd suggest considering segmenting your cube into 4 or 8 separate strips to get a 4x or 8x refresh speedup. Furthermore, using DMA, you can overlap the computation of the pixel values and actually outputting them to the strips. PhilB has been adding support for this in some of our Arduino GitHub libraries and we could add it to CircuitPython. CircuitPython will however, be slower on the math side of things.

CircuitPython doesn't support the ESP32 yet although MicroPython is working on adding support. I don't think they've officially released yet. I don't know the state of the webserver and neopixel support in it. The ESP8266 does have support for both.

I'd actually suggest looking at using a Raspberry Pi to load code onto the microcontroller driving the cube. That would allow the code on the microcontroller to focus on driving the display. I'm currently working on automated testing on microcontrollers through a Raspberry Pi so I should have some example code on how to do it.

Hope that helps. :-)
~Scott

tannewt2
 
Posts: 361
Joined: Thu Oct 06, 2016 8:48 pm

Re: CircuitPython 1.0.0 Release Candidate 4

by hwiguna on Mon Jul 10, 2017 7:21 pm

Thanks for the insights Scott! I'll keep watch on your project so I could "steal" your code. Thx again!

hwiguna
 
Posts: 23
Joined: Wed Nov 16, 2011 10:33 am

Re: CircuitPython 1.0.0 Release Candidate 4

by dhalbert on Mon Jul 10, 2017 7:48 pm

This sounds like a great project! Re your idea of user-supplied code: You can execute Python code at run-time with the `eval()` function. However, it lets you do anything, and it's not really possible to limit it to "safe" things. So someone could run CircuitPython code that could crash the underlying program, erase the flash memory, the filesystem, etc. You'll need to tolerate that and be able to recover. And of course don't allow general Python code to run on an RPi: that is essentially allowing shell access to the machine.

dhalbert
 
Posts: 400
Joined: Tue Feb 17, 2015 6:18 pm

Re: CircuitPython 1.0.0 Release Candidate 4

by mrmcwethy on Mon Jul 17, 2017 10:03 am

Is the lib bundle compatible with RC4 of CircuitPython?

mrmcwethy
 
Posts: 1
Joined: Fri Jun 09, 2017 5:29 pm

Re: CircuitPython 1.0.0 Release Candidate 4

by tannewt2 on Mon Jul 17, 2017 11:01 am

@mrmcwethy yes it should be. Let me know if you have any issues.

tannewt2
 
Posts: 361
Joined: Thu Oct 06, 2016 8:48 pm

Please be positive and constructive with your questions and comments.