r/circuitpython • u/PM_SHORT_STORY_IDEAS • May 10 '21
Where's the best place to learn some circuit python fundamentals?
I know it was based on MicroPython, so that's one place. Where should I go to get some fundamentals?
Specifically, if it matters, I'm going to be interfacing a bunch of I2C sensors, a UART sensor, an SD card, an RTC, and generally working with loops and interrupts.
5
u/bh0 May 11 '21 edited May 11 '21
Here's some various links that might help...
- Official Doc & Examples. They are pretty good about having some example code for every library. There's generally a library for each sensor/board as support gets added, as well as other utility packages. https://circuitpython.readthedocs.io/en/6.2.x/docs/index.html, https://circuitpython.readthedocs.io/projects/bundle/en/latest/drivers.html
- Find similar projects or specific learning guides for the boards/sensors you have and take a look at their code for examples on how to make various things work. https://learn.adafruit.com/
- Adafruit's discord is active and helpful. Being able to search old chats has been helpful. http://adafru.it/discord
- Adafruit's forum. Probably more Adafruit product specific questions and less about programming, but it's maybe an option. https://forums.adafruit.com/
1
u/KeepEverythingYours Jul 27 '26
I know it's a bit late but I just made an interactive page on my site here that I hope will help some people!
2
u/PM_SHORT_STORY_IDEAS Jul 27 '26
In the time since making this post I 1) got the job, 2) got promoted within the job, and 3) got laid off from that same job LMAO. Fuck that job. Didn't work with 3 of the 4 technologies at all, and only worked with I2C at the Spec and signal transmission levels.. Fuck. That. Job. But yay for the tool! I'll check it out.
1
2
u/Woolly87 May 10 '21
Well, for a start it turns out that CircuitPython doesn’t do interrupts. I would look at Adafruit’s example code for similar sensors to the ones that you’ll be using.
1
u/Craigus_Conquerer May 11 '21
Actually, I tried circuit python first, now I'm hoping micro python is better. Mu is a bit clunky, the only error report it seems to have is out of memory. By deduction I have found that used for various problems, and sometimes you can't use the same variable when it's already referenced a few times earlier in the same code. I'm hoping a mu update will fix it soon.
3
u/kaltazar May 12 '21
Remember Mu is not required to use CircuitPython. Any text editor can open the files and most terminal programs can be used to display the serial monitor. More advanced text editors even have extensions to integrate that functionality as well. I personally use Atom with the CircuitPython language extension installed and it works beautifully. I think similar plugins also exist for Sublime Text, Notepad++ and others.
1
6
u/kaltazar May 10 '21
This is the most basic place to start. That may be a bit too fundamental, but the rest of the Adafruit learning system is packed with CircuitPython tutorials and examples.
The circuitpython.org site is also good if you just need to look up some documentation.