Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 81 lines (78 sloc) 3.71 KB
header#overview
.page-header
h1 Adjustable LED Walker
small Control walking direction and adjust speed
.row
.span12
.hero-unit
img(src="wiring/walkLED.png")
p Use the example wiring from above and this interface for getting startet with noduino. Read values from an analog input device like a potentiometer and watch for pressed buttons, all basic functions are shown within this example. The needed
code .fzz
| file for making changes with the awesome
a(href="http://fritzing.org") Fritzing Application
| is included as well. If you want to share your own wirings or found a bug please create a
a(href="http://github.com/semu/noduino") Pull Request on GitHub
| !
.page-header
h1 HTML5 WebSocket Interface
small Using Socket.IO and Node.js
.row.interface#controls
.span12
.btn-toolbar(style="margin-bottom: 9px")
.btn-group
a.btn(href="#")#connect
i.icon-refresh
| Connect to Arduino
|
.btn-group
.btn.btn-dir#btn-04 ««
|
.btn-group#leds
a.btn.disabled#led-1 #1
a.btn.disabled#led-2 #2
a.btn.disabled#led-3 #3
a.btn.disabled#led-4 #4
a.btn.disabled#led-5 #5
a.btn.disabled#led-6 #6
|
.btn-group
.btn.btn-dir#btn-02 »»
.btn-group
input.range#interval-slide(type="range", min="0", max="1024", step="1", value="320", disabled="disabled")
input.interval#interval-value(type="input", value="320ms",disabled="disabled")
.row.info#connection-status
.span12
.alert.alert-info Please connect to your Arduino using the button.
.alert.hide.alert-error Unable to connect to Arduino!
.alert.hide.alert-success Connection to Arduino established!
.row.debug
.span12
pre#connection-log
.item $ > Not connected to noduino!
.row
.span12
p This interface is defined in
code views/example-walkLED.jade
| , all needed JavaScript is stored in
code public/scrupts/app.walkLED.js
| using
a(href="http://requirejs.org/") RequireJS
| for loading dependencies. Please see RequireJS's manual for loading your scripts. Logging is done with the customized
code Logger.HTML.js
| in
code scripts/libs/
| .
.page-header
h1 Just Node.js
small Acces Arduino components without HTML5 interface
.row
.span12
p The wiring above can be used to test the included HTML web interface and the Node.js access as well. Connect your Arduino to you computer and start catching events happening on your Arduino with JavaScript. For sure you can easily fire events on your Arduino too!
pre
| $ > git clone git@github.com:semu/noduino.git
| $ > cd noduino/
| $ > git submodule update --init
| $ > npm install
| $ > cd examples/
| $ > node test.walkLED.js
p After starting <code>test.walkLED.js</code> you are able to push the buttons in your wiring and see the LEDs blinking as you commanded. Use the analog input for changing walking speed. Binding events work as you might know from using Mootools, use <code>AnalogInput.on()</code>, <code>LED.on()</code> and <code>Button.on()</code> to bind custom functions to events like <em>on</em>, <em>off</em>, <em>change</em>, <em>push</em> or <em>release</em>. Not all functions are documented or even demonstrated with an example application, for getting used to noduino make sure to have a look at <code>test.blinkLED.js</code> and <code>test.readAnalogIn.js</code>.
Something went wrong with that request. Please try again.