Menu

Home

Andrei Nagy

Overview:
Only digital inputs and outputs are supported for now. The board should be able to change output states and read inputs when requested.

The arduino sketch:
Starts with 9600 baud rate and prints a "setup() completed message".
The inputs and outputs are hardcoded in arrays and the commands are checked against it so that no accidents happen.
Listens for commands such as:
s#13:1 -- set pin number 13 to on.
g#13 -- get the state of pin number 13.
It replies to the commands such as:
"#13 = 1" -- pin 13 is on. This is the same result for a set or get command.
A line containing "ERROR" if an error has happened.

The python server:
Opens the arduino port and listens to html commands:
GET with "pin" parameter passes a get command (eg. g#13)
PUT with "pin" and "value" parameters passes a set command (eg. s#13:1)


Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.