Duino Cloud. Have arduino talk to a local webserver over serial.
pyserial arduino software arduino board (developed with duemilanove) 1 LED Flask
pip install pyserial pip instal flask
Download arduino software from the Arduino Homepage.
Connect an LED to pin13 on the arduino. This is used to denote activity on the arduino.
Open your arduino IDE and load the sketch called:
The file will be in the directory (folder) you downloaded this repo to. Check your Downloads directory just in case.
Verify and compile the sketch. Upload it to the arduino.
Run the python file called main.py on the command prompt (or terminal if in Linux/Mac) by typing:
Copy or make note of the ip address that will appear on the command prompt. It should be something like this:
If you have anything running on port 5000 this will have issues. Change settings accordingly. If you have issued, refer to the flask documents here.
Open your web browser and type in the ip address. You should see the message "Hello World" appear on screen.
This was developed using Windows 7.
The USB port settings on your machine could be different from mine. If you have issues communicating with the arduino open the file named main.py.
Modify this line:
SER = serial.Serial('COM3', 9600)
Change the part that says COM3 to whatever your setting is. Linux users use a different serial port naming scheme that Windows users.