Don't ad-block us - support your favorite websites. We have safe, unobstrusive, robotics related ads that you actually want to see - see here for more.
0 Members and 1 Guest are viewing this topic.
If you're using a phototransistor, your detector circuit is missing a current-limiting resistor...
I would create a function, called getIRMeasurement(), and it would return a value which is related to how close/shiny/big the object is.
They use this circult on SumoBots from Parallex, and they don't use a limiting resistor.... May be they don't use them.
' Program Listing 1.1 - Testing the IR Beam.bs2IR_detect var bitlow 7loop: pause 50 freqout 7, 1, 38500 IR_detect = in8 if IR_detect = 0 then unbroken ' Make sure to add six spaces to the debug statement ' below. That way both debug statements will have the ' same number of spaces for a better display. debug home, "Beam is broken; object detected. " goto loop unbroken: debug home, "Beam is unbroken; object not detected." goto loop
Maximum recommended sensing distance: 0.375" (9.5 mm)
Started by benji
Started by sherrynautics
Started by WhomBom
Started by Melcin Powell