https://github.com/sourcebots/arduino-fw
Remotely control the pins on an Arduino
https://github.com/sourcebots/arduino-fw
arduino robot-firmware
Last synced: about 1 month ago
JSON representation
Remotely control the pins on an Arduino
- Host: GitHub
- URL: https://github.com/sourcebots/arduino-fw
- Owner: sourcebots
- License: other
- Created: 2017-07-22T15:17:42.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-08-06T07:35:56.000Z (over 1 year ago)
- Last Synced: 2024-08-06T09:33:18.164Z (over 1 year ago)
- Topics: arduino, robot-firmware
- Language: C++
- Homepage:
- Size: 131 KB
- Stars: 1
- Watchers: 4
- Forks: 2
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Arduino Firmware
The firmware for SourceBots' Arduino Uno board.
It communicates using commands sent over USB serial.
Commands consist of a string terminated by a newline character (\n).
Commands consist of multiple parts seperated by a colon character.
## Commands
| Command | Description | Parameters |
|-----------------------------------|------------------------------|------------------|
| PIN:\:MODE:GET? | Read pin mode | n = pin number |
| PIN:\:MODE:SET:\ | Set pin mode | n = pin number, value=INPUT/INPUT_PULLUP/OUTPUT|
| PIN:\:DIGITAL:GET? | Digital read pin | n = pin number |
| PIN:\:DIGITAL:SET:\ | Digital write pin | n = pin number, value = 1/0 |
| PIN:\:ANALOG:GET? | Analog read pin | n = pin number |
| ULTRASOUND:\:\:MEASURE?| Measure range from ultrasound| pulse = pulse pin, echo = echo pin |
## Example Commands
Set pin mode to input and analog read pin
```
PIN:14:MODE:SET:INPUT
PIN:14:ANALOG:GET?
```
Set pin to output and set it high
```
PIN:2:MODE:SET:OUTPUT
PIN:2:DIGITAL:SET:1
```