Search  
Tuesday, January 06, 2009 ..:: Forum ::.. Register  Login
 HomePage Minimize

 Print   

 Products Minimize

 Print   

 MSRS Minimize

 Print   

      
 RoboticsConnection Forum Minimize
SearchForum Home
  Discussions  Robot Sensors  Touch switches...
 Touch switches
 
 5/5/2007 7:46:18 PM
Shaggy
13 posts


Touch switches
 Modified By jason  on 5/7/2007 7:47:30 AM)

Touch sensors are a big deal. I currently have 16, which greatly exceeds the number of IO pins on pretty nearly anything.

However, I have them plugged into a SimmStick board, which allows 8 touch switches to be connected, and communicates over I2C. This means that I read a single byte register from a specific address.

Is there a way to do that with the SRC board?  I believe I can figure out how to connect SimmStick boards to the SRC board via I2C, but I didn't see a way to read them.

Currently, I am using an OOPic board, but it would function almost the same way as an SRC board....with one BIG difference. The OOPic program watches for changes in those touch switches, and only sends out an (???) 

 5/7/2007 12:00:40 PM
jason
158 posts
5th


Re: Touch switches

Shaggy,

You can connect a bunch of SimmSticks to the I2C port on the Serializer, and (as I mentioned in another post) invoke the generic I2C interface (which will be added in a few weeks to the .NET lib and Serializer Services).  The generic I2C functionality does exist in the firmware (v1.4.0).

You can use one of our I2C Expansion Modules to hook up additional SimmSticks to the Serializer. :)

I still have to think about the Generic I2C interface we're adding to the .NET library.  So in the case of the bump sensors, you would like the .NET library to contstanly query the sensors, and notify you if one changes, correct?  You could write your own class which inherits from the GenericI2C class, which uses the I2C functionality in the GenericI2C class to sendsout the proper commands to your simm stick. Once your class receives the values back, it could compare them with the last values, and then notify observers if the value changed.  You'd simply add your own event to your derived class, and observers could sign up to listen to that event.

How does that sound?


Jason Summerour
President,
Summerour Robotics Corp
Microsoft MVP
www.roboticsconnection.com
 5/7/2007 6:59:12 PM
Shaggy
13 posts


Re: Touch switches
That sounds workable. With the OOPic, there is no particularly easy way to use an interupt with the SimmStick boards, so I am effectively doing the same thing with OOPic code, except that the loop that is constantly polling the touch sensors is on the board, rather than over serial. I doubt that matters, as I think your design is likely to be more efficient.
  Discussions  Robot Sensors  Touch switches...

SearchSearch  Forum HomeForum Home    Print   

Copyright 2004-2007 Summerour Robotics Corp   Terms Of Use  Privacy Statement
DotNetNuke® is copyright 2002-2009 by DotNetNuke Corporation