2

I'm using Arduino: 1.6.7 (Mac OS X 10.11.3), Board: "Arduino Leonardo".

When I try to program my code, it works without problems. When I want to open the built-in Serial Monitor or Serial Plotter, it says "Board at /dev/cu.usbmodem1421 is not available".

The board is available and my simple code even works using "SerialTools" from Mac App Store. So there must be some problem with the Arduino IDE.

No serial related messages on dmesg. Comically it mounts and umounts my Boot OS X and Recovery HD partitions every time I unplug the Leonardo.

hfs: mounted Recovery HD on device disk0s3
hfs: unmount initiated on Recovery HD on device disk0s3 hfs: mounted
Boot OS X on device disk2s3 ioqueue_depth = 64,   ioscale = 2 hfs:
unmount initiated on Boot OS X on device disk2s3

Any ideas?

int inByte = 0;         // incoming serial byte

void setup() {

    // start serial port at 9600 bps:
  Serial.begin(9600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only
  }

}

void loop() {

  if (Serial.available() > 0) {
    inByte = Serial.read();
    Serial.println("Hi");
  }

}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.