Minor additions to example sketches for Arduino 101 compatibilitymain
| @@ -4,6 +4,9 @@ | |||
| const int SDchipSelect = 4; // Audio Shield has SD card CS on pin 10 | |||
| const int FlashChipSelect = 6; // digital pin for flash chip CS pin | |||
| // Uncomment this line if using the built-in SPI Flash device | |||
| // on an Arduino 101 board | |||
| //const int FlashChipSelect = 21; | |||
| void setup() { | |||
| //uncomment these if using Teensy audio shield | |||
| @@ -15,6 +18,8 @@ void setup() { | |||
| //pinMode(4, INPUT_PULLUP); | |||
| //pinMode(10, INPUT_PULLUP); | |||
| Serial.begin(9600); | |||
| // wait up to 10 seconds for Arduino Serial Monitor | |||
| unsigned long startMillis = millis(); | |||
| while (!Serial && (millis() - startMillis < 10000)) ; | |||
| @@ -83,6 +83,9 @@ | |||
| #define MISO 12 | |||
| #define SCK 14 | |||
| #define CSPIN 6 | |||
| // Uncomment this line if using the built-in SPI Flash device | |||
| // on an Arduino 101 board | |||
| //#define CSPIN 21 | |||
| void setup(){ | |||
| Serial.begin(9600); //Teensy serial is always at full USB speed and buffered... the baud rate here is required but ignored | |||
| @@ -2,6 +2,9 @@ | |||
| #include <SPI.h> | |||
| const int FlashChipSelect = 6; // digital pin for flash chip CS pin | |||
| // Uncomment this line if using the built-in SPI Flash device | |||
| // on an Arduino 101 board | |||
| //const int FlashChipSelect = 21; | |||
| SerialFlashFile file; | |||
| @@ -17,6 +20,8 @@ void setup() { | |||
| //pinMode(4, INPUT_PULLUP); | |||
| //pinMode(10, INPUT_PULLUP); | |||
| Serial.begin(9600); | |||
| // wait up to 10 seconds for Arduino Serial Monitor | |||
| unsigned long startMillis = millis(); | |||
| while (!Serial && (millis() - startMillis < 10000)) ; | |||
| @@ -2,6 +2,9 @@ | |||
| #include <SPI.h> | |||
| const int FlashChipSelect = 6; // digital pin for flash chip CS pin | |||
| // Uncomment this line if using the built-in SPI Flash device | |||
| // on an Arduino 101 board | |||
| //const int FlashChipSelect = 21; | |||
| void setup() { | |||
| //uncomment these if using Teensy audio shield | |||
| @@ -13,6 +16,8 @@ void setup() { | |||
| //pinMode(4, INPUT_PULLUP); | |||
| //pinMode(10, INPUT_PULLUP); | |||
| Serial.begin(9600); | |||
| // wait for Arduino Serial Monitor | |||
| while (!Serial) ; | |||
| delay(100); | |||
| @@ -27,8 +27,12 @@ AudioConnection patchCord3(mixer1, dac1); | |||
| #define PROP_AMP_ENABLE 5 | |||
| #define FLASH_CHIP_SELECT 6 | |||
| // Uncomment this line if using the built-in SPI Flash device | |||
| // on an Arduino 101 board | |||
| //#define FLASH_CHIP_SELECT 21 | |||
| void setup() { | |||
| Serial.begin(9600); | |||
| AudioMemory(8); //4 | |||
| delay(2000); | |||
| @@ -22,6 +22,9 @@ | |||
| #include <SPI.h> | |||
| const int FlashChipSelect = 6; // digital pin for flash chip CS pin | |||
| // Uncomment this line if using the built-in SPI Flash device | |||
| // on an Arduino 101 board | |||
| //const int FlashChipSelect = 21; | |||
| SerialFlashFile file; | |||
| @@ -38,6 +41,8 @@ void setup() { | |||
| //pinMode(4, INPUT_PULLUP); | |||
| //pinMode(10, INPUT_PULLUP); | |||
| Serial.begin(9600); | |||
| while (!Serial) ; | |||
| delay(100); | |||