Starting it out in many programming languages
You can open up Chapter 5 of your textbook, but you can also look at the the Chapter 5 companion site. Download all the programs from the GitHub site.
Connect to the chp05 directory.
Just to make sure you have to do a little modification of code,
connect your LED to pin 17 rather than pin 4.
(You might as well go ahead and connect a switch to pin 27. You
will need to do that later.)
Try out all the examples in the subdirectories of the
chp05 whose names end with
LED.
These are the ones mentioned in the textbook.
Keep them on your Pi for uploading.
A small extension in many programming languages
Within your chp05 directory create
a tar containing all the directories
with names ending in LED.
Now copy these LED directories into a new super-directory
called chp05AX.
Next connect a switch to pin 27.
Modify your programs in chp05X
so that the LED on pin 17 turns on only
when switch on pin 27 isn’t pressed.
Turning in
Upload a copy of your programs to Moodle. Be sure to use tar to create a single archive.
Node-RED
Documents
- Running on Raspberry Pi
- The organization
- Node RED Programming Guide
- Getting started with Node-Red
- Node.js
- MDN on JavaScript
Stuff to do
Turn an LED
- Off and on every couple of seconds
- On with a button
- On and then off with a button
- On with a TCP connection
- Of with a UDP message
- On and off with UDP according to the message
Also, try to figure out where your flows are saved.