RASPBERRY PI AND SENSE HAT (I): MEASURING TEMPERATURE, HUMIDITY AND PRESSURE
- Layout for this exercise:

1 - Introduction
- 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) and is now available to buy.
https://www.raspberrypi.org/products/sense-hat/
https://www.raspberrypi.org/education/programmes/astro-pi/
- The Sense HAT has an 8×8 RGB LED matrix, a five-button joystick and includes the following sensors:
- Accelerometer
- Magnetometer
- Temperature
- Barometric pressure
- Humidity
- Gyroscope
- Also, there is a Python library providing easy access to everything on the board:
http://pythonhosted.org/sense-hat/
- HAT stands for “Hardware attached on top”. It is a hardware specification for add-on modules for the Raspberry Pi:
https://www.raspberrypi.org/blog/introducing-raspberry-pi-hats/
- To install Sense Hat on Raspberry Pi:

2 - Displaying text
- A basic exercise to check whether Sense Hat is working correctly:


3 - Measuring temperature, humidity and pressure
- Sense HAT has got built-in sensors for temperature, humidity and pressure:


- Giving execution permissions:

- Running the Python script:

- About the temperature readings it is important to notice that the Sense HAT sensor gets a little extra warm because of the heat generated by the Raspberry Pi module.