From 3c7420097dc2acb7532d944498c1f51a617708ae Mon Sep 17 00:00:00 2001 From: Peter Schwarz Date: Wed, 16 Apr 2014 16:22:39 -0500 Subject: [PATCH] release 1.1.0 --- README.md | 14 +++++++------- project.clj | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index bbfc6a4..1dacd5b 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Add the following to your `project.clj` - [clj-firmata 1.0.0] + [clj-firmata 1.1.0] ### Connect to a Board @@ -53,23 +53,23 @@ The above will set the brightness of an LED on pin 11 to maximum brightness The Firmata protocol provides several ways of receiving events from the board. The first is via an event channel: (let [ch (event-channel board)] - ; ... + ; ... ; take events from the channel ; ... ; Then, when you're done, you should clean up: (release-event-channel board ch)) - + The channels have the same buffer size as the board is configured with on `open-board`. The protocol also provides a `core.async` publisher, which publishes events based on `[:event-type :pin]`. This can be used in the standard fashion: (let [sub-ch (chan)] (sub (event-publisher board) [:digital-msg 3] sub-ch) - (go (loop + (go (loop (when-let [event ( board @@ -86,7 +86,7 @@ This will result in the following events on the channel: For convenience, the `firmata.receiver` namspace provides the function `on-digital-event`, which may be used to filter events with the `:digital-msg` type and to a specific pin. For example: - (def receiver (on-digital-event board 3 + (def receiver (on-digital-event board 3 #(if (= :high (:value %)) "Pressed" "Released"))) This receiver can be stopped like so: @@ -105,7 +105,7 @@ will result in the following events on the channel: (is (= 0 (:pin event))) (is (= 1000 (:value event))) -Like `on-digital-event`, there is an `on-analog-event` which will provide the events to a particular analog pin. +Like `on-digital-event`, there is an `on-analog-event` which will provide the events to a particular analog pin. ### Close the connection to a Board diff --git a/project.clj b/project.clj index 512a95b..16baecb 100644 --- a/project.clj +++ b/project.clj @@ -1,4 +1,4 @@ -(defproject clj-firmata "1.0.1-SNAPSHOT" +(defproject clj-firmata "1.1.0" :description "clj-firmata provides access to Standard Firmata (http://firmata.org/) commands via clojure" :url "https://github.com/peterschwarz/clj-firmata" :license {:name "Eclipse Public License"