From a597f3f3ce79c38e0d41acb9591ed7ab2e22bb6a Mon Sep 17 00:00:00 2001 From: iperry Date: Sun, 10 Jan 2010 14:06:15 +0000 Subject: forgot to turn on the interrupt for usar3 git-svn-id: https://leaflabs.googlecode.com/svn/trunk/library@110 749a229e-a60e-11de-b98f-4500b42dc123 --- src/main.cpp | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index edd4fbb..78cdf13 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -4,28 +4,34 @@ #include "HardwareUsb.h" #include "usb.h" -//HardwareUsb USB; +HardwareUsb USB; int ledPin = 13; void setup() { pinMode(ledPin,OUTPUT); - Serial2.begin(9600); +// Serial2.begin(9600); Serial3.begin(9600); + Serial3.println("hello"); } volatile int toggle = 1; +char c; void loop() { digitalWrite(ledPin, toggle); toggle ^= 1; delay(500); // USB.print(millis()); +// Serial3.println("hello"); // USB.println("\r"); - Serial2.print(millis(), DEC); - Serial3.print(millis(), DEC); - Serial3.print(": "); -// Serial3.print(USB.available(), DEC); - Serial3.println(); +// Serial2.print(millis(), DEC); +// Serial2.print(": "); +// Serial2.print(USB.available(), DEC); +// Serial2.println(); + if (Serial3.available()){ + c = Serial3.read(); + Serial3.print(c); + } } int main(void) { -- cgit v1.2.3