switch to setup for Arduino Boards Manager

This commit is contained in:
Erik Tylek Kettenburg
2015-06-23 12:42:35 -07:00
parent bc55c9bb45
commit 6ca6b114d5
3581 changed files with 93 additions and 51 deletions

View File

@@ -0,0 +1,22 @@
#include <DigiCDC.h>
void setup() {
// initialize the digital pin as an output.
SerialUSB.begin();
pinMode(1,OUTPUT);
}
// the loop routine runs over and over again forever:
void loop() {
//turns led on and off based on sending 0 or 1 from serial terminal
if (SerialUSB.available()) {
char input = SerialUSB.read();
if(input == '0')
digitalWrite(1,LOW);
else if(input == '1')
digitalWrite(1,HIGH);
}
SerialUSB.delay(100); // keep usb alive // can alos use SerialUSB.refresh();
}

View File

@@ -0,0 +1,21 @@
#include <DigiCDC.h>
void setup() {
// initialize the digital pin as an output.
SerialUSB.begin();
}
// the loop routine runs over and over again forever:
void loop() {
if (SerialUSB.available()) {
SerialUSB.write(SerialUSB.read());
}
//SerialUSB.delay(10);
/*
if you don't call a SerialUSB function (write, print, read, available, etc)
every 10ms or less then you must throw in some SerialUSB.refresh();
for the USB to keep alive - also replace your delays - ie. delay(100);
with SerialUSB.delays ie. SerialUSB.delay(100);
*/
}

View File

@@ -0,0 +1,25 @@
#include <DigiCDC.h>
void setup() {
// initialize the digital pin as an output.
SerialUSB.begin();
/*
remember the SerialUSB starts as soon as you call begin
and doesn't restart the board when you open the serial monitor
(like the uno does) - so if you print to it and you don't
have a serial monitor open that text is lost.
*/
}
// the loop routine runs over and over again forever:
void loop() {
SerialUSB.println(F("TEST!")); //wrap your strings in F() to save ram!
//SerialUSB.delay(10);
/*
if you don't call a SerialUSB function (write, print, read, available, etc)
every 10ms or less then you must throw in some SerialUSB.refresh();
for the USB to keep alive - also replace your delays - ie. delay(100);
with SerialUSB.delays ie. SerialUSB.delay(100);
*/
}