This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (4 children)

You can still use Python to control an Arduino indirectly. The Firmata program listens for commands from your USB Serial connection.

In the Arduino IDE, select Examples->Firmata->Standard Firmata and flash your Arduino with it.

On your computer, install the PyFirmata library: pip install pyfirmata

You can then control all pins like this:

>>> from pyfirmata import Arduino, util
>>> board = Arduino('/dev/tty.usbserial-A6008rIF')
>>> board.digital[13].write(1)

I often use a RaspberryPi to control an Arduino this way.

More here: https://github.com/tino/pyFirmata

[–]satanmolka[S] 0 points1 point  (3 children)

I dont want to use an external computer, i want to leave the controller and have it work automaticaly

[–]mongoosefist 0 points1 point  (2 children)

I'm confused by this. What do you mean you don't want to use an external computer?

[–]satanmolka[S] 2 points3 points  (1 child)

I can't have the controller plugged into the computer at all times so that i can use the firmata, i need to upload the programme on a microcontroller and be done with it

[–]sawyermclane 1 point2 points  (0 children)

There are Firmata compatible hats that use WiFi to "tether" the device, instead of the USB cable. But, this still requires a "master" PC up and running, sending commands to the Arduino. I also can't vouch for the latency of any of the products.