My first post here, so apologies if this is too much or too little info!
I've recently purchased a leostick but I'm having trouble getting the serial port(s) to work from a sketch. Probably something simple I've overlooked, but some help would be appreciated.
* The leostick has v1.1 on the board and I use the "Freetronics LeoStick V1.0" profile to program through the arduino programmer.
* I am able to upload various sketches to blink the various on-board LEDs
* I can only upload a new sketch by resetting the stick and uploading during the 7s bootloader run
* I'm using a MacBook Pro with OS X 10.7.5
* Following this post viewtopic.php?f=29&t=753 I found setting the board to Leonardo failed to upload the sketch.
* I tried replacing the
Code: Select all
while (!Serial) { ; }
Code: Select all
delay(8000);
* Serial data lights don't blink when expected
* I've tried using both
Code: Select all
Serial
Code: Select all
Serial1
This is the baseline test sketch I am using. Each time I tweak the sketch I can verify it is the new one running by changing the LED that blinks:
Code: Select all
/*
Blink
Turns on an LED on for one second, then off for one second, repeatedly.
This example code is in the public domain.
*/
// Pin 13 has an LED connected on most Arduino boards.
// give it a name:
int led = 10;
// the setup routine runs once when you press reset:
void setup() {
// initialize the digital pin as an output.
pinMode(led, OUTPUT);
Serial.begin(57600);
delay(8000);
}
// the loop routine runs over and over again forever:
void loop() {
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
Serial.println("Hello World");
}