Raspberry Pi zero is a smallest version of Raspberry Pi. The Raspberry Pi is not a comestible kind, but is a Microcomputer. A single board computer that have CPU, RAM, HD, all connections like USB, HDMI etc.
I have also discovered a small led matrix 11x5 by Pimoroni, the pHat. This is a small and pretty led matrix that with this little pretty Raspberry Pi, the Raspberry Pi zero, make a very kindly object. A led scrolling led matrix, that you can program in Python.
I show you where to buy the Raspberry Pi, where buy the pHat, and how to install the library and the code for work with the pHat matrix.
On Amazon you can buy the
The Raspberry Pi Zero is available only on Pimoroni
Step 1: Download the pHat LibraryAfter the soldering step, you can connect the pHat to your Raspberry Pi zero.
In the Terminal window, type:
sudo raspi-config
put the password (default is raspberry)
1. Go to Advanced Options
2. Select I2C
3. Enable the I2C port
Install the library on Python 3Open a Terminal and type:
sudo pip3 install scrollphat
or
sudo apt-get install python3-scrollphat
Install the library on Python 2Open a Terminal and type:
sudo pip2 install scrollphat
or
sudo apt-get install python-scrollphat
Step 2: Connect the pHat and try the codeYou can download the three files on your Raspberry Pi. The graph file generate a random lines on your pHat, the tempCpu, show the CPU temperature of your Raspberry Pi zero, and the meteoShare.py show the local meteo condition.
If you want use meteo file you must install the pyown library by terminal:
sudo pip install pyown
After you must provide a valid API key by using pyown library. The weather service you're going to use in this resource is called OpenWeatherMap. It's a completely free service, and has an easy-to-use API. You're going to need your own account though, so click on the link to go to the website: http://openweathermap.org
Step 3: Try to make the pHat sparkleIn the Terminal window, go to the same folder where are graph.py file, and type:
python graph.py
or
python3 cpuTemp.py
or
python meteoShare.py
See the result!
Comments
Please log in or sign up to comment.