Pimoroni Blinkt: Setup and first script

Updated 15 June 2017

Not quite sure how to get started with your Pimoroni Blinkt module? Let's set one up and have a play around! We'll guide you through the installation, open up some examples and try our hand at writing a simple program.

You'll need:

  • A Raspberry Pi (I'm using a Pi 3 B) running the latest version of Raspbian
  • A Blinkt module

Installation

Make sure you're in your /home/pi directory, execute cd

Installation is a one-liner. Execute:

curl https://get.pimoroni.com/blinkt | bash

Ok, but what's going on? curl fetches data (a script) from a server, the pipe ( | ) passes ("pipes") the data into bash, which execuetes the script.

Following the prompts for the setup procedure, you may encounter some scary red-text saying something to the effect of Unable to install RPi.GPIO for python 2 / 3. That's ok, I got that to. It doesn't appear to be anything to worry about because the latest versions of Raspbian come with RPi.GPIO included.

Enter y to perform the full install. I get a notcie that some packages could not be installed. Reviewing the output is quite cryptic, but pressing on, this hasn't been a problem for me.

With all that complete, we're ready to play around with our Blinkt.

Open an Example

The examples provided are overflowing with cool programming tricks. If you're new to Python or programming in general there's a lot to be learned just by stepping through these programs or hacking them to do things differently.

navigate to ~/Pimoroni/blinkt/examples 

At the time of writing, some scripts don't run with Python 3 without some slight modification. If you try to run an script and it doesn't work, try using Python 2.

Open:

  • graph.py and marvel at the smooth, sinuous led show.
  • larson.py to experience a classic led effect - the scanning bar from Knightrider 

Where to from here?

  • The function reference is your manual for how to use the blinkt functions correctly
  • Pimoroni's own tutorial has some great code-along examples if you need to brush up on your Python programming.
  • For the adventurous that want to get their Blinkt connected to the web:There's the mqtt.py script in the examples directory, and I've written a Getting Started with MQTT tutorial if you need help getting started. Some comments in mqtt.py point you to a free mqtt testing website.

Have a question? Ask the Author of this guide today!

Please enter minimum 20 characters

Your comment will be posted (automatically) on our Support Forum which is publicly accessible. Don't enter private information, such as your phone number.

Expect a quick reply during business hours, many of us check-in over the weekend as well.

Comments


Loading...
Feedback

Please continue if you would like to leave feedback for any of these topics:

  • Website features/issues
  • Content errors/improvements
  • Missing products/categories
  • Product assignments to categories
  • Search results relevance

For all other inquiries (orders status, stock levels, etc), please contact our support team for quick assistance.

Note: click continue and a draft email will be opened to edit. If you don't have an email client on your device, then send a message via the chat icon on the bottom left of our website.

Makers love reviews as much as you do, please follow this link to review the products you have purchased.