864s | issue with arduino

userHead anonymous 2019-09-12 16:33:17 7972 Views10 Replies
Hello,
my hardware & os:

18.04.3 LTS (Bionic Beaver) running with:
Linux WKALPHA 4.15.0-62-generic #69-Ubuntu SMP Wed Sep 4 20:55:53 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
sudo lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 2341:8036 Arduino SA Leonardo (CDC ACM, HID)
Bus 001 Device 003: ID 04e2:1410 Exar Corp. XR21V1410 USB-UART IC
Bus 001 Device 002: ID 05e3:0608 Genesys Logic, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
dmesg | grep -i arduino
[ 3.083828] usb 1-9: Product: Arduino Leonardo
[ 3.083829] usb 1-9: Manufacturer: Arduino LLC
After running python script with pyfirmata:

Code: Select all

#!/usr/bin/env python2 import sys import time from pyfirmata import Arduino, util board = Arduino('/dev/ttyACM0') board.digital[5].write(0) time.sleep(0.4) board.digital[5].write(1) my arduino is missing from lsub:
sudo lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Moreover I can't run again my script due to not available/dev/ttyACM0.
arduino-arduinoide.desktop[13384]: Board at /dev/ttyACM0 is not available
or somtimes:
ModemManager[650]: <warn> Could not grab port (tty/ttyACM0): 'Cannot add port 'tty/ttyACM0', unhandled serial type'
arduino-arduinoide.desktop[18293]: Caused by: processing.app.SerialException: Error touching serial port '/dev/ttyACM0'.
How can I avoid such errors?