In this recipe, we are going to deploy Z-Spikes on a Raspberry Pi with a Sense HAT. The hardware itself is a fairly common development board and sensor setup for people learning about IoT. In fact, students can send their code to the International Space Station to be run on their Raspberry Pi and Sense HAT. If you do not have the equipment, there is an alternative code in the GitHub repository that simulates the device.
Once you have powered on your Raspberry Pi and attached your Sense HAT, you will need to install SciPy. In Python, you can usually install everything you need with pip, but in this case, you will need to install it through the Linux operating system. To do this, run the following commands in a terminal window:
sudo apt update
apt-cache show python3-scipy
sudo apt install -y python3-scipy
You will then need to pip install numpy, kafka, and sense_hat. You will also need to set up Kafka on a PC. There are instructions in Chapter 1, Setting up the IoT and...