Skip to content

Commit 2329b73

Browse files
bump version to 2.4 and update documentation
1 parent 5dfed8d commit 2329b73

File tree

6 files changed

+76
-40
lines changed

6 files changed

+76
-40
lines changed

Firmata.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Firmata.cpp - Firmata library v2.4.0 - 2014-11-01
2+
Firmata.cpp - Firmata library v2.4.0 - 2014-12-21
33
Copyright (C) 2006-2008 Hans-Christoph Steiner. All rights reserved.
44
55
This library is free software; you can redistribute it and/or

Firmata.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Firmata.h - Firmata library v2.4.0 - 2014-11-01
2+
Firmata.h - Firmata library v2.4.0 - 2014-12-21
33
Copyright (C) 2006-2008 Hans-Christoph Steiner. All rights reserved.
44
55
This library is free software; you can redistribute it and/or

extras/revisions.txt

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
1-
FIRMATA 2.4.0 BETA - not yet released
1+
FIRMATA 2.4.0 - Dec 21, 2014
2+
3+
**Changes from 2.3.6 to 2.4 that may impact existing Firmata client implementations:**
4+
* When sending a string from the client application to the board (STRING_DATA) a
5+
static buffer is now used for the incoming string in place of a dynamically allocated
6+
block of memory (see Firmata.cpp lines 181 - 205). In Firmata 2.3.6 and older,
7+
the dynamically allocated block was never freed, causing a memory leak. If your
8+
client library had freed this memory in the string callback method, that code
9+
will break in Firmata 2.4. If the string data needs to persist beyond the string
10+
callback, it should be copied within the string callback.
11+
* As of Firmata 2.4, when digital port reporting or analog pin reporting is enabled,
12+
the value of the port (digital) or pin (analog) is immediately sent back to the client
13+
application. This will likely not have a negative impact on existing client
14+
implementations, but may be unexpected. This feature was added to better support
15+
non-serial streams (such as Ethernet, Wi-Fi, Bluetooth, etc) that may lose
16+
connectivity and need a quick way to get the current state of the pins upon
17+
reestablishing a connection.
218

319
[core library]
420
* Changed sendValueAsTwo7bitBytes, startSysex and endSysex from private to
@@ -11,10 +27,10 @@ FIRMATA 2.4.0 BETA - not yet released
1127
* Fixed IS_PIN_SPI ifndef condition in boards.h
1228
* Added constants to Firmata.h to reserve configurable firmata features
1329
* Fixed issue where firmwareName was not reported correctly in Windows
14-
* Ensure incomming String via STRING_DATA command is null-terminated
30+
* Ensure incoming String via STRING_DATA command is null-terminated
1531
* Fixed memory leak when receiving String via STRING_DATA command
1632
(note this change may break existing code if you were manually deallocating
17-
the incomming string in your string callback function. See code for details)
33+
the incoming string in your string callback function. See code for details)
1834
* Added ability for user to specify a filename when calling setFirmwareNameAndVersion
1935
* Increased input data buffer size from 32 to 64 bytes
2036

@@ -39,7 +55,7 @@ FIRMATA 2.4.0 BETA - not yet released
3955
FIRMATA 2.3.6 - Jun 18, 2013 (Version included with Arduino core libraries)
4056

4157
[core library]
42-
* Fixed bug introduced in 2.3.5 that broke ability to use ethernet.
58+
* Fixed bug introduced in 2.3.5 that broke ability to use Ethernet.
4359

4460
FIRMATA 2.3.5 - May 21, 2013
4561

@@ -56,7 +72,7 @@ FIRMATA 2.3.5 - May 21, 2013
5672
FIRMATA 2.3.4 - Feb 11, 2013
5773

5874
[core library]
59-
* Fixed Stream implementation so Firmata can be used with Streams other than
75+
* Fixed Stream implementation so Firmata can be used with Streams other than
6076
Serial (Norbert Truchsess)
6177

6278
FIRMATA 2.3.3 - Oct 6, 2012
@@ -72,7 +88,7 @@ FIRMATA 2.3.3 - Oct 6, 2012
7288
FIRMATA 2.3.0 - 2.3.2
7389

7490
* Removed angle from servo config
75-
* Changed file extentions from .pde to .ino
91+
* Changed file extensions from .pde to .ino
7692
* Added MEGA2560 to Boards.h
7793
* Added I2C pins to Boards.h
7894
* Modified examples to be compatible with Arduino 0022 and 1.0 or greater
@@ -92,7 +108,7 @@ FIRMATA 2.1
92108

93109
FIRMATA 2.0
94110

95-
* changed to 8-bit port-based digital messages to mioor ports from previous 14-bit ports modeled after the standard Arduino board.
111+
* changed to 8-bit port-based digital messages to mirror ports from previous 14-bit ports modeled after the standard Arduino board.
96112
* switched order of version message so major version is reported first
97113

98114
FIRMATA 1.0

readme.md

Lines changed: 48 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,18 @@ Most of the time you will be interacting with arduino with a client library on t
2424
* perl
2525
* [https://github.com/ntruchsess/perl-firmata]
2626
* [https://github.com/rcaputo/rx-firmata]
27-
* ruby
27+
* ruby
2828
* [https://github.com/hardbap/firmata]
2929
* [https://github.com/PlasticLizard/rufinol]
3030
* [http://funnel.cc]
3131
* clojure
3232
* [https://github.com/nakkaya/clodiuno]
3333
* [https://github.com/peterschwarz/clj-firmata]
34-
* javascript
34+
* javascript
3535
* [https://github.com/jgautier/firmata]
3636
* [http://breakoutjs.com]
3737
* [https://github.com/rwldrn/johnny-five]
38-
* java
38+
* java
3939
* [https://github.com/4ntoine/Firmata]
4040
* [https://github.com/shigeodayo/Javarduino]
4141
* [https://github.com/kurbatov/firmata4j]
@@ -58,55 +58,75 @@ Most of the time you will be interacting with arduino with a client library on t
5858
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.
5959

6060
##Updating Firmata in the Arduino IDE
61-
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 Arduino application.
61+
The version of firmata in the Arduino IDE contains an outdated version of Firmata. To update Firmata, download the latest [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.
6262

63-
**Mac OSX**:
63+
*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).*
6464

65-
```bash
66-
$ rm -r /Applications/Arduino.app/Contents/Resources/Java/libraries/Firmata
67-
$ git clone [email protected]:firmata/arduino.git /Applications/Arduino.app/Contents/Resources/Java/libraries/Firmata
68-
```
65+
###Mac OSX:
6966

70-
Note that the library path in the Java 7 version Arduino 1.5.7 for OS X has changed to:
71-
```
72-
/Applications/Arduino.app/Contents/Java/libraries/Firmata
73-
```
67+
The Firmata library is contained within the Arduino package.
68+
1. Navigate to the Arduino application
69+
2. Right click on the application icon and select `Show Package Contents`
70+
3. Navigate to: `/Contents/Resources/Java/libraries/` and replace the existing
71+
`Firmata` folder with latest Firmata release (note there is a different download
72+
for Arduino 1.0.x vs 1.5.x)
73+
4. Restart the Arduino application and the latest version of Firmata will be available.
7474

75-
If you are downloading the latest tagged version of Firmata, rename it to "Firmata" and copy to /Applications/Arduino.app/Contents/Resources/Java/libraries/ (note the special case for the Java 7 version of Arduino 1.5.7 above) 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.
75+
If you are using the Java 7 version of Arduino 1.5.7 or higher, the file path
76+
will differ slightly: `Contents/Java/libraries/Firmata` (no Resources directory).
7677

77-
**Windows**:
78+
###Windows:
7879

79-
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:
80+
Update the path and arduino version as necessary
81+
1. Navigate to `c:/Program\ Files/arduino-1.x/libraries/` and replace the existing
82+
`Firmata` folder with the latest Firmata release (note there is a different download
83+
for Arduino 1.0.x vs 1.5.x).
84+
2. Restart the Arduino application and the latest version of Firmata will be available.
8085

81-
update the path and arduino version as necessary
82-
```bash
83-
$ rm -r c:/Program\ Files/arduino-1.x/libraries/Firmata
84-
$ git clone [email protected]:firmata/arduino.git c:/Program\ Files/arduino-1.x/libraries/Firmata
85-
```
86+
###Linux:
87+
88+
Update the path and arduino version as necessary
89+
1. Navigate to `~/arduino-1.x/libraries/` and replace the existing
90+
`Firmata` folder with the latest Firmata release (note there is a different download
91+
for Arduino 1.0.x vs 1.5.x).
92+
2. Restart the Arduino application and the latest version of Firmata will be available.
8693

87-
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.
94+
###Using the Source code rather than release archive
8895

89-
**Linux**:
96+
Clone this repo directly into the core Arduino libraries directory. If you are using
97+
Arduino 1.5.x, the repo directory structure will not match the Arduino
98+
library format, however it should still compile as long as you are using Arduino 1.5.7
99+
or higher.
90100

91-
update the path and arduino version as necessary
101+
You will first need to remove the existing Firmata library, then clone firmata/arduino
102+
into an empty Firmata directory:
103+
104+
Update paths if you're using Windows or Linux
92105
```bash
93-
$ rm -r ~/arduino-1.x/libraries/Firmata
94-
$ git clone [email protected]:firmata/arduino.git ~/arduino-1.x/libraries/Firmata
106+
$ rm -r /Applications/Arduino.app/Contents/Resources/Java/libraries/Firmata
107+
$ git clone [email protected]:firmata/arduino.git /Applications/Arduino.app/Contents/Resources/Java/libraries/Firmata
95108
```
96109

110+
To generate properly formatted versions of Firmata (for Arduino 1.0.x and Arduino 1.5.x), run the
111+
`release.sh` script.
112+
113+
97114
<a name="contributing" />
98115
##Contributing
99116

100117
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).
101118

102-
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.
119+
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.
103120

104121
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.
105122

106-
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.
123+
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.
107124

108125
Maintain the existing code style:
109126

127+
- If you are changing a C++ file, use [Artistic Style (astyle)](http://astyle.sourceforge.net/) to format your code
128+
- [Sublime Text astyle plugin](https://github.com/timonwong/SublimeAStyleFormatter) change default indentation from 4 to 2 spaces
129+
- If you are changing an .ino file, use the auto format feature (Tools -> Auto Format) in the Arduino IDE before submitting a pull request
110130
- Indentation is 2 spaces
111131
- Use spaces instead of tabs
112132
- Use camel case for both private and public properties and methods

release.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ cd temp
1515
find . -name "*.DS_Store" -type f -delete
1616
zip -r Firmata.zip ./Firmata/
1717
cd ..
18-
mv ./temp/Firmata.zip Firmata-2.4.0-beta3.zip
18+
mv ./temp/Firmata.zip Firmata-2.4.0.zip
1919

2020
#package for Arduino 1.5.x
2121
cp library.properties temp/Firmata
@@ -29,5 +29,5 @@ cd ..
2929
find . -name "*.DS_Store" -type f -delete
3030
zip -r Firmata.zip ./Firmata/
3131
cd ..
32-
mv ./temp/Firmata.zip Arduino-1.5.x-Firmata-2.4.0-beta3.zip
32+
mv ./temp/Firmata.zip Arduino-1.5.x-Firmata-2.4.0.zip
3333
rm -r ./temp

test/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Tests tests are written using the [ArduinoUnit](https://github.com/mmurdoch/ardu
44

55
Follow the instructions in the [ArduinoUnit readme](https://github.com/mmurdoch/arduinounit/blob/master/readme.md) to install the library.
66

7-
Compile and upload the test sketch as you would any other sketch. Then open the
7+
Compile and upload the test sketch as you would any other sketch. Then open the
88
Serial Monitor to view the test results.
99

1010
If you make changes to Firmata.cpp, run the tests in /test/ to ensure

0 commit comments

Comments
 (0)