https://github.com/josephschito/rubyduino
Rubyduino compiles Ruby code for Arduino UNO boards and uploads the generated firmware.
https://github.com/josephschito/rubyduino
arduino artoo rad ruby
Last synced: 7 days ago
JSON representation
Rubyduino compiles Ruby code for Arduino UNO boards and uploads the generated firmware.
- Host: GitHub
- URL: https://github.com/josephschito/rubyduino
- Owner: josephschito
- License: mit
- Created: 2026-05-08T11:42:53.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2026-05-08T14:37:08.000Z (about 1 month ago)
- Last Synced: 2026-05-08T14:37:57.802Z (about 1 month ago)
- Topics: arduino, artoo, rad, ruby
- Language: Ruby
- Homepage: https://github.com/josephschito/rubyduino
- Size: 14.6 KB
- Stars: 3
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Rubyduino

Rubyduino compiles Ruby sketches for Arduino boards and uploads the generated firmware.
Under the hood it uses [Spinel](https://github.com/matz/spinel), a Ruby AOT compiler, vendored at a pinned revision.
## Example

```ruby
pin_mode(ArduinoUNO::LED_BUILTIN, ArduinoUNO::OUTPUT)
loop do
digital_write(ArduinoUNO::LED_BUILTIN, ArduinoUNO::HIGH)
delay_ms(100)
digital_write(ArduinoUNO::LED_BUILTIN, ArduinoUNO::LOW)
delay_ms(100)
end
```
Not bad, huh?
## Installation
```bash
gem install rubyduino
```
The command expects the AVR toolchain to be available in `PATH`, including `avr-gcc`, `avr-objcopy`, and `avrdude`.
On macOS, install the AVR tools with Homebrew:
```bash
brew tap osx-cross/avr
brew install avr-gcc avrdude
```
On Debian/Ubuntu:
```bash
sudo apt install gcc-avr avr-libc avrdude
```
On Fedora:
```bash
sudo dnf install avr-gcc avr-libc avrdude
```
## Usage
```bash
rubyduino examples/hello.rb
```
Pass a serial port explicitly when auto-detection is not enough:
```bash
rubyduino -p /dev/cu.usbmodem11401 examples/hello.rb
```
## License
MIT