Skip to content

ondrajz/ConfigurableFirmata

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#ConfigurableFirmata

Join the chat at https://gitter.im/firmata/ConfigurableFirmata

Firmata is a protocol for communicating with microcontrollers from software on a host computer. The protocol can be implemented in firmware on any microcontroller architecture as well as software on any host computer software package. The arduino repository described here is a Firmata library for Arduino and Arduino-compatible devices. If you would like to contribute to Firmata, please see the Contributing section below.

##Installation

  • If you are using Arduino IDE version 1.6.4 or higher go to Sketch > Include Library > Manage Libraries and then search for "ConfigurableFirmata" and click on Install after tapping on the ConfigurableFirmata item in the filtered results. You can also use this same method to update ConfigurableFirmata in the future.
  • If you are using an older version of the Arduino IDE, download or clone ConfigurableFirmata to your Arduino sketchbook library folder. This is typically /Documents/Arduino/libraries/ on Mac or Linux or \My Documents\Arduino\libraries\ on Windows.

##Usage

ConfigurableFirmata is a version of Firmata that breaks features such as Digital Input, Digital Output, Analog Input, Analog Output, I2C, etc into individual classes making it easier to mix and match standard features with custom features.

The easiest way to use ConfigurableFirmata is with firmatabuilder which is a simple web application that generates an Arduino sketch based on a selection of Firmata features. Download the generated sketch, compile and upload it to your board.

Another way to use ConfigurableFirmata is by adding or removing various include statements in the ConfigurableFirmata.ino example file.

##Firmata Wrapper Libraries

You can use the ConfigurableFirmata architecture to wrap 3rd party libraries to include functionality not included in the base ConfigurableFirmata.ino example. See FirmataEncoder for an example of a Firmata wrapper. To include a Firmata wrapper your ino file, you must install both the sketch and the 3rd party library into your /Arduino/libraries/ directory (where all 3rd party libraries are installed).

When creating a new Firmata wrapper library, you generally should not include the 3rd party library it wraps. For example, the Encoder library that FirmataEncoder wraps is not included with the FirmataEncoder library.

If you create a wrapper library, prepend the name with 'Firmata'. Hence 'FirmataEncoder' in the referenced example. This will keep the wrapper libraries together in the user's Arduino libraries directory.

A Firmata wrapper template library will be published soon along with instructions for creating a wrapper library.

##Firmata Client Libraries Only a few Firmata client libraries currently support ConfigurableFirmata:

Additional Firmata client libraries may work as well. If you're a client library developer and have verified that you library works with ConfigurableFirmata, please open an issue with a request to add the link.

##Contributing

If you discover a bug or would like to propose a new feature, please open a new issue.

To contribute, fork this repository and create a new topic branch for the bug, feature or other existing issue you are addressing. Submit the pull request against the master branch.

You must thoroughly test your contributed code. In your pull request, describe tests performed to ensure that no existing code is broken and that any changes maintain backwards compatibility with the existing api. Test on multiple Arduino board variants if possible. We hope to enable some form of automated (or at least semi-automated) testing in the future, but for now any tests will need to be executed manually by the contributor and reviewers.

Use Artistic Style (astyle) to format your code. Set the following rules for the astyle formatter:

style = ""
indent = "spaces"
indent-spaces = 2
indent-classes = true
indent-switches = true
indent-cases = true
indent-col1-comments = true
pad-oper = true
pad-header = true
keep-one-line-statements = true

If you happen to use Sublime Text, this astyle plugin is helpful. Set the above rules in the user settings file.

About

A plugin-based version of Firmata

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 83.8%
  • C 15.0%
  • Other 1.2%