From: Dave H. <dhy...@gm...> - 2008-04-10 14:32:46
|
Hi Drew, > I'm wanting to maybe link a few basic circuits up to my gumstix system for > such things as temperature sensing, status LEDs etc. > > I think the simplest idea would be to get an LED working that I can control > from the gumstix for such things as "new mail" etc. You need to find a GPIO line that isn't being used and connect the LED, along with a current limiting resistor to that pin. A likely set of pins would be the AC97 pins (normally used for connecting up an audio codec - like the one used on the audiostix). Lets suppose you use pin 2 (pin1 is the square pad - pin 2 is next to pin 1, but right next to the edge of the board). This is the X_BIT_CLK signal which connects to pin 58 on the hirose connector, which is GPIO 28. This page shows this as well: <http://docswiki.gumstix.com/index.php/Verdex_60pin_connector_chart>, although it's called just BITCLK. You can then do this from the command line: modprobe proc_gpio echo "GPIO out set" > /proc/gpio/GPIO28 echo "GPIO out clear" > /proc/gpio/GPIO28 to toggle between set (3.3v) and clear (0v) on that pin. The pin can only drive a few mA, so you need to size your current limiting resistor appropriately. For a typical red LED, which drops 1.7v, the voltage through the current limiting resistor will be (3.3 - 1.7 = 1.6v) V=IR, so R=V/I. Picking a resistor of 1600 ohms or higher will restrict the current to 1mA. -- Dave Hylands Vancouver, BC, Canada http://www.DaveHylands.com/ |