In this workshop we will use the Raspberry Pi computer to get data from the real world using digital sensors. Raspberry Pi is a small factor personal computer that is great for experimentation and schools. It runs on linux operating system and the most interesting feature that it has is the 40 pins that allows us to connect it with sensors, leds, buzzers, motors and other modules.

In our example we want to connect a sensor that detects fire to the Raspberry Pi and program the computer to give off allarms whenever there is a dangerous fire inside our spaceship.
The sensor we are going to use has 4 pins that we can utilize to connect to the computer. The VCC pin is connected to a power source (5 volts), and the GND pin is connected to ground, creating an electronic circuit that power ups the sensor. There are two more pins. One is labeled DOUT and sends a high signal whenever fire is detected and a low signal if there is no fire. The AOUT pin can send analog data (how intense or how close is the fire). We can adjust the sensitivity of the sensor with a screwdriver using the screw terminal.

Our experiment


Then we are going to create a program using Scratch Desktop that warns our space crew if there is a fire on the spaceship.
