Hello,
I'am using my Arduino for a while now, but yesterday I tried to use serial communiction to send commands from my macbook to my Arduino. To test the communication I used the Physical Pixel example but is doesn't work.
I've set the 'serialport' at the 'tools' menu right, uploaded the example the the board, but I cant switch on the LED.
Today I have tested the code below, but the only thing I received in the monitor where some crazy characters.
const int ledPin = 13; // the pin that the LED is attached to
int incomingByte; // a variable to read incoming serial data into
void setup() {
// initialize serial communication:
Serial.begin(9600);
// initialize the LED pin as an output:
pinMode(ledPin, OUTPUT);
digitalWrite(ledPin, HIGH);
delay(300);
digitalWrite(ledPin, LOW);
delay(300);
digitalWrite(ledPin, HIGH);
delay(300);
digitalWrite(ledPin, LOW);
}
void loop() {
incomingByte = Serial.read();
Serial.print(incomingByte);
}
Anybody with a solution?