You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Firmata is a protocol for communicating with microcontrollers from software on a host computer. The [protocol](http://firmata.org/wiki/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. See the [firmata wiki](http://firmata.org/wiki/Main_Page) for additional informataion. If you would like to contribute to Firmata, please see the [Contributing](#contributing) section below.
Firmata is a protocol for communicating with microcontrollers from software on a host computer. The [protocol](https://github.com/firmata/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](#contributing) section below.
4
6
5
7
##Usage
6
8
@@ -11,6 +13,7 @@ The second and more common model is to load a general purpose sketch called Stan
11
13
##Firmata Client Libraries
12
14
Most of the time you will be interacting with arduino with a client library on the host computers. Several Firmata client libraries have been implemented in a variety of popular programming languages:
Note: The above libraries may support various versions of the Firmata protocol and therefore may not support all features of the latest Firmata spec nor all arduino and arduino-compatible boards. Refer to the respective projects for details.
51
60
52
61
##Updating Firmata in the Arduino IDE
53
-
The version of firmata in the Arduino IDE contains an outdated version of Firmata. To update Firmata, clone the repo into the location of firmata in the arduino IDE or download the latest [tagged version](https://github.com/firmata/arduino/tags) (stable), rename the folder to "Firmata" and replace the existing Firmata folder in your Ardino application.
62
+
The version of firmata in the Arduino IDE contains an outdated version of Firmata. To update Firmata, download the latest [Configurable Firmata release](https://github.com/firmata/arduino/releases) (for Arduino 1.0.x or Arduino 1.5.6 or higher) and replace the existing Firmata folder in your Arduino application. See the instructions below for your platform.
54
63
55
-
**Mac OSX**:
64
+
*Note that Arduino 1.5.0 - 1.5.5 are not supported. Please use Arduino 1.5.6 or higher (or Arduino 1.0.5 or 1.0.6).*
If you are downloading the latest tagged version of Firmata, rename it to "Firmata" and copy to /Applications/Arduino.app/Contents/Resources/Java/libraries/ overwriting the existing Firmata directory. Right-click (or conrol + click) on the Arduino application and choose "Show Package Contents" and navigate to the libraries directory.
68
+
The Firmata library is contained within the Arduino package.
63
69
64
-
**Windows**:
70
+
1. Navigate to the Arduino application
71
+
2. Right click on the application icon and select `Show Package Contents`
72
+
3. Navigate to: `/Contents/Resources/Java/libraries/` and replace the existing
73
+
`Firmata` folder with latest [ConfigurableFirmata release](https://github.com/firmata/arduino/releases) (note there is a different download
74
+
for Arduino 1.0.x vs 1.5.x)
75
+
4. Restart the Arduino application and the latest version of Firmata will be available.
65
76
66
-
Using the Git Shell application installed with [GitHub for Windows](http://windows.github.com/) (set default shell in options to Git Bash) or other command line based git tool:
77
+
If you are using the Java 7 version of Arduino 1.5.7 or higher, the file path
78
+
will differ slightly: `Contents/Java/libraries/Firmata` (no Resources directory).
1. Navigate to `c:/Program\ Files/arduino-1.x/libraries/` and replace the existing
83
+
`Firmata` folder with the latest [ConfigurableFirmata release](https://github.com/firmata/arduino/releases) (note there is a different download
84
+
for Arduino 1.0.x vs 1.5.x).
85
+
2. Restart the Arduino application and the latest version of Firmata will be available.
86
+
87
+
*Update the path and arduino version as necessary*
73
88
74
-
Note: If you use GitHub for Windows, you must clone the firmata/arduino repository using the Git Shell application as described above. You can use the Github for Windows GUI only after you have cloned the repository. Drag the Firmata file into the Github for Windows GUI to track it.
89
+
###Linux:
75
90
76
-
**Linux**:
91
+
1. Navigate to `~/arduino-1.x/libraries/` and replace the existing
92
+
`Firmata` folder with the latest [ConfigurableFirmata release](https://github.com/firmata/arduino/releases) (note there is a different download
93
+
for Arduino 1.0.x vs 1.5.x).
94
+
2. Restart the Arduino application and the latest version of Firmata will be available.
95
+
96
+
*Update the path and arduino version as necessary*
97
+
98
+
###Using the Source code rather than release archive
99
+
100
+
Clone this repo directly into the core Arduino libraries directory. If you are using
101
+
Arduino 1.5.x, the repo directory structure will not match the Arduino
102
+
library format, however it should still compile as long as you are using Arduino 1.5.7
103
+
or higher.
104
+
105
+
You will first need to remove the existing Firmata library, then clone firmata/arduino
To generate properly formatted versions of Firmata (for Arduino 1.0.x and Arduino 1.5.x), run the
116
+
`release.sh` script.
117
+
84
118
<aname="contributing" />
85
119
##Contributing
86
120
87
121
If you discover a bug or would like to propose a new feature, please open a new [issue](https://github.com/firmata/arduino/issues?sort=created&state=open). Due to the limited memory of standard Arduino boards we cannot add every requested feature to StandardFirmata. Requests to add new features to StandardFirmata will be evaluated by the Firmata developers. However it is still possible to add new features to other Firmata implementations (Firmata is a protocol whereas StandardFirmata is just one of many possible implementations).
88
122
89
-
To contribute, fork this respository and create a new topic branch for the bug, feature or other existing issue you are addressing. Submit the pull request against the *dev* branch. If you are contributing a feature for configurable firmata, submit the pull request against the *configurable_dev* branch.
123
+
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.
90
124
91
125
If you would like to contribute but don't have a specific bugfix or new feature to contribute, you can take on an existing issue, see issues labeled "pull-request-encouraged". Add a comment to the issue to express your intent to begin work and/or to get any additional information about the issue.
92
126
93
-
You must thorougly 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 reviewsers.
127
+
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.
94
128
95
-
Maintain the existing code style:
129
+
Use [Artistic Style](http://astyle.sourceforge.net/) (astyle) to format your code. Set the following rules for the astyle formatter:
96
130
97
-
- Indentation is 2 spaces
98
-
- Use spaces instead of tabs
99
-
- Use camel case for both private and public properties and methods
100
-
- Document functions (specific doc style is TBD... for now just be sure to document)
101
-
- Insert first block bracket on line following the function definition:
131
+
```
132
+
style = ""
133
+
indent-spaces = 2
134
+
indent-classes = true
135
+
indent-switches = true
136
+
indent-cases = true
137
+
indent-col1-comments = true
138
+
attach-inlines = true
139
+
pad-oper = true
140
+
pad-header = true
141
+
keep-one-line-statements = true
142
+
```
102
143
103
-
<pre>void someFunction()
104
-
{
105
-
// do something
106
-
}
107
-
</pre>
144
+
If you happen to use Sublime Text, [this astyle plugin](https://github.com/timonwong/SublimeAStyleFormatter) is helpful. Set the above rules in the user settings file.
0 commit comments