Added serial IO to main loop for testing Cisco serial console work

This commit is contained in:
Mike C 2013-03-28 22:36:44 -04:00
parent 9c34d4ceaf
commit 7fcd7de8c4

View file

@ -113,9 +113,24 @@ void setup() {
// Setup defaults // Setup defaults
setDefaults(); setDefaults();
Serial.begin(9600);
Serial1.begin(9600);
} }
void loop() { void loop() {
// read from port 1, send to port 0:
if (Serial1.available()) {
int inByte = Serial1.read();
Serial.write(inByte);
}
// read from port 0, send to port 1:
if (Serial.available()) {
int inByte = Serial.read();
Serial1.write(inByte);
}
xAxis=map(analogRead(xpin), 0, 1023, 0, 10); xAxis=map(analogRead(xpin), 0, 1023, 0, 10);
yAxis=map(analogRead(ypin), 0, 1023, 0, 10); yAxis=map(analogRead(ypin), 0, 1023, 0, 10);
@ -155,3 +170,5 @@ void loop() {
} }
} }