To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 20379
20378  |  20380
Subject: 
Re: anyone deal with techno-stuff's DIRPD sensor?
Newsgroups: 
lugnet.robotics
Date: 
Mon, 10 Mar 2003 16:21:18 GMT
Viewed: 
660 times
  
I added support for these to BrickOS some time back, so if you are using
BrickOS take a look at dirpd.h.  If you are not using BrickOS still take a look
dirpd.h it will show you how to decode the values.  It is fairly trivial, and
the dirpd.h file just tries to make it easier.

http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/brickos/brickos/include/dirpd.h?rev=HEAD&content-type=text/vnd.viewcvs-markup


to use it just do something along the lines of

//activate SENSOR_1

if(DIRPD_LEFT(SENSOR_1)) {
  //object on left
  //turn right
} else if(DIRPD_RIGHT(SENSOR_1)) {
  //object on right
  //turn left
} else if(DIRPD_CENTER(SENSOR_1)) {
  //object in front
  //backup
} else if(DIRPD_NONE(SENSOR_1)) {
  //no object
  //go forward
} else {
  //error
}

mark



Message has 1 Reply:
  Re: anyone deal with techno-stuff's DIRPD sensor?
 
Thanks Mark, Im going to try it now, and i had your files i got it from the guy at techno-stuff and from the api, but it may be trival but i was not really understanding it. I ended writing you an email today asking about it (i havent yet looked at (...) (22 years ago, 17-Mar-03, to lugnet.robotics)

Message is in Reply To:
  anyone deal with techno-stuff's DIRPD sensor?
 
im looking for some class files/sample programs in C or C++ for use with the techno-stuff.com Dual Infared Proximity Dector sensor...if anyone can help me out id appreciate it. thanls (22 years ago, 9-Mar-03, to lugnet.robotics)

3 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR