O'Reilly logo

Practical Internet of Things with JavaScript by Arvind Ravulavaru

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required