Course Description:
By touch and hold the touch sensor, the car will race to the finish line. Release the touch sensor to park the car. The closer the car parks to the finish line, the higher the score you will get. The game will be over when the car touches finish line.
Parts List:
1. pcDuino x1
2.Touch sensor x1
Step 1 :Draw a parking area.Click ,click , and then click .
You will get a picture as follows:
Step 2 : Click the Ok button.In the background of parking area import a new sprite: car.png
Step 3 :Click to adjust the car to the park lot.
Step 3 : Make sure we initialize the position of the car. Then we initialize the touch sensor.
Step 4 : The script used to control the car.
Step 5 :Install Linker Base Shield shields on pcDuino. Connect touch module to the base shield on the following port:
Another script for you to choose:
Leave a Reply
You must be logged in to post a comment.