|
|
(2 intermediate revisions by the same user not shown) |
Line 104: |
Line 104: |
| [[File:mDesigner_v1.6_Wait_block.png|x50px]] [[File:Info_icon.png|24px|link=block_reference]]<br><br> | | [[File:mDesigner_v1.6_Wait_block.png|x50px]] [[File:Info_icon.png|24px|link=block_reference]]<br><br> |
| [[File:mDesigner_v1.6_Forever_block.png|x75px]] [[File:Info_icon.png|24px|link=block_reference]] | | [[File:mDesigner_v1.6_Forever_block.png|x75px]] [[File:Info_icon.png|24px|link=block_reference]] |
− |
| |
| |- | | |- |
| |Buggy [[File:IBB_Buggy_icon.png|x30px]] | | |Buggy [[File:IBB_Buggy_icon.png|x30px]] |
Line 126: |
Line 125: |
| *ColorLED "A" will turn black (off). ColorLED "B" will turn green. | | *ColorLED "A" will turn black (off). ColorLED "B" will turn green. |
| *1 second pause. | | *1 second pause. |
− |
| |
− | =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.
| |
− |
| |
− | {| class="wikitable"
| |
− | |
| |
− | '''Function:''' This block reads and returns either '''true''' or '''false''' if the selected color detector detects the selected test color.
| |
− |
| |
− | :[[File:IBB mDesigner LineFInder Block Test Color.png]]
| |
− |
| |
− | :*'''Sensor''' - select sensor for detection (either '''A''' or '''B''').
| |
− |
| |
− | :*'''Color''' - color for the selected '''Sensor''' to match in order to return '''true'''. Otherwise, this block returns '''false'''.
| |
− |
| |
− | {| 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".
| |
− | |}
| |
− | |}
| |
− |
| |
− | ==Example 1: If a Color is detected, then play a note on the Buzzer==
| |
− | {| class="wikitable" style="background-color:#FEF9E7;"
| |
− | |'''Note:''' this example is performed in '''online mode'''.<br>
| |
− | If you have overwritten the firmware when using "offline mode", [[Itty_Bitty_Buggy:_Getting_Started_(mDesigner)#Connecting_to_Itty_Bitty_Buggy_to_mDesigner_.28Online_mode.29|'''please follow the instructions to reset back to "online mode"'''.]]
| |
− | |}
| |
− |
| |
− | {|
| |
− |
| |
− | |style="vertical-align:top;"|
| |
− | {| class="wikitable"
| |
− | |+Blocks Used
| |
− | !Block Category
| |
− | !Blocks
| |
− | |-
| |
− | |bgcolor=FEC254|Events
| |
− | |[[File:MDesigner_When_Click_Green_Flag_block_new.png|x50px]] [[File:Info_icon.png|24px|link=block_reference]]
| |
− | |-
| |
− | |bgcolor=FEAD50|Control
| |
− | |
| |
− | [[File:mDesigner_v1.6_Wait_block.png|x50px]] [[File:Info_icon.png|24px|link=block_reference]]<br><br>
| |
− | [[File:mDesigner_v1.6_Forever_block.png|x75px]] [[File:Info_icon.png|24px|link=block_reference]]<br><br>
| |
− | [[File:mDesigner_v1.6_If_block.png|x75px]] [[File:Info_icon.png|24px|link=block_reference]]
| |
− | |-
| |
− | |Buggy [[File:IBB_Buggy_icon.png|x30px]]
| |
− | |
| |
− | [[File:IBB_mDesigner_LineFInder_Block_Test_Color_NoLabels.png|x50px|link=Buggy_Base_(use_with_mDesigner)#Color_Detector_-_Detect_Color]] [[File:Info_icon.png|24px|link=Buggy_Base_(use_with_mDesigner)#Color_Detector_-_Detect_Color]]<br><br>
| |
− | [[File:IBB_mDesigner_Buzzer_Block_Play_Note_NoLabels.png|x50px|link=Buggy_Base_(use_with_mDesigner)#Buzzer_-_Play_Note]] [[File:Info_icon.png|24px|link=Buggy_Base_(use_with_mDesigner)#Buzzer_-_Play_Note]]
| |
− | |}
| |
− |
| |
− | |style="vertical-align:top;"|
| |
− | {| class="wikitable"
| |
− | |+Example
| |
− | |-
| |
− | |style="padding:50px;"|
| |
− | [[File:IBB_mDesigner_Color_Detector_Example1.png]]
| |
− | |}
| |
− |
| |
− | |}
| |
− |
| |
− | '''Description:''' [[how to activate blocks|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.
| |
− |
| |
− | {| class="wikitable"
| |
− | |
| |
− | '''Function:''' This block reads and returns the raw value from the color detector while having the corresponding ColorLED set to a specific color.
| |
− |
| |
− | :[[File:IBB_mDesigner_LineFinderLED_Block_Read_Color.png]]
| |
− |
| |
− | :*'''Sensor''' - sensor to read raw value from (either '''A''' or '''B''').
| |
− |
| |
− | :*'''Color''' - turn on the corresponding ColorLED to the selected color (either '''red''', '''green''', '''blue''' or '''OFF''').
| |
− |
| |
− | {| class="wikitable" style="background-color:#FEF9E7;"
| |
− | |'''Note:''' Turning on the corresponding paired ColorLED can help improve the consistency of the raw data readings.
| |
− | ColorLED "A" and Color Detector "A" are on the same side. Similarly with ColorLED "B" and Color Detector "B".
| |
− | |}
| |
− | |}
| |
− |
| |
− | ==Example 2: Read and display the raw value from a Color Detector==
| |
− | {| class="wikitable" style="background-color:#FEF9E7;"
| |
− | |'''Note:''' this example is performed in '''online mode'''.<br>
| |
− | If you have overwritten the firmware when using "offline mode", [[Itty_Bitty_Buggy:_Getting_Started_(mDesigner)#Connecting_to_Itty_Bitty_Buggy_to_mDesigner_.28Online_mode.29|'''please follow the instructions to reset back to "online mode"'''.]]
| |
− | |}
| |
− |
| |
− | {|
| |
− |
| |
− | |style="vertical-align:top;"|
| |
− | {| class="wikitable"
| |
− | |+Blocks Used
| |
− | !Block Category
| |
− | !Blocks
| |
− | |-
| |
− | |bgcolor=9966FF|Looks
| |
− | |[[File:MDesigner_v1.6_Say_block.png|x50px]] [[File:Info_icon.png|24px|link=block_reference]]
| |
− | |-
| |
− | |bgcolor=FEC254|Events
| |
− | |[[File:MDesigner_When_Click_Green_Flag_block_new.png|x50px]] [[File:Info_icon.png|24px|link=block_reference]]
| |
− | |-
| |
− | |bgcolor=FEAD50|Control
| |
− | |
| |
− | [[File:mDesigner_v1.6_Wait_block.png|x50px]] [[File:Info_icon.png|24px|link=block_reference]]<br><br>
| |
− | [[File:mDesigner_v1.6_Forever_block.png|x75px]] [[File:Info_icon.png|24px|link=block_reference]]<br><br>
| |
− | |-
| |
− | |Buggy [[File:IBB_Buggy_icon.png|x30px]]
| |
− | |[[File:IBB_mDesigner_LineFinderLED_Block_Set_Color_NoLabels.png|x50px|link=Buggy_Base_(use_with_mDesigner)#Color_Detector_-_Read_Color]] [[File:Info_icon.png|24px|link=Buggy_Base_(use_with_mDesigner)#Color_Detector_-_Read_Color]]
| |
− | |}
| |
− |
| |
− | |style="vertical-align:top;"|
| |
− | {| class="wikitable"
| |
− | |+Example
| |
− | |-
| |
− | |style="padding:50px;"|
| |
− | [[File:IBB_mDesigner_Color_Detector_Example2.png]]
| |
− | |}
| |
− |
| |
− | |}
| |
− |
| |
− | '''Description:''' [[how to activate blocks|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.
| |
− | [[File:IBB_mDesigner_Color_Detector_Example2_running.png|800px]]
| |
Buggy Base contains two ColorLEDs on the underside. Each ColorLED is capable producing a wide variety of colors. The ColorLEDs are referenced as ColorLED "A" or "B" depending on the side it resides.