Version 5 of GSoC Idea: Tcl Binding to Firmata

Updated 2013-02-22 22:50:12 by pdt

Tcl Binding to Firmata

Areas (De)serialization, RPC, Remote control
Good if student knows Tcl, C
Priority Medium to Low
Difficulty Medium to Low
Benefits to the student
Benefits to Tcl Extend Tcl's glueing reach to hardware in general, the Arduino ecosystem in particular
Mentor ?
Related Project Ideas Possibly GSoC Idea: Common (De)Serialization Infrastructure

Project Description

Quoting the Firmata website:

... is a generic protocol for communicating with microcontrollers from software on a host computer.
It is intended to work with any host computer software package. Right now there is a matching object
in a number of languages. It is easy to add objects for other software to use this protocol.
Basically, this firmware establishes a protocol for talking to the Arduino from the host software.
The aim is to allow people to completely control the Arduino from software on the host computer.

The objective of this project is to create a Tcl binding to the protocol and library, so that Arduino can be controlled from Tcl scripts.

For inspiration, bindings for other languages (Python, Perl, ...) can be found at http://firmata.org/wiki/Download

Note: Given Tcl's builtin binary command it might be possible to write the binding purely in Tcl, although a C implementation is likely faster.

As there is likely some data (de)serialization component inside of the protocol it might be useful to coordinate with any student working on GSoC Idea: Common (De)Serialization Infrastructure and related projects.

Requirements:

  • ...
  • ...

For a Tcl Firmata Implementation see:

https://github.com/pdt/tfirmata

And in particuler see the examples directory.

It is a work in progress, but enough of it works to get/set digital/analog pins. I still need to do servos, I2C, some documentation, etc. I've been using it with an Arduino Uno, and also a bit with an Arduino Leonardo.

(1) Connect Arduino to PC (2) Start Arduino IDE (3) Program Arduino with StandardFirmata from Examples menu in Arduino IDE (4) Run Tcl scripts to control Arduino pins


AK - 2013-02-22 22:31:54

So I guess we should change the objective to complete this project ? Or should I fully retract the idea ?

Might be useful to get the firmata people to list your project on their download page. ... Wait, it looked like a wiki. You may be able to add it yourself there.

And to put it up here on our wiki also (Firmata page, Arduino page, others ...)


pdt I started this project late last year, and expect to have a complete Firmata implementation in a month or so. It's my current weekend Tcl project, so one weekend in the not too distant future, it will likely be finished. My intention is to update the Firmata Wiki page once it's complete. And I'll create a Tcl wiki page as well.

I guess if there is a Tcl Firmata implementation already in existence, and it works fine, then there may not be a huge incentive to write another one. Having said that, there are a couple of Python and a couple of Perl implementations referenced on the Firmata Wiki.