Setting up and updating the Raspberry Pi

First, we will set up the circuit, as follows:

Now, we will make the following connections:

Source pin

Component pin

Raspberry Pi pin 1 - 3.3V

Breadboard + railing

Raspberry Pi pin 6 - Ground

Breadboard - railing

Raspberry Pi pin 3 - GPIO 2

Temperature sensor signal pin

Raspberry Pi pin 12 - GPIO 18

LED anode pin

LED cathode pin

Breadboard - railing

Temperature sensor + pin

Breadboard + railing

Temperature sensor - pin

Breadboard - railing

We have used a current limiting resistor of 220 ohms between pin 12/GPIO 18 and the anode of a LED pin.

Once this ...

Get Practical Internet of Things with JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.