I am currently looking at how I could use the kit in the classroom and particularly using Python with the sensors.
As part of this project I am building a simple prototype weather station that both uses inputs and outputs to collect data and display it on a simple bar chart.
At this stage the following modules are used:
Weather (for temperature and pressure)
Touch (to select different measurements)
If you would like to try it for yourself the code is below:
Matrix - connected to 1
Number - connected to 8
Weather - connected to 2
Touch - connected to 3
Light - connected to 7
Back in March I got my mega Flotilla treasure chest from Pimoroni. I was very excited to see what could be done with it. The Rockpool graphical interface is coming along nicely and I had some fun with that, but I really wanted to dig into the Python API.
I wanted my first project to use both inputs and outputs so I decided to create a light meter which displayed the light level both on the number display and visually through a bar chart on the LED matrix.
This project uses the matrix connected to 1, a light sensor to 2 and the number display to 8. I screwed the components onto one of the base plates to keep them still!
A game I have always played is hamster wars with my brother. We both love the game but can’t easily keep the scores.
As a result of this I decided to use my Pi with a hat I had seen, called the Display-O-Tron 3000 by Pimoroni. The original idea was that it would be controlled by a website but I started with something simple.
First, I thought of the main things it will need: a competition name; a winning score; the player names; a winner screen; the scores and a way to edit those things.
To get the competition name, when you load the program up the first thing it does is asks you what the name of the competition is. Then I asks how many points to win, then the player names. It puts all of that stuff into variables and puts 0 as the score. Then it puts them into a string and displays then on the Display-O-Tron 3000.
Meanwhile on the terminal is a list of options and you select an option by typing it’s number in. You can change the names, add to the scores and do a lot of stuff. You can even reset so that the title is ‘unnamed competition’ and the players are ‘demo’ and ‘demo2’.
Some more ideas for the future to be added include:
A music player.
Change the background colour.
A keyboard on the Display-O-Tron as it has a joystick on it.
Run it at boot.
Philip - “Keep calm and play Minecraft”
Please subscribe to me at www.flye001.work for raspberry pi and python tutorials.
I recently bought myself an Explorer Hat pro from the guys over at Pimoroni. This is a great little hat which offers lots of connectivity for prototyping on the Raspberry Pi.
Features include: (from Pimoroni website)
- Four buffered 5V tolerant inputs
- Four powered 5V outputs (up to 500mA!)
- Four capacitive touch pads
- Four capacitive crocodile clip pads
- Four coloured LEDs
- PRO ONLY Four analog inputs
- PRO ONLY Two H-bridge motor drivers
- PRO ONLY A heap of useful (unprotected) 3v3 goodies from the GPIO
- A mini breadboard on top!
I was excited to see what I could do with this and thought about project that uses the LEDs and the capacitive touch pads.
So I decided to recreate the classic game of “Simon Says”.
If you would like a copy of the code feel free to download it here
The Unicorn Hat is a beautiful bank of 8x8 RGB LEDs ((WS2812B) which are easily programmable with a Python API.
I am using my Unicorn Hat with a model A+ as a countdown to my family holiday to Florida next year. Running off a decent 2A power supply and connecting to my WIFI network there is no need for a keyboard and a mouse. With just one power lead connected and a WIFI dongle I have a very small and bright marquee message display panel.
The code for my project can be found here on github.
Projects using the scrolling text will require the UnicornHat Scrolling text code from https://github.com/topshed/UnicornHatScroll
I am really impressed that for under £45 (including a model A+) you can build a compact and bright LED messaging display.
The Unicorn Hat API is very easy to use and the guys at Pimoroni do include enough detail and examples to get you started. I do intend to buy another one and introduce it to my pupils at school. This could be a very good tool for some Python programming.
One word of warning: It is bright when displaying at 100%. People with photosensitivity should also take care when using this especially when making the LEDs do flashing patterns.