Created
November 10, 2025 13:56
-
-
Save salvatorecapolupo/e8dc06d8d72914541ec3e0550c0bac26 to your computer and use it in GitHub Desktop.
Uso del terminale di comando per controllare led di Arduino UNO. comando ls /dev/ e script bash per controllarlo da interfaccia USB
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| PORT="/dev/cu.usbmodem12301" # <— porta corretta per macOS | |
| BAUD=9600 | |
| stty -f $PORT $BAUD -echo -icanon | |
| echo "Connessione a $PORT aperta (baud: $BAUD)" | |
| echo "Scrivi un carattere e premi Invio (CTRL+C per uscire)" | |
| while true; do | |
| read -p "> " input | |
| echo "$input" > $PORT | |
| cat $PORT & | |
| sleep 0.5 | |
| kill $! 2>/dev/null | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment