• Home
  • pcDuino
  • WiKi
  • Store
  • Distributors
  • Home
  • pcDuino
  • WiKi
  • Store
  • Distributors
HomeScratchPark Car Without Crash (Scratch for pcDuino)
Previous Next

Park Car Without Crash (Scratch for pcDuino)

Posted by: admin , May 18, 2014

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 2014-05-15_145245 ,click  2   , and then click 图片4 .

You will get a picture as follows:

2014-05-16_185257

Step 2 : Click the  Ok  button.In the background of parking area import a new sprite:  car.png

2014-05-16_185420      2014-05-16_185453

 

Step 3 :Click 2014-05-16_185513 to  adjust the car to the park lot.

2014-05-16_185604

Step 3 : Make sure we initialize the  position of the car.  Then we initialize  the touch sensor.

code1

Step 4 : The script used to  control the car.

2014-05-16_191353

Step 5 :Install Linker Base Shield shields on pcDuino.  Connect touch module to the base shield on the following port:

 

car2

 

Another script  for you to choose:

2014-05-16_190613    2014-05-16_190537

 

Tags: Scratch

Share!
Tweet

admin

About the author

Leave a Reply Cancel reply

You must be logged in to post a comment.

Category

  • Home
  • pcDuino
  • WiKi
  • Store
  • Distributors