Hi
 
Works great. Was able to both use ports as input and output.
 
I just have two more questions:
 
1) I was able to control the ports via command line, but I need to be able to get the readings in such a way that I can check them while running my code. Meaning I need to know how to refer to them from a cpp file, since I need an "if" statement to determine the ports' value. How can this be done?
 
2) I might also need in addition to this, a UART interface. Is this possible somehow? Even though the serial port exists, I read in many places that it is only possible to use it for getting access of the command line and not for UART. I basically need to connect a compass to the gumstix as well.
 
Thanks
 
Nick

On 7 December 2011 01:17, Dave Hylands <dhylands@gmail.com> wrote:
HI Nick,

On Tue, Dec 6, 2011 at 12:49 PM, Greg Kogut <gkogut@yahoo.com> wrote:
If you're using Overo with the 40-pin header a safe bet for your two input lines is:

Pin 27 - gpio146
Pin 29 - gpio147

Per the first section of the wiki:

1)Export them to userspace
2)Set direction to "in"
3)Verify state with "echo"

These two pins are floating, so pull them low to get "0".   Pin 1 can be used as a ground.

Apply 1.8V to get "1". 

Make sure that you don't apply any more than 1.8v. Your tilt sensor probably outputs a higher voltage, and you'll need some type of voltage converter to convert the voltage from whatever your tilt sensor outputs down to 1.8v.

--
Dave Hylands
Shuswap, BC, Canada
http://www.davehylands.com

------------------------------------------------------------------------------
Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and point of
discussion for anyone considering optimizing the pricing and packaging model
of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
_______________________________________________
gumstix-users mailing list
gumstix-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gumstix-users