recentpopularlog in

driscoll : serial   30

NewSoftSerial | Arduiniana
What does this mean, exactly? Well, you have to use your serial devices serially, like this:

#include <NewSoftSerial.h>

// Here's a GPS device connect to pins 3 and 4
NewSoftSerial gps(4,3);

// A serial thermometer connected to 5 and 6
NewSoftSerial therm(6,5);

// An LCD connected to 7 and 8
NewSoftSerial LCD(8,7); // serial LCD

void loop()
// collect data from the GPS unit for a few seconds
read_gps_data(); // use gps as active device
// collect temperature data from thermometer
read_thermometer_data(); // now use therm
// LCD becomes the active device here
LCD.print("Data gathered...");
arduino  serial  software  hardware  code  programming  hacking  hack 
august 2012 by driscoll

Copy this bookmark:

to read