Now, we'll build a couple of projects that demonstrate how to use more advanced sensors: a photocell and a temperature sensor. We'll learn how specialized Johnny-Five
Sensor objects allow us to make these easier to use, and how to play with inputs in the REPL and show some input data in the console using a module called
First, we'll start with the photocell—see the following wiring diagram:
Note that the resistor setup is how we wire up a sensor with only two leads and we need three—input, power, and ground.
As we ...