Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python

Python for Development Boards

Hello! So I was looking into getting a development board (Like Arduino or the AdaFruit feathers). I saw a guide that was extremely useful that compared pricing, possible languages, and other specs. I noticed that quite a few boards can use Python. I was wondering if the Learn Python track here on Treehouse could teach everything necessary for using Python on developer boards, or if thats a different branch of Python since its controlling hardware. Has anyone had experience using Python for developer boards or know if the Learn Python track has everything I need to do that? Thanks!

P.S. If it is helpful, the guide comparing the boards said that they use "MicroPython" instead of Python. I don't know if that makes a difference...

Hi there!

Defo follow the support tab at the top and pop Team Treehouse a suggestion if it's a course you want to see added :)

Honestly though, my experience with developement boards has been that they're all different, and that's really infuriating ( we don't realise how easy it is developing for standard hardware in full OS's lol). So basically you have to pick one board, and everyone has to buy the same one.

Dev boards basically divide into three types - classic microcontroller boards, like the arduino, where you have an 8/16bit MCU with built in ram and rom, and its addressable memory space is pretty much just mapped to turning pins on and off; ARM boards built on cortex M microcontrollers like this micropython board, which are 32bit and are typically built on the ARMv7 instruction set. These have a lot more features, and much higher spec/performance; Finally you have the ARM boards that use Cortx A CPU's used in the raspberry Pi's. These are basically mini PC's (or smartphones).

Only the second two are capable of running python on them as 8/16bit microctrollers simply don't have the memory/performance to handle interpreting and compiling python on the go - you'd have to compile the python into machine code on a PC then flash it onto the board. To my mind that eliminates most of the advantages of using python for a project, plus these low powered boards would really highlight python's slowness compared to the C they're typically programmed with.

As you can see, the other two types of boards should be fine, though both need special libraries written for them so you can easily address the pins. Usually somebody will make a library for any board that becomes popular enough - even some "drones" can be programmed in python!.

To my mind the best option wouldn't be microcontrollers though - they're a bit too specific in application. I'd say Base it on the raspberry pi zero. They're very, very cheap at $5, they're very small to use in projects, use very little power and the raspberry pi project has decided to use python for it's primary language since the get go, so there's a huge amount of documentation, projects and such. Plus as it's a full ARM cortex A board, so you have the resources to run the full python library, add in numPy... and so on and so on - it's just a tiny linux computer with programmable pins after all!