Close

Hack Chat Transcript, Part 2

A event log for Python and the Internet of Things Hack Chat

The power of Python on microcontrollers

dan-maloneyDan Maloney 04/03/2019 at 20:050 Comments

limor12:21 PM
we haven't seen any awesome mqtt lib's yet but if you do let us know

happyday.mjohnson12:21 PM
@chris - i was able to access adafruit.io from a generic mqtt library from my flutter app.

deshipu12:21 PM
@happyday.mjohnson for sure, but there are always a lot of things that would be nice to add as well — I'm sure there will be sleep support eventually

todbot12:21 PM
@tannewt wrt micropython native code in mpy, are you referring to this PR? https://github.com/micropython/micropython/pull/4588

limor12:21 PM
happy, we haen't implemented it yet - if you'd like to help out check out the issue and you can try implementing it!

Dan Halbert12:22 PM
@happyday.mjohnson the answer is not "no", but "not yet"

limor12:22 PM
right now our focus is getting 4.0 out to release candidate :)

tannewt12:22 PM
@todbot yup!

happyday.mjohnson12:22 PM
@deshipu of course - btw, thank you for all the incredible work you have done both on micropython and cp.

deshipu12:22 PM
@happyday.mjohnson thanks :)

happyday.mjohnson12:22 PM
@Dan Halbert thank you. i was just curious given this discussion is about iot, cp doesn't do much for battery life.

WRR12:23 PM
Does anyone know of any actually released products that use CircuitPython or MicroPython? Can it translate reasonably well from prototyping to production?

Boian Mitov12:23 PM
I have implemented MQTT in Visuino, and it is open source

deshipu12:23 PM
@WRR check out the http://circuitpython.org for a list

WRR12:23 PM
Thanks!

Hendra Kusumah12:23 PM
is the CP support for the NRF52 based board like particle xenon already mature enough?

limor12:24 PM
yeah there's the TI calculator add on that supprots circuitpython

happyday.mjohnson12:24 PM
also - i love the simplicity of Adafruit.io versus offerings from say google.

limor12:24 PM
the TI-83 Premium

Dan Halbert12:24 PM
@Hendra

pt12:24 PM
TI calc ships with CircuitPython - https://blog.adafruit.com/2019/03/31/use-circuitpython-boards-on-the-ti-83-premium-ce-calculator-tiplanetnews-ticalculators-circuitpython-circuitpython/

David12:24 PM
has anyone tried the sipeed Maix modules?

WRR12:24 PM
Wow, that's cool! Wish I'd had that in my math classes...

Matt12:24 PM
OpenMV ?

Boian Mitov12:24 PM

https://bitbucket.org/mitov/visuino-libraries/src/master/

BITBUCKET

mitov / Visuino libraries / source / - Bitbucket

Added "Array Insert Items", and "Array Replace Items At Index" components

Read this on Bitbucket

Dan Halbert12:24 PM
@Hendra Kusumah we have simple BLE peripheral support working and are working on more; we aren't supporting the particle.io cloud stuff specifically; we have our own Feather nRF52840 board

Cesos12:25 PM
Are there any good Bluetooth support libraries for the ESP32?

limor12:25 PM
@boian has to be in python :)

Boian Mitov12:25 PM
I have also added Bluetooth support for ESP32 in the Visuino libraries :-)

tannewt12:25 PM
@David I haven't but I've seen some folks on the MicroPython forum I think

pt12:25 PM
for micropython, products: casio calc, numworks calc as far as shipping products

Boian Mitov12:26 PM
Sorry, Python is just not my cup of tee :-D

Dan Halbert12:26 PM
@Cesos I think BLE support for ESP32 is early days even for Arduino, etc.

David12:26 PM
@tannewt thanks for the tip.

limor12:26 PM
boian, all good - this hackchat is about python on hardware :D

tannewt12:26 PM
np

happyday.mjohnson12:26 PM
is there any thought of a debugger for CP?

David12:26 PM
Im interested in edge AI. Will circuit python support Tensorflow?

David12:26 PM

https://www.tensorflow.org/lite/guide/microcontroller

TENSORFLOW

Microcontrollers | TensorFlow Lite | TensorFlow

TensorFlow Lite for mobile and embedded devices

Read this on TensorFlow

Hendra Kusumah12:27 PM
@Dan Halbert thanks for the answer, I don't mind not using the particle cloud service. What Important is the BLE support on CP

deshipu12:27 PM
@happyday.mjohnson there has been some work on adding debugging support to it

deshipu12:27 PM
@happyday.mjohnson but I think the person who worked on it paused now

happyday.mjohnson12:27 PM
@deshipu what level/type of support?

pt12:27 PM
@David with BLINKA on linux, yep

limor12:27 PM
@david you can run circuitpython libraries within python3 so just add tensorflow next to it. you'll want a fasssst board like the coral

Boian Mitov12:27 PM
np :-) Just answering the MQTT and BLE questions, in case it helps :-) People can take a look at my code and port to Python if they want :-)

Cesos12:27 PM
@Dan Halbert Thank you, Dan. It is indeed. Bluetooth remains the only piece missing in a couple of my projects :)

deshipu12:27 PM
@happyday.mjohnson basically the "pdb" kind

happyday.mjohnson12:28 PM
Also, I'm enamored with VS Code. I realize Mu is awesome, but is there anything around integrating the CP toolchain w/ VS Code?

todbot12:28 PM
Ooo it'd be neat to see CircuitPython on the new SparkFun Edge board with the Apollo 3 chip that runs TensorFlow

happyday.mjohnson12:28 PM
@deshipu thank you. pdb makes sense.

limor12:28 PM
a tensorflow co-processor would be a great addition. but most tensorflow chips are not very port-friendly (no USB)

deshipu12:28 PM
@happyday.mjohnson implementing pep-0553

Dan Halbert12:29 PM
@Hendra Kusumah check out https://circuitpython.readthedocs.io/en/latest/shared-bindings/bleio/__init__.html for an entry into the low-level library. Also see https://github.com/adafruit/Adafruit_CircuitPython_BLE and https://github.com/adafruit/Adafruit_CircuitPython_BluefruitConnect

happyday.mjohnson12:29 PM
@deshipu - thank you. i'll look up pep-0553.

josejorge12:29 PM
do you know of commercial products using circuit python? besides development boards

David12:29 PM
I'd be interested in seeing circuitpython for ARM on xilinx fpga

David12:30 PM
then we could make our own peripherals on fabric, and Pynq them in to micropython

limor12:30 PM
ice40 has a tinyusb port working on it, so that could be a target. if anyone wants to help on adding a port, we're psyched to help them!

pt12:30 PM
@David we pick uped the xlinkx pynq-z2

deshipu12:30 PM
@josejorge scroll up a bit'

josejorge12:31 PM
thx @deshipu, I'll check

tannewt12:31 PM
@josejorge I don't know of any "devices" with it. It's not our focus to support them either. MicroPython is more focused "productionization"

delatorrecohen12:31 PM
I'm teaching elementary school kids programming (as a volunteer)... do you know of any site with cool projects in CircuitPython for kids in 3-4 grade level? any recommendation of what would be the best hardware for that school level?

happyday.mjohnson12:32 PM
Do you see any benefit with merging with micropython in the future?

David12:32 PM
I think the hackaday resident FPGA expert Antii Lukats has a micropython port for xilinx softcores

Dan Smith12:32 PM
@delatorrecohen also interested in that

Kattni12:32 PM
@happyday.mjohnson There are plenty of people already using VS Code successfully with CircuitPython. We aren't working on any changes to it.

deshipu12:32 PM
@happyday.mjohnson micropython has very different goals

pt12:32 PM
@delatorrecohen yep! check out these - https://learn.adafruit.com/guides/latest

limor12:32 PM
@delatorrecohen the circuitplayground express projects are great for young kids. no soldering. really easy to hack and mod

happyday.mjohnson12:32 PM
@deshipu what are the different goals between CP and mp?

Dan Halbert12:32 PM
@delatorrecohen https://learn.adafruit.com/circuitpython-made-easy-on-circuit-playground-express

pt12:32 PM
circuitplayground (makecode) and the circuitpython projects

limor12:32 PM
we have tons of kids building circuitpython on CPX projecst all the time

Charles Burnaford12:32 PM
I was wondering if there is a way to run a circuitpython board at less 0 degrees C?

delatorrecohen12:33 PM
Greet! Thanks! :-)

limor12:33 PM
and also add crickit for robotics projects

tannewt12:33 PM
@happyday.mjohnson we won't rule it out for the future but for now it's better for both projects to be separate

Dan Smith12:33 PM
@delatorrecohen & @limor have started using CP w/ young students, they love it.

pt12:33 PM
@delatorrecohen and combine CRICKIT for robotics, works wit both makecode and circuitpython

limor12:33 PM
thanks dan!

deshipu12:33 PM
@happyday.mjohnson CP tagets beginners to electronics, hobbyists and learning, MP focuses more on industrial prototyping

WRR12:33 PM
ICE40 support sounds really cool - how would you port the project to an FPGA, though? Would it need a soft core loaded on it, or are there ICE40s with built-in microcontroller helpers now?

pt12:33 PM
@Charles Burnaford prolly OK to try :)

limor12:34 PM
ICE40 has a USB stack being ported

tannewt12:34 PM
@WRR I'd assume soft core. (Probably RISC-V)

Charles Burnaford12:34 PM
I will give it a try next winte

pt12:34 PM
there "is" CircuitPython in space... so seems possible :) https://blog.adafruit.com/2019/03/17/circuitpython-in-space-pythonaut-circuitpython-adafruit-maholli404-zacinaction-smallsat-kicksat/

David12:34 PM
ICE40 is nice for opensource, but I think a bigger FPGA with DSP's make more sense

tannewt12:34 PM
the fpgas with ARM tend to be pricier

happyday.mjohnson12:34 PM
@deshipu oh. thank you. hmmm...i can see why there is a confusion with folks asking about shipping products using CP. If the goals are indeed that, shouldn't the message be learn on CP then migrate to mp?

tannewt12:35 PM
@David there is a lot of work to support ECP5 and Xilinx 7 series with open tools

happyday.mjohnson12:35 PM
@deshipu although it does start explaining stuff like pin.irq()...

Hendra Kusumah12:35 PM
@Dan Halbert ,wow ble support is already good. another question, will the bleio implemented on the blinka? I know there are other way to read ble with the Pi but it will be nice if its already in one package with the CP blinka

David12:35 PM
ECP5 and artix make more sense for sure

tannewt12:35 PM
ya, that's what I'm excited for

tannewt12:35 PM
native usb is key for us

deshipu12:36 PM
@happyday.mjohnson I think it's more "start with CircuitPython, migrate to big Python and other programming languages"

Dan Halbert12:36 PM
@Hendra Kusumah We'll need to write a wrapper library that implements `bleio` using the available BLE libraries on RPi, so perfectly possible, just not done yet!

pt12:36 PM
@happyday.mjohnson we did not have anything to do with TI choosing CircuitPython for their calcs, they just did it

Discussions