Difference between revisions of "Itty Bitty Buggy: Color Detector Tutorial (mDesigner)"
(Created page with "=Color Detector= Buggy Base also contains two Color Detector sensors on the underside, right next to the ColorLEDs. The Color Detectors are capable of detecting color. These a...") |
(→Color Detector) |
||
Line 7: | Line 7: | ||
{| class="wikitable" | {| class="wikitable" | ||
| | | | ||
− | '''Function:''' This block | + | '''Function:''' This block control the Buggy Base to follow (trace) along the chosen color line. |
− | :[[File:IBB mDesigner | + | :[[File:IBB mDesigner Car Block Go Along Color.png]] |
− | |||
− | |||
− | |||
− | |||
+ | :*'''Color''' - color of the line to trace (either '''red''', '''green''', '''blue''' or '''black'''). | ||
{| class="wikitable" style="background-color:#FEF9E7;" | {| class="wikitable" style="background-color:#FEF9E7;" | ||
|'''Note:''' This block approximates the color detected. Therefore, closely related colors may be register as being detected. An example, "orange" registers as "red". | |'''Note:''' This block approximates the color detected. Therefore, closely related colors may be register as being detected. An example, "orange" registers as "red". | ||
+ | |} | ||
+ | {| class="wikitable" style="background-color:#FEF9E7;" | ||
+ | |'''Note:''' The speed of tracing cannot be set. | ||
|} | |} | ||
|} | |} |
Revision as of 18:48, 1 November 2018
Contents
Color Detector
Buggy Base also contains two Color Detector sensors on the underside, right next to the ColorLEDs. The Color Detectors are capable of detecting color. These are useful when following along a color line. The Color Detectors are referenced as Color Detector "A" or "B" depending on the side it is on.
Block: Detect Color
The Color Detector can be utilized using the Color Detector - Detect Color block.
Function: This block control the Buggy Base to follow (trace) along the chosen color line.
|
Example 1: If a Color is detected, then play a note on the Buzzer
Note: this example is performed in online mode. If you have overwritten the firmware when using "offline mode", please follow the instructions to reset back to "online mode". |
|
|
Description: When activated, The program will loop forever checking for when Color Detector "A" detects green, then the Buzzer will play note C4 for 1 second.
Block: Read Color
Retrieving the raw value from the Color Detector can be accessed using the Color Detector - Read Color block.
Function: This block reads and returns the raw value from the color detector while having the corresponding ColorLED set to a specific color.
|
Example 2: Read and display the raw value from a Color Detector
Note: this example is performed in online mode. If you have overwritten the firmware when using "offline mode", please follow the instructions to reset back to "online mode". |
|
|
Description: When activated, Corey will say the raw value currently detected on Color Detector "A" with the corresponding ColorLED set to red. Test different color surfaces to see the raw values change.