CircuitPython and MicroPython - Making Microcontroller Making EasiersteemCreated with Sketch.

in #making9 years ago

2017-09-07 18.18.27.jpg

Getting into making is awesome, especially for kids, but there are some barriers.

For a start, a lot of the technologies take some setting up unless you get a done-for-you kit (looking at you Raspberry Pi) or you are expected to learn a compiled language like C++ (as in the Arduino) or C#.

Grownups, the ones with a tech streak or at least patience, it's not so bad, but for people coming in cold, it's friction we can do without.

Enter Python.

Python is pupil perfection

Python is an interpreted language, meaning you can enter commands and see the results right away, plus the syntax is very human readable. Formatting is enforced so it's more difficult to make spaghetti code.

Recently Python has been ported to Microcontrollers, first via a kickstarter, and then by the community, and most recently, Adafruit with their own boards.

Plug and play

This last development is the best yet, because the Adafruit ecosystem will make it easier than ever.

Plug in your CircuitPlayground or Gemma board and it appears as a drive. Edit the code with any editor, hit reset, and it executes. No software to install, no toolchain, no IDE, just code and blinky lights :)

Example code

This lights up the included neopixels on the CircuitPlayground board:


import board
import neopixel
import time

pixels = neopixel.NeoPixel(board.NEOPIXEL, 10)

while 1:
    pixels[0] = (1, 0, 0)
    pixels[2] = (0, 1, 0)
    pixels[5] = (0, 0, 1)
    time.sleep(1)
    pixels[1] = (2, 0, 0)
    pixels[3] = (0, 2, 0)
    pixels[6] = (0, 0, 2)
    time.sleep(1)
Sort:  

I have always wanted to make something, but never really known how. I think I am going to have to follow you just so I can have some inspiration to get started, and perhaps start with learning some Python! Thanks so much for sharing. BTW, I am a curator with @ocd and would love nominate your post.


This gem of a post was discovered by the OCD Team!

Reply to this comment if you accept, and are willing to let us share your gem of a post! By accepting this, you have a chance to receive extra rewards and one of your photos in this article may be used in our compilation post!

You can follow @ocd – learn more about the project and see other Gems! We strive for transparency.

Let me know if you have any questions regarding the project or nomination. Hope to hear from you soon!

Awesome and I am going to follow @ocd - looks great :)

Great, thanks so much for replying!

Coin Marketplace

STEEM 0.04
TRX 0.32
JST 0.098
BTC 64715.35
ETH 1920.72
USDT 1.00
SBD 0.38