UNIT 5

From now on, we’ll use the language ENCHANTING 0.0.9.0 to make programs for our robots.





ENCHANTING is based on the SCRATCH platform.  SCRATCHT is a language developed by the MIT.




First we need to learn how SCRATCH works 

_____________________________________________________________________________


Run the program ECHANTING and try the following examples:

EXAMPLE 1

The robot drives forward for three seconds and then it drives backward for three seconds.



EXAMPLE 2

The robot moves slowly at first but it accelerates as the program progresses. 




EXAMPLE 3

Find out what number do you need to fill in for Degrees in order to make an accurate turn:

  • 360 degree turn
  • 180 degree turn
  • 90 degree turn




ACTIVITY 1

Make the robot move for three seconds as the images below show:





ACTIVITY 2

Explain how the following program works:


Then design a program which allows you to accelerate the movement of the robot by clicking the NXT right button, and to decelerate its movement by clicking the NXT left button. The motor must start its movement at a speed of 100o/s. How will you avoid values of speed under 0o/s?. In cases of negative values of speed,  the motor would move backward instead of forward.