The beginning – including libraries and creating our board object

This section sets the stage for us by bringing in the Johnny-Five. The following code snippet tells it we're using a Raspberry Pi, and constructs the appropriate board objects. If you're using other npm modules, like the color module we used in Chapter 3, Building Interactive Projects with RGB LED, you'd use require to bring them in here as well, as shown:


const five =
require("johnny-five")
const Raspi = require("raspi-io")

let board = new five.board({
io: new Raspi()
})

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.149.249.174