Getting Started Guide

CLASS 3
36
Coding a Meter
Coding a Meter
Like digital blocks, there are blocks that represent analog values.
As we learned earlier, the servomotor operates according to the angle the user commands. Try to operate the
servo motor according to the value of the infrared sensor. If the infrared sensor value is 0, the servo motor will
move to 0, and if the infrared sensor value is 180, the servo motor will move to 180 degrees.
Since the angle to be controlled is in the servo motor operation block, put the analog sensor value in the motion
block. Now add an infinite loop block to complete the code.