An open API service indexing awesome lists of open source software.

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

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
```