Simulate a Drop-Off with Poster Board
A sheet of white poster board with a border made of electrical tape or black tempera paint makes for a handy way to simulate the drop-off presented by a table edge, with much less risk to your cyber:bot.
- Use the micro:bit Python Editor to open IR_interference_sniffer, then click Send to micro:bit.
- Set the cyber:bot board's PWR switch to position 1, and use it make sure that nearby fluorescent lighting or other devices will not interfere with your cyber:bot’s IR object detectors.
- Make a test patch of your black paint or electrical tape (at least 6 in x 6 in) on a piece of paper or cardboard.
- Use the micro:bit Python Editor to open test_both_IR_indicators, then click Send to micro:bit.
- Position the cyber:bot so that its IR detectors are "looking" at the test patch.
- While the cyber:bot is running test_both_IR_indicators, verify that that the infrared object detectors cannot see a reflection from it.
- Also position the cyber:bot so that it is looking at the poster board surface, and make sure the infrared detectors can see that surface.
- Build a course similar to the one shown above. For electrical tape, use at least three, preferably four, strips, edge to edge on the poster board with no paper visible between the strips, and make diagonals over the corners. For paint, make a stripe at least 4 inches wide.
- Use the script test_both_IR_indicators again to make sure that the cyber:bot detects the poster board but does not detect the electrical tape or paint.
#test_both_IR_indicators from cyberbot import * bot(22).tone(3000, 1000) while True: irL = bot(14, 13).ir_detect(37500) irR = bot(1, 2).ir_detect(37500) bot(20).write_digital(irL) bot(21).write_digital(irR)
If the cyber:bot still "sees" the electrical tape too clearly:
- Try adjusting the IR receivers (but not the IR LEDs) downward at shallower angles, looking straight ahead, or even slightly upward. One of these angles will usually make it nearsignted enough to not see the electrical tape/paint, but not so nearsighted that it would miss the poster board surface.
If the IR still isn't nearsighted enough, here are more ways to make it more nearsighted.
- Adjust the ir_detect command with different frequency arguments. These will make the cyber:bot more nearsighted: 39000, 40000, 41000.
- Try replacing the 2 kΩ resistors with 4.7 kΩ (yellow-violet-red) resistors to make the cyber:bot more nearsighted.
- If all else fails, try a different brand of vinyl electrical tape.
If you are using older IR LEDs, the cyber:bot might actually be having problems with being too nearsighted. Here are some remedies that will make it more far sighted:
- Try pointing the IR LEDs and detectors downward at a steeper angle so that the cyber:bot is looking at the surface right in front of it.
- Try replacing the 2 kΩ (red-black-red) resistors with 1 kΩ (red-black-brown) or even 470 Ω (yellow-violet-brown) resistors in series with the IR LEDs instead of 2 kΩ.