Hi all - we'll get started in just a minute. Quite a turnout so far..
yayyyy!@
/me does a jig
Hi Everyone!
Hello world!
Hi everyonee
Hello everyone. Just lurking. I'm working on a router at the moment.
Hello everyone :-)
Alright, let's kick it off. Welcome to the Python and IoT Hack Chat. Today we have the Adafruit CircuitPython team online to discuss all your Python questions with microcontrollers and IoT stuff. Not sure who on the Adafruit side is going to take lead - I've seen Limor and Kattni so far. Anyone else want to say hi? Oops - there's PT too. Anyone else.
?
yahhh! we're ready1
Hi! I'm Scott and also work on the CircuitPython core.
YEAH! LETS DO THIS!
@tannewt and @Dan Halbert
we got with us the video stream:Hello, everyone! I'm Kattni and I work with the CircuitPython libraries!
@Bryan Siepert perhaps
alsohere we go!
I'm Dan and I also work on CircuitPython core
So Scott, Dan, Limor, PT, Kattni, and Bryan
Bryan won't be joining us
Welcome all and thanks for being here.
Hi everyone...
Rebecca Skinner, interested in IoT, environmental data, sensors, etc.
Hi Rebecca, welcome
ok everybody
so - on the topic of IoT and Environmental sensors
we haz like 150 libraries for all sorts of sensors you can use with CircuitPython
@kattni is the official Library Keeper
yahso we have your sensors covered - whew!
next up we recently added IoT support to circuitpython - using an ESP32 as a a wifi coprocessor
SO
you are about to ask
https://circuitpython.readthedocs.io/projects/bundle/en/latest/drivers.html
CircuitPython libraries list!WHY DIDNT YOU JUST USE THE ESP32!?!?!
There seems to be the micropython forum, now branching off to other platforms (stm32, esp32, circuit python, microbit) So what is the overall strategy on the circuit / adafruit python both software and hardware ?
LIMOR WHAT IS RONG WITH YOU? THER EIS ESP32 FOR MICROPYTHON!
great quesiont!
answer is - we wanted native usb for the awesome circuitpython experience (1)
and (2) we find that we do best when we offload all the SSL TLS ceriticate stuff and have it run async
ESP32 is so cheap and easy to use, its great as a coproc - lovin' it
I'll tip my hat to that!
for the hardware API we're trying very very very hard to stick to *one* api for all hardware so we only have to maintain one version of our drivers
@limor . I can sleep in peace now
hello all, a micropython enthusiast here from Indonesia. Thanks for the answer regarding circuitpython for esp32like HAL ?
@Andrej Mosat like the "machine" module on the MicroPython
e.g. the Si7021 lirbary will run on a Rapi, Google Coral, Nvidia Jetson, Circuit Playground, nRF52840...
@Andrej Mosat for circuitpython, beginner friendly, drivers for tons of hardware, works with the most devices/hardware
@Andre like digitalio, busio, pulseio, board, ...
its basically a HAL - we've just been writing drivers for like 15 yrs so we have a good idea of how to support all these devices across a wide variety of hardware without getting into unending ifdef's
The Jetson, you say? Exciting - Nvidia will be along for a Hack Chat in a few weeks to talk about the Jetson and AI at the Edge
yep thats right! Jetson has support thanks to Nvidia's engineers
BLINKA, which is circuitpython for linux works on jetson now, so you get hardware support for lots of things
Schweet
@Dan Maloney That's so comforting to hear!
so OLEDs, einks, sensors, etc...all work across the devices the same
but keeping it simple
so everyone's in on this. and by everyone... I mean the guys at NVIDIA too?
and takign advantage of python's weak typing for great success :)
The Blinka library means that you can run CircuitPython libraries and example code with Python with no changes. So there's only one driver and one code base to maintain.
https://github.com/adafruit/Adafruit_Blinka/pull/98 <- Nvidia jetson
so with all this basis we wanted to make it super easy to make IoT devices
@limor Noice
so the pyportal is designed for "get online, get a json or xml feed, parse it, display it"
its really really easy, you just point it at the URL and give it the JSON traversal path and b00m - data
Any chance we'll see mathematical things in circuitpython (e.g. like numpy)? This next!
python makes iot really easy compared to C
oh but strings are so easy in C! /s
@klaasdc numpy is really large, and even on the big boards, we only have 256kB of RAM. So all of numpy or even pieces will not fit.
has irq support been added to gpio pins yet in CP?
python strings and parsing is sooooo nice. built in json and xml!
once you have numpy, you can do machine learning ;-)
very very very slow machine learning
Any plans on supporting python packages with native code loadable at runtime (hard, I know, but would be really useful)
if you want to use numpy you should use a coral/pi/jetson :) -even if it fit on a microcontroller, it would be so sad and slow
not for CP, but python in general - the challenge i have w/ python is lack of mobile gui programming. i end up using flutter for this, python for rasp pi, cp for mcu...
python doesn't really like interrupt support. there's threads but people shoot themselves with it.
re: irq support. it works in micropython?
@happyday not interrupts specifically - we want to support asynchronous programming, but we are lookign for a simple model that will not be timing dependent. Right now we allow people to poll, and we have native classes that use interrupts, but haven't exposed interrupts specifically
LadyAda: Your educational offerings are excellent. Is there one page that has reasons for middle school students to learn Python? I'm seeing some good ones in this discussion. thanks!
You mentioned earlier that SSL/TLS was easier to offload and run asynchronously; does CircuitPython support general-purpose concurrency?
what is wrong with pin,irq() ala micropython?
https://github.com/adafruit/circuitpython/issues/1380
See discussionyou can't alloc memory in an irq in micropython, so you quickly bump into that because python loves to allocate memory all the time
how do you see Ai at the edge and Circuitpython working with the Adafruit IoT ecosystem?
@todbot MicroPython just added support for native loading through mpy
micropython interrupt handlers are very restricted in what you can do
OH. I want to thank everyone on the CP team and at Adafruit. You are very supportive, happy, and kind.
@tannewt awesome! very excited by this
concurrency/threads/irqs are not in circuitpython - see above - but thats why having an ESP32 is great, hardware concurrency is easier to manage than software :) send a request to get data, the ESP32 buffers the socket for ya
re: micropython irq restricted. But good enough for 90%ish stuff? I mean for lipo stuff. Go to sleep. Wake up when (motion, some other sensor reading) detected.
@delatorrecohen probably with adafruit.io which is our data service that works with any device, so when data logging, etc. are needed we'd use that, probably with BLINKA (circuitpython on linux)
Thoughts about generic MQTT libraries?
Interesting, thanks for the GitHub issue and info
@Dan Smith Check out the https://learn.adafruit.com/welcome-to-circuitpython to learn more about CircuitPython. This is where everyone starts. It may have what you're looking for!
@happyday take a look at the github issue I posted above for further details on our thinking
https://github.com/adafruit/circuitpython/issues/1380
Simpler mechanisms for asynchronous processing (thoughts) · Issue #1380 · adafruit/circuitpython
These are some strawman thoughts about how to provide handling of asynchronous events in a simple way in CircuitPython. This was also discussed at some length in our weekly audio chat on Nov 12, 2018, starting at 1:05:36: https://youtu.b...
@happy, there's no sleep modes supported - check out the TPL5xxx boards to have time-based sleep.
@happyday.mjohnson it's simply not CircuitPython's goal to give you access to everything, and interrupts are hard to wrap your head around
@limor - you mean no sleep modes supported in CP? Obviously the m0, etc. have deep sleep... that can be interrupted.
i think a 'kick yourself out of sleep' mode irq makes more sense than a 'call a function irq' - its not a high priority but we have some issues abotu sleep mode.
@happyday.mjohnson we still don't support sleep modes
@deshipu doesn't that make it difficult to use with battery operated sensors?
i think sleep mode is our oldest github issue - check it out and subscribe to it. we have to safely shut down USB and stuff.
@chris, we expose a 'socket' interface to the ESP32 so any socket-mqtt library should work
@limor yah - but USB is out of the way when the sensor is not attached to PC/Mac. So the issue is not that (although it makes stuff a bit more clumsy).
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.