Giter Club home page Giter Club logo

bertha's Introduction

#Bertha

The Arduino microcontroller was named after Arduin of Ivrea. Arduin was an Italian king who lived over a millennium ago. His wife was Bertha of Burgundy and this library is named in her honor.

And what is this library? you might ask. Well, this library exposes the inner-workings of the Arduino to high-order programming languages. Sure, C is great and we can program the Arduino with it. But Ruby is more powerful, Java more ubiquitous, and C# more... uh... Microsofty. But most importantly, the hardware that these languages run on has more ready and sophisticated access to things like networking, video, and sound. Things that the Arduino can do if you buy more hardware but something like say... a Raspberry Pi can do just as easily.

##How It Works

A standard sketch is loaded on the Arduino that responds to commands sent over the serial port from a computer to the Arduino. These command will do things like set a pin to output, read the value of a pin, read an analog value, set the value of pin, etc. Each command will respond with an appropriate status for the command.

For example, using a simple terminal an exchange might look something like this:

version
OK version=1.0.0

setPin pin=12 mode=OUTPUT value=LOW
OK pin=12 mode=OUTPUT value=LOW

setPin pin=12 value=HIGH
OK pin=12 mode=OUTPUT value=HIGH

queryPin pin=12
OK pin=12 mode=OUTPUT value=HIGH

setPin pin=13 mode=INPUT
OK pin=13 mode=INPUT value=HIGH

queryPin pin=13
OK pin=13 mode=INPUT value=HIGH

With this protocol in place the second piece of Bertha shines. Out protocol is wrapped in an API for several of the more common and popular languages. Ruby is planned first and the API will look something like this.

Bertha.open <port> do |bertha|
  bertha.version     # returns 1.0.0
  bertha.pin_out 1
  bertha.pin_on 1
  bertha.pin_in 2
  bertha.pin 2       # returns true
end

Current the standard sketch is being developed and the protocol is totally subject to change. Once completed, however, gems, jars, and packages galore shall be build. Maybe you'll build some of them yourself?

bertha's People

Contributors

guyroyse avatar

Watchers

James Cloos avatar Brian Good avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.