This lesson is how to command the Lizard to accelerate forward then stop.
Click the iconon the desktop to open the Mixly and you’ll be on the homepage:
Click the Lizard category, you will see the Forward Speed Module.Click and drag the Forward Speed Module into the coding area:
Click option part in the Forward Speed Module, you will see there are four levels you can choose.
Value a number for the times of different speed of moving forward. As shown below, drag the Count with Module from Control contents.
Combine them together as shown below:
As shown below, the number is 8 now and can be changed by the users’ willingness. This combining module will command the Lizard move forward for 8 steps in the speed of level 1.
Then continue to combine the same modules, separately set their speed as 2, 3 and 4.
Then combine these modules in the speed from 1-4;
Then drag the Count with Module from Control contents, combine them with previous modules. Change the number to let the code circulate for a time, and drag the end program module from Control contents to put in the end of the code to finish the process.
By the time, the procedure had all be finished. This procedure is made of 3 blocks, the Forward Speed Module controls the Lizard forward, the Count with Module controls the times of forward and end program module ends the program. After downloading and operating the process, the Lizard will move forward for 8 steps in speed of 1, then move forward for 8 steps in the speed of 2. Every time the Lizard walk for 8 steps, the level plus 1 until the speed reach the maximum, then the Lizard will stop.
Connect the Lizard with computer by the USB cable as shown below:
Select the board type: Arduino Nano, and select the serial port for upload:
Select the Port according to your actual situation. (Here just take COM3 as an example).
Upload the program to the Lizard:
Then you can see the Lizard accelerate forward then stop.