Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // from BBB.io and some book, "Programming the BeagleBone Black."
- const b = require('bonescript');
- const bulb = "P9_30";
- b.pinMode(bulb, b.OUTPUT);
- var state = 0;
- function toggleBulb() {
- state = state ^ 1;
- b.digitalWrite(bulb, state);
- }
- setInterval(toggleBulb, 5000);
- console.log("Blinking on and off on the BBGW!");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement