Skip to content

Latest commit

 

History

History
57 lines (37 loc) · 2.13 KB

cutebot_case15.md

File metadata and controls

57 lines (37 loc) · 2.13 KB

Case15: Seeking the Light

Purpose


  • Programme to make the Cutebot seek the light source automatically.

Materials


Software Platform


MicroSoft makecode

Programming


Step 1

  • Click "Advanced" in the MakeCode drawer to see more choices.

  • We need to add a package for programming, click "Extensions" on the bottom of the drawer and search with Cutebotin the dialogue box to download it.

Note: If you met a tip indicating the codebase will be deleted due to incompatibility, you may continue as the tips tell or build a new project.

Step 2

  • Judge the luminous intensity with the block "light level " in "forever" ; if the value is below the setting point, set the Cutebot turn left at its full speed; Or it moves forward at its full speed.

Link

Link: https://makecode.microbit.org/_3xCUWo1iMc5Y

You can also download it directly below:

<iframe style="position:absolute;top:0;left:0;width:100%;height:100%;" src="https://makecode.microbit.org/#pub:https://makecode.microbit.org/_3xCUWo1iMc5Y" frameborder="0" sandbox="allow-popups allow-forms allow-scripts allow-same-origin"> </iframe>

Result


  • The Cutebot spins if there is no light being detected or it drives forward to it at its full speed.

Exploration


FAQ


Relevant Files