aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.cpp
diff options
context:
space:
mode:
authoriperry <iperry@749a229e-a60e-11de-b98f-4500b42dc123>2010-01-10 13:22:52 +0000
committeriperry <iperry@749a229e-a60e-11de-b98f-4500b42dc123>2010-01-10 13:22:52 +0000
commitf1598e62ac2cdd4a6077aed6ca200743a4de59e5 (patch)
treee74a17764c8d726610e458f6ac2564f27c7e160b /src/main.cpp
parentc7163bee3581d3ef28dd2fc2ca81219dc52ad45e (diff)
downloadlibrambutan-f1598e62ac2cdd4a6077aed6ca200743a4de59e5.tar.gz
librambutan-f1598e62ac2cdd4a6077aed6ca200743a4de59e5.zip
enabled serial3
git-svn-id: https://leaflabs.googlecode.com/svn/trunk/library@109 749a229e-a60e-11de-b98f-4500b42dc123
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp22
1 files changed, 17 insertions, 5 deletions
diff --git a/src/main.cpp b/src/main.cpp
index b260bd0..edd4fbb 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1,19 +1,31 @@
#include "wiring.h"
#include "HardwareSerial.h"
#include "wiring_math.h"
+#include "HardwareUsb.h"
#include "usb.h"
+//HardwareUsb USB;
+
int ledPin = 13;
-int toggle=0;
void setup() {
pinMode(ledPin,OUTPUT);
+ Serial2.begin(9600);
+ Serial3.begin(9600);
}
+volatile int toggle = 1;
+
void loop() {
- digitalWrite(ledPin, HIGH);
- delay(1000);
- digitalWrite(ledPin,LOW);
- delay(1000);
+ digitalWrite(ledPin, toggle);
+ toggle ^= 1;
+ delay(500);
+// USB.print(millis());
+// USB.println("\r");
+ Serial2.print(millis(), DEC);
+ Serial3.print(millis(), DEC);
+ Serial3.print(": ");
+// Serial3.print(USB.available(), DEC);
+ Serial3.println();
}
int main(void) {