In this Raspberry Pi Sense Hat Tutorial we are going to take a first look at the impressive Sense Hat add-on board for the Raspberry Pi.
With this add-on board we can easily sense temperature, humidity and pressure. It also has an embedded gyroscope, and accelerometer a joystick and much more…Without any further delay let’s get started!
Raspberry Pi Sense Hat Tutorial
Hey guys, I am Nick and welcome to educ8s.tv a channel that is all about DIY electronics projects with Arduino, Raspberry Pi, ESP8266 and other popular boards. Today we are going to test the Sense Hat for the Raspberry Pi on a Raspberry Pi 3 board.
The Sense HAT is an add-on board for Raspberry Pi, made especially for the Astro Pi mission – it launched to the International Space Station in December 2015. Yes, two Raspberry Pies with 2 Sense Hats were actually sent to the International Space Station and performed experiments with code that was written by students! Amazing stuff!
The Sense HAT has an 8×8 RGB LED matrix, a five-button joystick and includes the following sensors:
- Barometric pressure
There is also a Python library providing easy access to everything on the board.
WHERE TO BUY
Sense Hat: http://bit.ly/SenseHat DISCOUNT COUPON CODE: ModuGB
Raspberry Pi 3: http://bit.ly/RaspberryPI3
Powerbank Xiaomi: http://bit.ly/POWERBANKXiaomi
Full disclosure: All of the links above are affiliate links. I get a small percentage of each sale they generate. Thank you for your support!
The software of the Raspberry Pi Sense Hat tutorial
I have developed a very simple python program that prints the temperature, the humidity, and the pressure to the command line. The file of the program is named test.py and it is placed on the desktop. The code of the program is extremely simple. All we do, is we import the SenseHat library, then create the SenseHat object and we are ready to use the hat. In order to get the temperature we use the following command: temperature = sense.get_temperature(). It is that easy! Then we print the value to the command line with the print command! If we want to print the temperature on the LED matrix we can simply convert the value to a string variable, and print it with this command: sense.show_message(text). The library of the sense hat is extremely easy to use. The Sense Hat is literally plug and play.
Using the LED matrix is also very easy. You can light up any pixel you like with the command sense.set_pixel(). You define which pixel you want to light up and the color of it. As you can see, you can build impressive projects easily with the available commands. Then you can use the joystick, the gyroscope, the compass and the accelerometer. In this cheat sheet you can find all the available commands with easy to understand examples. You can find a link for this cheat sheet in the description of the video. It will be very helpful at your first projects. In the description of the video you can also find the simple code I wrote for a quick start with the SenseHat.
CODE OF THE PROJECT
SUBSCRIBE ON YOUTUBE
Never miss a video: Subscribe to educ8s.tv