14 | networking



build a wired &/or wireless network with at least two nodes





Change Node id to 1 & 2 for node boards

Code Anatomy

The main program runs:

1. get_char. This is searching on the for information from the computer. For arguments it takes the ports and pins and returns &chr. Function only stops running when a value for &chr is recieved.
2. flash (). This clears the port pins, delays100 ms. Then sets them again. When the pins are set it causes the LEDs to flash
3. enter if statement. If &chr matches the node id of the board. it changes the serial pin to output mode . Then calls put_string & put char to piece together the node x message and send it to the computer.
4. specific node LED is flashed
4. input(serial_direction, serial_pin_out) is called to but the node back into listening mode


Networking Through Light Pulses