Compare commits

..

69 Commits

Author SHA1 Message Date
Erik Tylek Kettenburg
111396ffe5 Merge pull request #51 from per1234/output-recipes
Add output recipes
2017-08-29 16:49:34 -07:00
per1234
d208cb7669 Add output recipes
These recipes are required to support **Sketch > Export compiled
Binary**. See:

https://github.com/arduino/Arduino/blob/1.8.1/hardware/arduino/avr/platform.txt#L74-L76

https://github.com/arduino/Arduino/blob/1.8.1/hardware/arduino/sam/platform.txt#L86-L88
2017-01-19 14:21:39 -08:00
Erik Tylek Kettenburg
684c36af77 Merge pull request #36 from SukkoPera/master
Switch to Arduino-compliant EEPROM library
2016-06-13 21:12:32 -07:00
SukkoPera
d457051fd4 Switch to Arduino-compliant EEPROM library 2016-06-04 15:21:46 +02:00
Erik Kettenburg
b9a79d8b2e add eeprom library explicitly 2016-05-16 17:19:02 -07:00
Erik Tylek Kettenburg
7841eb24ff Merge pull request #31 from nfriedly/patch-1
formatting improvements to RGB example
2016-03-29 10:09:55 -07:00
Nathan Friedly
f402493d27 formatting improvements to RGB example
White space-only changes to fix indentation and general consistency withing example
2016-03-29 10:59:10 -04:00
Erik Tylek Kettenburg
41c25785db Merge pull request #30 from vlee489/master
Updates DigiKeyboard.h to add arrows keys.
2016-03-07 17:25:05 -08:00
Vincent Lee
2b684b9034 Updates DigiKeyboard.h to add arrows keys.
Signed-off-by: Vincent Lee <vlee489@users.noreply.github.com>
2016-03-07 18:59:06 +00:00
Erik Kettenburg
280b22b652 fix executables, add proper 64 bit version of launcher 2016-02-13 11:11:30 -08:00
Erik Kettenburg
822a2e4f55 update spi, fix lcd error 2016-02-12 19:09:37 -08:00
Erik Tylek Kettenburg
2c40bcdd6f Merge pull request #18 from eelmasllari/master
added functionality to send keypresses, i.e. a press without release
2016-02-12 18:31:49 -08:00
Erik Tylek Kettenburg
af7c58d1e5 Update pins_arduino.h 2016-02-12 11:12:01 -08:00
Erik Tylek Kettenburg
ab01715320 Update pins_arduino.h 2016-02-12 11:11:35 -08:00
Erik Tylek Kettenburg
c16eb3cf70 Update pins_arduino.h 2016-02-12 11:11:03 -08:00
Erik Tylek Kettenburg
40be695f81 Add __AVR_ATtiny85__ to satisfy some libraries 2016-02-12 11:09:12 -08:00
Erik Tylek Kettenburg
fbd4d79324 Merge pull request #24 from e-moe/feature/platform.txt-update
{build.path}/{archive_file} is now {archive_file_path}
2016-02-12 11:03:44 -08:00
Erik Tylek Kettenburg
92260e2acd Merge pull request #25 from e-moe/fix/LiquidCrystal_I2C
fix #if defined checks - Thanks @e-moe - merging for todays release
2016-02-12 11:03:13 -08:00
Erik Tylek Kettenburg
badec8f822 Merge pull request #28 from per1234/dummy-example-headers
Add dummy .h files to Digispark_Examples and DigiXBetaBonus folders
2016-02-12 11:01:48 -08:00
per1234
0d4830288d Add dummy .h files to Digispark_Examples and DigiXBetaBonus folders
In Arduino IDE 1.6.6 and 1.6.7 these are considered invalid libraries
without a header file and this causes a warning whenever a Digispark
board is selected from the Tools > Board menu or Boards Manager or
Library Manager is opened with a Digispark board selected and the
sketches don't appear in the File > Example menu.
2016-02-04 02:35:46 -08:00
Nikolay Labinskiy
3577e4a637 fix #if defined checks 2016-01-31 21:54:05 +02:00
Nikolay Labinskiy
eed2ff45ba {build.path}/{archive_file} is now {archive_file_path} 2016-01-31 18:42:00 +02:00
Factor Sixty
6844d32b06 added functionality to send keypresses, i.e. just a press-and-hold, without release.
sendKeyStroke sends the release automatically, which creates a problem when you want to use the repeating key functionality of your OS.
2016-01-16 14:12:45 +01:00
Erik Tylek Kettenburg
bd916e2eea Merge pull request #11 from mpflaga/master
TCCR0B not initialized in DigisparkRGB example
2015-10-10 02:14:52 -07:00
Erik Tylek Kettenburg
4a1f9c7ac5 Merge pull request #8 from awenisko/patch-1
Update wiring.h
2015-10-10 02:14:31 -07:00
Erik Tylek Kettenburg
836e363726 Merge pull request #9 from awenisko/patch-2
Update wiring_digital.c
2015-10-10 02:13:12 -07:00
Michael P. Flaga
2de159b44d TCCR0B not initialized in DigisparkRGB example 2015-10-05 13:20:42 -04:00
awenisko
7533853c57 Update wiring_digital.c
Implemented INPUT_PULLUP digital pin mode.
2015-09-03 18:32:28 +02:00
awenisko
7d52a0cfb9 Update wiring.h
Defined INPUT_PULLUP mode.
2015-09-03 18:30:06 +02:00
Erik Tylek Kettenburg
60edebc52b Merge pull request #7 from SoundGuy/patch-1
fixed bug that prevented this from compiling
2015-08-13 22:20:08 -07:00
Oded Sharon
008b95382b fixed bug that prevented this from compiling
added const to line 273 to prescalers
2015-08-11 11:41:40 +03:00
Erik Tylek Kettenburg
528559488d updated with windows drivers and installer 2015-06-25 14:49:02 -07:00
Erik Tylek Kettenburg
487b621a89 add drivers to windows 2015-06-24 16:13:07 -07:00
Erik Tylek Kettenburg
2f8eec51b4 fix to stop warning in 1.6.5+ 2015-06-24 15:55:28 -07:00
Erik Tylek Kettenburg
aeb7af566f fixes for BM compat 2015-06-24 14:40:30 -07:00
Erik Tylek Kettenburg
8810516130 add avrdude dummy back in as launcher 2015-06-23 20:30:23 -07:00
Erik Tylek Kettenburg
92c97e3b2b updated to latest arduino version with transaction support 2015-06-23 14:10:48 -07:00
Erik Tylek Kettenburg
4e2f6ffa1c updated to latest adafruit version 2015-06-23 14:08:14 -07:00
Erik Tylek Kettenburg
68ad726f9b add pro support 2015-06-23 13:39:23 -07:00
Erik Tylek Kettenburg
6ca6b114d5 switch to setup for Arduino Boards Manager 2015-06-23 12:42:35 -07:00
Erik Tylek Kettenburg
bc55c9bb45 Merge branch 'master' of https://github.com/digistump/DigistumpArduino 2015-01-19 21:06:27 -08:00
Erik Tylek Kettenburg
32573857c0 Changes from @defragster for OLED 2015-01-19 21:05:37 -08:00
Erik Tylek Kettenburg
df42601d87 Up to release C 2015-01-16 17:48:34 -08:00
Erik Tylek Kettenburg
6e29ad8d17 digicdc speed up! thanks @defragster 2015-01-15 14:43:55 -08:00
Erik Tylek Kettenburg
7f0e4124e0 Update DigiCDC.h 2015-01-14 21:40:28 -08:00
Erik Tylek Kettenburg
a83f085330 Update DigiCDC.cpp
make delay configurable
2015-01-14 21:39:48 -08:00
Erik Tylek Kettenburg
d56454e098 remove old oled library 2015-01-14 18:09:15 -08:00
Erik Tylek Kettenburg
52f444d221 Add OLED library - update tiny wire libraries - add support for all PWM channels and PWM on pin 8 2015-01-14 18:08:45 -08:00
Erik Tylek Kettenburg
fb93846380 pwm fix - add 9dof example 2015-01-12 18:23:47 -08:00
Erik Tylek Kettenburg
02c36dfd60 add special Pro pwm functions 2015-01-12 15:16:52 -08:00
Erik Tylek Kettenburg
ae86668681 fix for basic robot example 2015-01-07 17:52:32 -08:00
Erik Tylek Kettenburg
d8e0256a91 Add more examples - fix robot example 2015-01-07 17:48:49 -08:00
Erik Tylek Kettenburg
f92e829acd update cdc example 2015-01-06 14:34:47 -08:00
Erik Tylek Kettenburg
a9864c18e8 mouse and cdc fixes 2015-01-06 14:27:24 -08:00
Erik Tylek Kettenburg
56dda1007d add new.h/cpp 2015-01-03 14:29:04 -08:00
Erik Tylek Kettenburg
e09b5f479b added updated tinypinchange and associated libraries to support PRO 2014-12-23 13:07:19 -08:00
Erik Tylek Kettenburg
d5fa60a1ec change folder names, remove duplicate DigiJoystick folder 2014-12-23 12:32:26 -08:00
Erik Tylek Kettenburg
1fd5034261 fixes for usb and 1.5.8 - DigiUSB and DigiJostick libs 2014-12-23 12:24:28 -08:00
Erik Tylek Kettenburg
48053b678c Fix for 1.5.8 2014-12-23 12:12:46 -08:00
Erik Tylek Kettenburg
c9c6354e5e Delete DigiKeyboard.h.old 2014-12-23 12:11:54 -08:00
Erik Tylek Kettenburg
3a65e107c1 Add Digispark Pro to MCUs using tinywirem 2014-12-23 01:12:50 -08:00
Erik Tylek Kettenburg
80a8414444 Update pins_arduino.h 2014-12-23 00:53:40 -08:00
Erik Tylek Kettenburg
887be86cd5 Update pins_arduino.h 2014-12-23 00:53:24 -08:00
Erik Tylek Kettenburg
9d3fff43c0 fix pin change interrupts 2014-12-23 00:53:09 -08:00
Erik Tylek Kettenburg
9d7d91d80b Update README.md 2014-12-21 14:04:31 -08:00
Erik Tylek Kettenburg
e654e59a54 Merge branch 'master' of https://github.com/digistump/DigistumpArduino 2014-12-20 21:02:52 -08:00
Erik Tylek Kettenburg
6c75499202 add linux binaries 2014-12-20 21:02:16 -08:00
Erik Tylek Kettenburg
58157e2dc1 Update README.md 2014-12-20 18:38:22 -08:00
Erik Tylek Kettenburg
536d3a90b4 Update README.md 2014-12-20 13:24:30 -08:00
3656 changed files with 10045 additions and 13299 deletions

View File

@ -1,19 +1,23 @@
DigistumpArduino
================
Files to add Digistump support (Digispark, Pro, DigiX) to Arduino 1.5.X (1.5.7+)
Files to add Digistump support (Digispark, Pro, DigiX) to Arduino 1.6.X (1.6.4+)
**These files are designed for install via the Arduino Boards Manager:**
**Binary downloads of the bundled IDE can be found here:** https://github.com/digistump/DigistumpArduino/releases/tag/v1.5.8A
Board manager URL: http://digistump.com/package_digistump_index.json
To manually install:
**Full Install Instructions:**
Place digistump folder inside the Arduino /hardware folder.
Digispark: http://digistump.com/wiki/digispark/tutorials/connecting
To compile tools for other platforms or from scratch use:
Digispark Pro: http://digistump.com/wiki/digispark/tutorials/connectingpro
DigiX: http://digistump.com/wiki/digix/tutorials/software
**To compile:**
Micronucleus is the only executable in these packages that is pre-compiled:
Micronucleus: https://github.com/micronucleus/micronucleus/tree/80419704f68bf0783c5de63a6a4b9d89b45235c7
AVR-Dummy: https://github.com/digistump/avr-dummy
ld from a more recent install of avr-gcc then Arduino uses
Dependencies: libusb and possibly lib32stdc on linux - (on ubuntu get it by issuing: apt-get install lib32stdc++6)

View File

@ -63,3 +63,45 @@ digispark-pro64.build.variant=pro64buffer
digispark-pro64.upload.wait_for_upload_port = false
digispark-pro64.upload.use_1200bps_touch = false
digispark-pro64.upload.disable_flushing = false
digispark-tiny16.name=Digispark (16mhz - No USB)
digispark-tiny16.upload.using=micronucleusprog
digispark-tiny16.upload.protocol=usb
digispark-tiny16.upload.tool=micronucleus
digispark-tiny16.upload.maximum_size=6012
digispark-tiny16.build.mcu=attiny85
digispark-tiny16.build.f_cpu=16000000L
digispark-tiny16.build.board=AVR_DIGISPARK
digispark-tiny16.build.core=tiny
digispark-tiny16.build.variant=digispark
digispark-tiny16.upload.wait_for_upload_port = false
digispark-tiny16.upload.use_1200bps_touch = false
digispark-tiny16.upload.disable_flushing = false
digispark-tiny8.name=Digispark (8mhz - No USB)
digispark-tiny8.upload.using=micronucleusprog
digispark-tiny8.upload.protocol=usb
digispark-tiny8.upload.tool=micronucleus
digispark-tiny8.upload.maximum_size=6012
digispark-tiny8.build.mcu=attiny85
digispark-tiny8.build.f_cpu=8000000L
digispark-tiny8.build.board=AVR_DIGISPARK
digispark-tiny8.build.core=tiny
digispark-tiny8.build.variant=digispark
digispark-tiny8.upload.wait_for_upload_port = false
digispark-tiny8.upload.use_1200bps_touch = false
digispark-tiny8.upload.disable_flushing = false
digispark-tiny1.name=Digispark (1mhz - No USB)
digispark-tiny1.upload.using=micronucleusprog
digispark-tiny1.upload.protocol=usb
digispark-tiny1.upload.tool=micronucleus
digispark-tiny1.upload.maximum_size=6012
digispark-tiny1.build.mcu=attiny85
digispark-tiny1.build.f_cpu=1000000L
digispark-tiny1.build.board=AVR_DIGISPARK
digispark-tiny1.build.core=tiny
digispark-tiny1.build.variant=digispark
digispark-tiny1.upload.wait_for_upload_port = false
digispark-tiny1.upload.use_1200bps_touch = false
digispark-tiny1.upload.disable_flushing = false

View File

@ -103,6 +103,11 @@ int digitalRead(uint8_t);
int analogRead(uint8_t);
void analogReference(uint8_t mode);
void analogWrite(uint8_t, int);
void pwmWrite(uint8_t, int);
void pwmConnect(uint8_t);
void pwmDisconnect(uint8_t);
void pwmReset(void);
unsigned long millis(void);
unsigned long micros(void);
@ -160,6 +165,9 @@ extern const uint8_t PROGMEM digital_pin_to_timer_PGM[];
#define TIMER1B 4
#define TIMER1D 5
#define CHANNELA 3 //TIMER1A
#define CHANNELB 4 //TIMER1B
#include "pins_arduino.h"
#ifndef USE_SOFTWARE_SERIAL

View File

@ -45,6 +45,8 @@ void analogReference(uint8_t mode)
analog_reference = mode;
}
int analogRead(uint8_t pin)
{
#if defined( NUM_DIGITAL_PINS )
@ -83,6 +85,80 @@ int analogRead(uint8_t pin)
return LOW;
#endif
}
void pwmReset()
{
cbi(TCCR1D, OC1AV);
cbi(TCCR1D, OC1AU);
cbi(TCCR1D, OC1AW);
cbi(TCCR1D, OC1AX);
cbi(TCCR1D, OC1BV);
cbi(TCCR1D, OC1BU);
cbi(TCCR1D, OC1BW);
cbi(TCCR1D, OC1BX);
}
void pwmWrite(uint8_t channel, int val)
{
if( channel == TIMER1A){
// connect pwm to pin on timer 1, channel A
sbi(TCCR1A, COM1A1);
sbi(TCCR1A, WGM10);
cbi(TCCR1A, COM1A0);
sbi(TCCR1B, WGM10);
sbi(TCCR1B, CS11);
//sbi(TCCR1B, CS10);
OCR1A = val; // set pwm duty
} else if( channel == TIMER1B){
// connect pwm to pin on timer 1, channel B
sbi(TCCR1A, COM1B1);
sbi(TCCR1A, WGM10);
cbi(TCCR1A, COM1B0);
sbi(TCCR1B, WGM10);
sbi(TCCR1B, CS11);
//sbi(TCCR1B, CS10);
OCR1B = val; // set pwm duty
}
}
void pwmConnect(uint8_t pin)
{
pinMode(pin,OUTPUT);
if(pin == 2)
sbi(TCCR1D, OC1AV);
else if(pin == 0)
sbi(TCCR1D, OC1AU);
// cbi(TCCR1D, OC1AW);//used by crystal
else if(pin == 3)
sbi(TCCR1D, OC1AX);
else if(pin == 4)
sbi(TCCR1D, OC1BV);
else if(pin == 1)
sbi(TCCR1D, OC1BU);
// cbi(TCCR1D, OC1BW);//used by crystal
// sbi(TCCR1D, OC1BX);//reset pin
}
void pwmDisconnect(uint8_t pin)
{
pinMode(pin,OUTPUT);
if(pin == 2)
cbi(TCCR1D, OC1AV);
else if(pin == 0)
cbi(TCCR1D, OC1AU);
// cbi(TCCR1D, OC1AW);//used by crystal
else if(pin == 3)
cbi(TCCR1D, OC1AX);
else if(pin == 4)
cbi(TCCR1D, OC1BV);
else if(pin == 1)
cbi(TCCR1D, OC1BU);
// cbi(TCCR1D, OC1BW);//used by crystal
// cbi(TCCR1D, OC1BX);//reset pin
}
// Right now, PWM output only works on the pins with
// hardware support. These are defined in the appropriate
// pins_*.c file. For the rest of the pins, we default
@ -109,15 +185,15 @@ void analogWrite(uint8_t pin, int val)
uint8_t timer = digitalPinToTimer(pin);
/*
if( timer == TIMER0B){
// connect pwm to pin on timer 0, channel B
sbi(TCCR0A, COM0B1);
cbi(TCCR0A, COM0B0);
OCR0B = val; // set pwm duty
} else
*/
if( timer == TIMER0A){
// connect pwm to pin 8 on timer 0, channel A
sbi(TCCR0A, COM0A1);
cbi(TCCR0A, COM0A0);
sbi(TCCR0A, WGM01);
sbi(TCCR0A, WGM00);
OCR0A = val; // set pwm duty
} else
if( timer == TIMER1A){
// connect pwm to pin on timer 1, channel A
@ -129,10 +205,19 @@ void analogWrite(uint8_t pin, int val)
//sbi(TCCR1B, CS10);
cbi(TCCR1D, OC1AV);
sbi(TCCR1D, OC1AU);
cbi(TCCR1D, OC1AU);
cbi(TCCR1D, OC1AW);
cbi(TCCR1D, OC1AX);
if(pin == 2)
sbi(TCCR1D, OC1AV);
else if(pin == 0)
sbi(TCCR1D, OC1AU);
else if(pin == 3)
sbi(TCCR1D, OC1AX);
OCR1A = val; // set pwm duty
} else
@ -150,16 +235,17 @@ void analogWrite(uint8_t pin, int val)
//sbi(TCCR1B, CS10);
cbi(TCCR1D, OC1BV);
sbi(TCCR1D, OC1BU);
cbi(TCCR1D, OC1BU);
cbi(TCCR1D, OC1BW);
cbi(TCCR1D, OC1BX);
if(pin == 4)
sbi(TCCR1D, OC1BV);
else if(pin == 1)
sbi(TCCR1D, OC1BU);
OCR1B = val; // set pwm duty
} else
{
if (val < 128)
{

View File

@ -0,0 +1,18 @@
#include <new.h>
void * operator new(size_t size)
{
return malloc(size);
}
void operator delete(void * ptr)
{
free(ptr);
}
int __cxa_guard_acquire(__guard *g) {return !*(char *)(g);};
void __cxa_guard_release (__guard *g) {*(char *)g = 1;};
void __cxa_guard_abort (__guard *) {};
void __cxa_pure_virtual(void) {};

View File

@ -0,0 +1,22 @@
/* Header to define new/delete operators as they aren't provided by avr-gcc by default
Taken from http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=59453
*/
#ifndef NEW_H
#define NEW_H
#include <stdlib.h>
void * operator new(size_t size);
void operator delete(void * ptr);
__extension__ typedef int __guard __attribute__((mode (__DI__)));
extern "C" int __cxa_guard_acquire(__guard *);
extern "C" void __cxa_guard_release (__guard *);
extern "C" void __cxa_guard_abort (__guard *);
extern "C" void __cxa_pure_virtual(void);
#endif

View File

@ -43,6 +43,7 @@ extern "C"{
#define INPUT 0x0
#define OUTPUT 0x1
#define INPUT_PULLUP 0x2
#define true 0x1
#define false 0x0

View File

@ -35,21 +35,28 @@ void pinMode(uint8_t pin, uint8_t mode)
{
uint8_t bit = digitalPinToBitMask(pin);
uint8_t port = digitalPinToPort(pin);
volatile uint8_t *reg;
volatile uint8_t *reg, *out;
if (port == NOT_A_PIN) return;
// JWS: can I let the optimizer do this?
reg = portModeRegister(port);
out = portOutputRegister(port);
if (mode == INPUT) {
uint8_t oldSREG = SREG;
cli();
cli();
*reg &= ~bit;
SREG = oldSREG;
} else if (mode == INPUT_PULLUP) {
uint8_t oldSREG = SREG;
cli();
*reg &= ~bit;
*out |= bit;
SREG = oldSREG;
} else {
uint8_t oldSREG = SREG;
cli();
cli();
*reg |= bit;
SREG = oldSREG;
}

View File

@ -17,7 +17,6 @@ and Digistump LLC (digistump.com)
uchar sendEmptyFrame;
static uchar intr3Status; /* used to control interrupt endpoint transmissions */
DigiCDCDevice::DigiCDCDevice(void){}
@ -40,23 +39,30 @@ void DigiCDCDevice::flush(){
void DigiCDCDevice::begin(){
usbBegin();
DigiCDCDevice::delay(500);//delay to allow enumeration and such
}
size_t DigiCDCDevice::write(uint8_t chr)
size_t DigiCDCDevice::write(uint8_t c)
{
if(RingBuffer_IsFull(&txBuf))
{
refresh();
return 0;
}
else
{
RingBuffer_Insert(&txBuf,chr);
RingBuffer_Insert(&txBuf,c);
DigiCDCDevice::delay(5); //gives 4.2-4.7ms per character for usb transfer at low speed
return 1;
}
}
int DigiCDCDevice::available()
{
refresh();
return RingBuffer_GetCount(&rxBuf);
}
@ -64,12 +70,15 @@ int DigiCDCDevice::read()
{
if(RingBuffer_IsEmpty(&rxBuf))
{
refresh();
return 0;
}
else
{
refresh();
return RingBuffer_Remove(&rxBuf);
}
}
int DigiCDCDevice::peek()
@ -82,22 +91,21 @@ int DigiCDCDevice::peek()
{
return RingBuffer_Peek(&rxBuf);
}
refresh();
}
void DigiCDCDevice::task(void)
{
usbPollWrapper();
refresh();
}
void DigiCDCDevice::refresh(void)
{
_delay_ms(1);
usbPollWrapper();
}
@ -112,7 +120,7 @@ void DigiCDCDevice::end(void)
}
DigiCDCDevice::operator bool() {
usbPollWrapper();
refresh();
return true;
}

View File

@ -47,10 +47,6 @@ class DigiCDCDevice : public Stream {
virtual int read(void);
virtual void flush(void);
virtual size_t write(uint8_t);
inline size_t write(unsigned long n) { return write((uint8_t)n); }
inline size_t write(long n) { return write((uint8_t)n); }
inline size_t write(unsigned int n) { return write((uint8_t)n); }
inline size_t write(int n) { return write((uint8_t)n); }
using Print::write;
operator bool();
private:

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);
*/
}

Some files were not shown because too many files have changed in this diff Show More