error sending serial data from arduino to processing

edited May 2017 in Arduino

Hi there,

I am trying to convert serial data from an ultra sonic sensor to trigger .wav files using this code below, but i keep getting dev/cu. Bluetooth incoming port /dev/cu.usbmedom1411 /dev/tty.Bluetoth-Incoming port /dev/tty.usbmodem1411 coming up in the console...

Ive tested the sensor is working in arduino, but im not geting anything in processing... there are no error warnings, just that message in the console...

How do i select the usb port /dev/cu.usbmodem1411???????

thankyou.

(https://forum.processing.org/two/uploads/imageupload/853/KPAV1DIO0KHL.jpg "Screen Shot 2017-05-13 at 7.43.52 pm")

Answers

  • Try to print out your list of serial ports in the setup function print(Serial.list()); After that you should be able to figure out which one is /dev/cu.usbmodem1411 and then set that (also in setup):

    String portName = Serial.list()[0]; //Change 0 to the number of /dev/cu.usbmodem1411
     myPort = new Serial(this, portName, 9600);
    
Sign In or Register to comment.