Raspberry Pi Accessory: Sense HAT - Review

Table of contents

RoadTest: Raspberry Pi Accessory: Sense HAT

Author: jdlui

Creation date:

Evaluation Type: Independent Products

Did you receive all parts the manufacturer stated would be included in the package?: True

What other parts do you consider comparable to this product?: IMU sensors, Raspberry Pi 2, Arduino

What were the biggest problems encountered?: null

Detailed Review:

Hello element14

I am reviewing the Raspberry Pi 3 and SenseHAT module which I received from a roadtest.


The Raspberry Pi 3 is the newest in a line of ultra compact and economical computing hardware which has become synonymous with the maker and DIY movement. These lovely pieces of hardware have been used to create cheap and basic computing setups, prototypes for any electronic project, in-store display computers, and even prototype hardware in my biomedical engineering lab. As with all of the Pi family, it contains a processor, RAM, and peripherals required to make a compact yet full fledged computer. You can install a variety of Linux builds on it and quickly be off to the races. If you install one of the more popular operating systems, Raspian, you can hit the ground running with a Python IDE, basic office software, web browser, and tons of functionality. This particular Raspberry Pi 3 now has a few improvements over the Raspberry Pi 2: namely: built-in WiFi, bluetooth, 1.2 GHz quad core processor (up from a 900 Mhz), GPU at 400 MHz (up from 250 MHz), 1GB RAM at 900 MHz (up from a 1GB RAM 450MHz)


The SenseHAT is a nifty little add-on to the Raspberry Pi that easily connects on top of the Pi through the GPIO header pins and quickly gives out-of-the-box access to accelerometer, gyroscope, magnetometer, temperature, pressure, humidity, an 8x8 multicolor LED display, and a joystick. This is all backed up by a decently documented library of Python code that allows you to easily start accessing data and building some nice apps. Look here for the code: https://github.com/RPi-Distro/python-sense-hat/tree/master/sense_hat



Pi arrived in great condition, although the shipment appears to have been ripped open. Unclear if it was a customs inspection or an error during shipment preparation. The Pi arrives with its manual and senseHAT similarly.



Installation of the Operating System

Installing the Operating System goes off without a hitch. I installed the latest Raspian Jessie. Go to https://www.raspberrypi.org/downloads/raspbian/ and download the image. I recommend downloading the full size image, because Raspian Lite does not have a GUI, making it more difficult to use the Pi as a mini computer. Install Etcher, a great free software for loading an OS image to your SD card. Available here: https://etcher.io/.  Load the SD card with your image. Put the SD card in the Pi, connect to a keyboard, mouse and monitor, and boot up your system!





When you boot the Pi, you quickly are brought to an installation screen where you can fulling install Raspian to your Pi. Set a few options and the installation will quickly complete. Device should reboot and then you'll see your desktop!

Once you reach the desktop, you are now running a computer on a $35 piece of hardware. Incredible! Out of the box, you can open terminal and execute some python commands, and start building some code.

One side-note frustration I've encountered with WiFi enabled microcontrollers and mini computers: They rarely support EAP type connections like university and work wifi networks. This makes the device somewhat difficult to use in a school research lab without a lot of hacking, or using a hotspot on your phone. I've read of some workarounds but have  not had success with them yet.




I played around with a RPi3 for a little bit to test its speed and capability. You can easily open the Python IDE, build some scripts, execute, and surf the internet at the same time. The device is not blazingly fast by any standards, but it is incredible what a $35 piece of hardware can deliver. The RPi3 is a real quality piece of hardware and a quick economical way to setup a Linux box for your projects or work.


Networking and Remote Desktop

Once you get the Pi connected, you can quite easily configure remote access through VNC Viewer. This allows you to easily tunnel in and do some basic work, such as writing Python scripts. Note that you need to know the IP of your Pi, which is sometimes dynamic and changing. No detectable lag when using VNC to create Python scripts and control the Pi and senseHAT.




On to the main event: The SenseHAT




The SenseHAT is a multi feature piece of hardware that was created especially for the Astro-Pi mission, where Raspberry Pi units with the SenseHAT were flown to the International Space Station (ISS). They were operated by astronaut Tim Peak who executed science experiments which were coded into the Raspberry Pi by school children on Earth. The onboard IMU, display, and joystick allowed the students to design experiments to study the environment in space, and allowed Tim to setup and control the experiments. A real space-age application of the Raspberry Pi! You can read more here: https://astro-pi.org/about/mission/


For us Earth-bound folks, the senseHAT delivers the same compact functionalities in a convenient little shield that can fit right on top of the Raspberry Pi. It is compatible with all RPi models back to B+ and A+.


To run the senseHAT you need to install the sense-hat libraries but these were already installed in my version of Raspian stretch. If you install a leaner OS on your Pi you will probably need to run code such as

Sudo apt-get update

Sudo apt-get Install sense-hat


Raspberrypi.org provides some great guidance on getting your OS setup and getting sense-hat installed: https://www.raspberrypi.org/learning/getting-started-with-the-sense-hat/requirements/


Once you are up and running with senseHAT, you can access all sensor data by importing the sense_hat library into your Python script. There are a great set of instructions where you can get acquainted with the senseHAT command structure for reading from all the sensors: https://www.raspberrypi.org/learning/getting-started-with-the-sense-hat/worksheet/

Note that I did not find a manual which exhaustively lists the commands and data you can access; but I guess this can also be read by poring through the code on the github,  https://github.com/RPi-Distro/python-sense-hat/tree/master/sense_hat. Perhaps this was a design choice. The senseHAT and Astro-pi mission was marketed to get young kids interested in software. Those young kids are going to follow the getting started guides on rasperrypi.org and won't be reading a 80 page document explaining the senseHAT python library and command structure. Any tech-heads can check out the github anyways.


All examples worked out of the box for me, including several interesting and notable demos. In one demo, you can harness the accelerometer data to compute yaw, pitch, and roll data. Using this, you can rotate the Pi to manipulate a virtual 3D model of the Soyuz on your screen.



The tutorials are well written so that someone with minimal coding knowledge or sensor knowledge can understand how to harness the full power of the SenseHAT. The guides show you how to make the display tilt in response to tilting the Pi. It also challenges the reader to try some other ideas, such as using shake detection to trigger random rolling of dice.


Challenges with Pi and SenseHAT

One script that didn't work and might warrant further investigation is the compass script, which should light a pixel in the direction of magnetic north. These magnetometers however can be known to be quite fickle, and this may be a consequence of my test environment, or the quality of the magnetometer.


Another somewhat off-topic note: I decided I wanted to install OpenCV on the Pi and that was a real can of worms. Even with some great online guides (How to install OpenCV 3 on Raspbian Jessie - PyImageSearch ), I ran into a plethora of problems until I simply ran the command:


sudo apt-get install python-opencv

This finally got me rolling with a basic install of openCV. Not sure if this is full featured or if it will work with live video yet - since I don't have a Pi Camera! Hoping I'll score lucky on the Pi Camera roadtest!



I played with a few more apps and tutorials to learn how to more easily construct the "lighting patterns" that allow you to write custom letters on screen. I remember trying this a couple years ago on Arduino and having a few challenges, mainly because I was so new to embedded computing. I do believe the Python and senseHAT system greatly increases the learning speed because of the highly readable Python code and great software libraries (and great documentation). Out of the box, you can write a "hello world" on the sense hat with just three lines of code.

from sense_hat import SenseHat
sense = SenseHat()
sense.show_message('RPi with element14!!!')


While Arduino has its is place in embedded computing, I think Raspberry Pi SenseHAT is a real home run in making a all-in-one platform to get young minds engaged and started in computing. The faster compile and execution speed in Python makes a significant difference to an impatient learner who is trying to learn how to access various sensor components or trying to configure a light display. When I was learning Arduino code and frequently making mistakes, the 5-10 second upload times made me very impatient. In Python, code runs instantly, and it makes for a relaxing experience.



Using the great Raspberry Pi SenseHAT and Python documentation, I was able to create a basic app that displayed environmental conditions (pressure, temperature, and humidity). If you tilt the pi to a different orientation, it will display different environmental conditions.



In summary, the Raspberry Pi 3 is a new release of a popular hardware that many people know and love. The senseHAT is a real game changer for people who are new to electronics, hardware and software. With a Pi and a senseHAT you can start writing IOT apps and hope automation software that is quickly and easily implemented. No worrying about different sensors, wiring, pull up resistors, hardware libraries, messy wiring, soldering, etc. A real gem! I really recommend buying this for a young family member who is showing an interest in computing and software. They will be hooked!




Parents Comment Children
No Data