Embedded Programming
1. Read a microcontroller data sheet.
2. Program your board to do something, in as many different programming languages as possible. You must modify the example code / create a program of your own design in order to pass.
2. Program your board to do something, in as many different programming languages as possible. You must modify the example code / create a program of your own design in order to pass.
Barduino
I made a Barduino (Fab Arduino Clone) using Luciano's instructions. And then proceeded to program it, firstly using a basic Blink arduino script, then Neil Gershenfeld's `hello.ftdi.44.echo.c` and finally using Ruby and Javascript.
Ruby
I used the dino gem github which uses custom code on the arduino that can interface with ruby scripts.
require 'dino' board = Dino::Board.new(Dino::TxRx.new) led = Dino::Components::Led.new(pin: 13, board: board) [:on, :off].cycle do |switch| led.send(switch) puts switch sleep 1 end
Javascript
To write code with Javascript I installed the node npm module duino github. This works in a similar way to the ruby dino gem, you upload custom C code to the arduino and then interface with it over serial.
var arduino = require('duino'), board = new arduino.Board(); var led = new arduino.Led({ board: board, pin: 13 }); led.blink();