Part 1: Upgrading the NGW100's firmware
Following the directions on the NGW wiki upgrade the NGW with the build from here. This will insure that your NGW has the LED Framework and gpio-dev
Part 2: Lighting LEDs in C
Pick 8 I/O pins from J7 and hook them up to 8 LEDs on your breadboard (don't forget to install current limiting resistors). Write a script that will define these pins as outputs (see this article). Test your script by echoing some bit patterns to the lights to make sure they light. Write a C program that will allow you to let the user enter a light pattern on the console and then light the lights in that pattern.
Part 3: Reading switches in C
Once part 2 is complete, add the 8 position SPST DIP switch from the lab kit. Write a second script that will define the 8 outputs from part 2 and 8 inputs for the DIP switch. Test your definition. Write a C program that will read the switches and will light the corresponding LEDs.
As always submit your work to the FTP server as Lab 4 and in a text file write up a brief lab report of what took place and what you learned
Last updated 11/07/2008 - rvs