Hello there, I created a the link Code: sudo ln -sf /dev/ttymxc3 /dev/ttyS0 Then, I wrote In Debian Code: #!/usr/bin/python import time import serial import commands arduino = serial.Serial('/dev/ttyS0', 9600) print("Hablando con Duino") while True: comando = 'H' #Input arduino.write(comando) #Mandar un comando hacia Arduino if comando == 'H': print('LED ENCENDIDO') elif comando == 'L': print('LED APAGADO') break arduino.close() #Finalizamos la comunicacion time.sleep(4) #output=commands.getoutput('sh /usr/bin/foto') In Arduino Code: int comedero = 3; int piloto = 13; void setup() { pinMode(comedero,OUTPUT); pinMode(piloto,OUTPUT); Serial.begin(9600); } void loop () { if (Serial.available()) { char c = Serial.read(); if (c == 'H') { digitalWrite(comedero, HIGH); delay(3000); digitalWrite(comedero, LOW); } if (c == 'W') { digitalWrite(piloto, HIGH); } if (c == 'S') { digitalWrite(piloto, LOW); } } digitalWrite(comedero, LOW); } But the LED i've put on the pin 3 of the UDOO doesn't go high, but it does when I upload the blink (changing pin 13 of the example to the 3 pin)
The communication channel between Arduino and ubuntu or else , in udoo, is the serial port /dev/ttymxc3
then in java or python you have to implement one or two threads to syncronized the communication and to close the port when you exit the application , otherwise you will have the serial port busy and not available for other application such as Arduino