Menu

Post image 1
Post image 2
Post image 3
1 / 3
0

Introducing Rubyduino, a Ruby to Arduino UNO compiler based on Matz's Spinel!

DEV Community·Joseph Schito·25 days ago
#F62J2A1v
Reading 0:00
15s threshold

Rubyduino compiles Ruby sketches for Arduino boards and uploads the generated firmware. Under the hood it uses Spinel , a Matz's Ruby AOT compiler, vendored at a pinned revision. How it works? Rubyduino adds a small Arduino runtime on top of that C code. Functions like digital_write , delay_ms , analog_read , serial_print , and pulse_in are mapped to small AVR C functions that talk directly to the Arduino UNO hardware registers. After that, the normal AVR toolchain takes over: Ruby sketch Spinel turns it into C Rubyduino adds the Arduino UNO runtime avr-gcc compiles it into firmware avrdude uploads it to the board So the Arduino is not interpreting Ruby. It is running compiled AVR machine code that started life as Ruby. It doesn't use Firmata or RAD... this is something new!…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More