Skip to content

Commit b96dd80

Browse files
update readme
1 parent 10640dc commit b96dd80

File tree

1 file changed

+70
-33
lines changed

1 file changed

+70
-33
lines changed

readme.md

Lines changed: 70 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#Firmata
22

3-
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.
3+
[![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/firmata/arduino?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
4+
5+
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.
46

57
##Usage
68

@@ -11,6 +13,7 @@ The second and more common model is to load a general purpose sketch called Stan
1113
##Firmata Client Libraries
1214
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:
1315

16+
1417
* procesing
1518
* [https://github.com/firmata/processing]
1619
* [http://funnel.cc]
@@ -28,80 +31,114 @@ Most of the time you will be interacting with arduino with a client library on t
2831
* [http://funnel.cc]
2932
* clojure
3033
* [https://github.com/nakkaya/clodiuno]
34+
* [https://github.com/peterschwarz/clj-firmata]
3135
* javascript
3236
* [https://github.com/jgautier/firmata]
3337
* [http://breakoutjs.com]
3438
* [https://github.com/rwldrn/johnny-five]
3539
* java
3640
* [https://github.com/4ntoine/Firmata]
3741
* [https://github.com/shigeodayo/Javarduino]
42+
* [https://github.com/kurbatov/firmata4j]
3843
* .NET
44+
* [https://github.com/SolidSoils/Arduino]
3945
* [http://www.imagitronics.org/projects/firmatanet/]
4046
* Flash/AS3
4147
* [http://funnel.cc]
4248
* [http://code.google.com/p/as3glue/]
4349
* PHP
4450
* [https://bitbucket.org/ThomasWeinert/carica-firmata]
51+
* [https://github.com/oasynnoum/phpmake_firmata]
4552
* Haskell
4653
* [http://hackage.haskell.org/package/hArduino]
4754
* iOS
4855
* [https://github.com/jacobrosenthal/iosfirmata]
56+
* Dart
57+
* [https://github.com/nfrancois/firmata]
4958

5059
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.
5160

5261
##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.
5463

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).*
5665

57-
```bash
58-
$ rm -r /Applications/Arduino.app/Contents/Resources/Java/libraries/Firmata
59-
$ git clone [email protected]:firmata/arduino.git /Applications/Arduino.app/Contents/Resources/Java/libraries/Firmata
60-
```
66+
###Mac OSX:
6167

62-
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.
6369

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.
6576

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).
6779

68-
update the path and arduino version as necessary
69-
```bash
70-
$ rm -r c:/Program\ Files/arduino/libraries/Firmata
71-
$ git clone [email protected]:firmata/arduino.git c:/Program\ Files/arduino/libraries/Firmata
72-
```
80+
###Windows:
81+
82+
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*
7388

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:
7590

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
106+
into an empty Firmata directory:
77107

78-
update the path and arduino version as necessary
79108
```bash
80-
$ rm -r ~/arduino/libraries/Firmata
81-
$ git clone [email protected]:firmata/arduino.git ~/arduino/libraries/Firmata
109+
$ rm -r /Applications/Arduino.app/Contents/Resources/Java/libraries/Firmata
110+
$ git clone [email protected]:firmata/arduino.git /Applications/Arduino.app/Contents/Resources/Java/libraries/Firmata
82111
```
83112

113+
*Update paths if you're using Windows or Linux*
114+
115+
To generate properly formatted versions of Firmata (for Arduino 1.0.x and Arduino 1.5.x), run the
116+
`release.sh` script.
117+
84118
<a name="contributing" />
85119
##Contributing
86120

87121
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).
88122

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.
90124

91125
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.
92126

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.
94128

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:
96130

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+
```
102143

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

Comments
 (0)