Like Arduino for example :
In essence it turns your Arduino device into a slave with a simple provided sketch. Then using the python/or any other language you can interface the Arduino via Serial bus and exposed API provided by the Firmata system
- Install arduino IDE
- Add dialup group to user `
sudo adduser $USER dialout
` - Upload Firmata to arduino
- File -> Examples -> Firmata -> StandardFirmata
- Install python library
- sudo pip install pyfirmata
- Write some code
code example to turn on output 13 (build-in led)
from pyfirmata import Arduino, util board = Arduino('/dev/ttyACM0') board.digital[13].write(1)
No comments:
Post a Comment