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 barcli
.
As we code our photocell example, we'll note that there is no photocell object, so we're going to use the generic Sensor
object, as we did with the potentiometer.
As for outputting the data that we get from the sensor, we're going to use a handy utility called barcli to make our output much easier to read.