Arduino Gauge Gadget
C++ Arduino Ruby C Objective-C Shell
Latest commit 7ce2e59 Mar 2, 2013 @guyc guyc Update blog url.
Permalink
Failed to load latest commit information.
client Clean up LED library to make them dim slowly, and update the gaugette… May 3, 2012
motortest Added new motor library. Now zeros gauge against stops at startup. Jan 9, 2012
tools/square_dial Updated code to match 230 degree sweep of new dial faces. Feb 6, 2012
.gitignore Moved command parser to library, added motor test (which is working w… Jan 9, 2012
Command.cpp Added setPosition function. Now have enough code to wire up to a real… Jan 9, 2012
Command.h Separated SwitecX25 into standalone library EXTERNAL TO THIS REPOSITORY Feb 3, 2012
IntRotaryEncoder.cpp Set sign so that clockwise is positive - although this probably depen… Feb 2, 2012
IntRotaryEncoder.h Added interrupt-driven implementation of rotary encoder driver. Feb 2, 2012
LED.cpp Clean up LED library to make them dim slowly, and update the gaugette… May 3, 2012
LED.h Clean up LED library to make them dim slowly, and update the gaugette… May 3, 2012
README.md Update blog url. Mar 3, 2013
RotaryEncoder.cpp Code configuration for 2-gauge, 2-led, 2-switch module. Mar 25, 2012
RotaryEncoder.h Added interrupt-driven implementation of rotary encoder driver. Feb 2, 2012
Switch.cpp Restructure, fix misnamed class, add basic class for switches. Mar 25, 2012
Switch.h Restructure, fix misnamed class, add basic class for switches. Mar 25, 2012
gaugette.ino Clean up LED library to make them dim slowly, and update the gaugette… May 3, 2012
notes.txt Reconsidering soft-limit; probably doesn't belong in core library. Jan 30, 2012

README.md

Dependences

This code depends on the SwitecX25 library which is now housed in a separate repository.

Project Blog

Full details of this project can be found at the Gaugette Blog.

Using this Code

Gaugette.ino is an Ardiuno sketch that uses a simple serial command language to control one or more analog gauges. The following ruby sample code sends command sequences to the attached Arduino from a host computer. The clients directory includes a complete example that showns bandwidth in and out from a pfSense firewall on two analog gauges.

require 'gaugette'

# open serial connection to Arduino running gaugette.ino
@gaugette = Gaugette.new("/dev/tty.usbmodem24411")

# zero and configure each motor
[0,1].each {|i| @gaugette.zero(i)}

# move motors in sync
v = 0
6.times do |i|
  @gaugette.set(1, v)
  @gaugette.set(0, v)
  sleep 1
  v = 1-v
end