From: RussellMorin <rm...@wp...> - 2008-11-09 16:08:20
|
Hi Takashi, Because I have several other components connected to the Robostix, I need to keep that in the loop. I have already tried called I2C_IO_GetGPIO(...) on the signal in of the sonar sensor. This command is in a while loop that is supposed to loop until it sees the falling edge. Every time I run it, my program returns a value of about 950 usecs regardless of the distance between it and an object in its path. I was looking on the http://roboticsprimer.sourceforge.net/workbook/Sensors:Exercise3:Sonar_Sensor Robotics Primer Sonar Sensor Exercise page and it lead me to believe that I can easily implement the sensor on my system. The problem is that Player is too large to fit on my system. Does anyone know how Player communicates with the Devantech SRF05? If I could write a standalone program that can poll the sensor once and return a valid reading, that would be ideal. From there I could expand its functionality. Thanks, -Russ Morin Takashi wrote: > > Hi Russell, > > As far as I understood, the GPIO Event program can only be used to monitor > the GPIO pins that are connected to the connex motherboard (i.e. those > pins listed at http://docwiki.gumstix.org/New_60pin_connector_chart). It > cannot be used to monitor the GPIO pins on the robostix. > > If you only need to timestamp the falling edge of two GPIO inputs, just > connect your device directly to the connex motherboard instead of to the > robostix. You can use any of the 40+ GPIO pins listed in > http://docwiki.gumstix.org/New_60pin_connector_chart (e.g. GPIO58, > GPIO59), and use GPIO event to monitor those pins. > > You may want to use the breakout-gs board, which is an expansion board > that allows you > to connect your device easily to the GPIO pins on the connex. Under this > arrangement, the robostix would not be needed at all. > > The advantage is that the polling rate is much faster (2 million toggles > per pin). > > Alternatively, if you must use the GPIO pins on the robostix, you should > follow the instructions here > (http://docwiki.gumstix.org/index.php/Robostix_i2c-io). Once you have > installed and configured all the s/w, execute the following command to > read the status of a pin (e.g. Port C, pin 0): > > i2c-io 0x0b Get c.0 > > You should get either a "1" (i.e. high) or a "0" (i.e. low). > > For a more complete program, lookup the contents in i2c-io.c. However, you > should know that i2c-io is rather slow. > > Takashi > > > RussellMorin wrote: >> >> Hello, >> >> I am using a Connex200xm, Robostix, Wifistix stack with buildroot 1629. I >> have a Devantech SRF05 connected to two GPIO pins (G0 and G1) and I would >> like to register the time between the fall of G0 and the fall of G1. I >> came across the code here: >> http://docwiki.gumstix.org/index.php/GPIO_event GPIO Event , but I need >> to implement the same functionality within my own program. Is there a >> simple set of code to run that just monitors 1 pin and registers the time >> of the fall/rise? With that I should be able to extrapolate and write >> everything else I need. >> >> Thanks, >> -Russ >> > > -- View this message in context: http://www.nabble.com/GPIO-Event-Help-tp20383953p20407753.html Sent from the Gumstix mailing list archive at Nabble.com. |