• Home
  • pcDuino
  • WiKi
  • Store
  • Distributors
  • Home
  • pcDuino
  • WiKi
  • Store
  • Distributors
HomeScratchPlay Pong with Scratch for pcDuino
Previous Next

Play Pong with Scratch for pcDuino

Posted by: admin , February 26, 2014

[vc_row][vc_column width=”1/1″][vc_column_text]pcDuino team developed  a custom version of Scratch for pcDuino. It’s fairly easy to install it. We simply need to type:

$sudo apt-get install pcduino-scratch

In this tutorial, we are going to see how to create a pong game on pcDuino using Scratch.

Compared to the MIT scratch, the Scratch of pcDuino has a hardware tab, and this makes the hardware programming really easy.[/vc_column_text][vc_tour][vc_tab title=”Pong” tab_id=”1393443318875-3-6″][vc_column_text]In this game, we will use hand to control the movement of the boards to reflect the ball back. When we wave the hand closer to the sensor, the board will move down, and move up when we move away from the sensor.
[/vc_column_text][/vc_tab][vc_tab title=”Parts List” tab_id=”1393441178-1-96″][vc_column_text]

  1. 1  x pcDuino v2
  2. 1 x Plastic mounting plate for pcDuino/Arduino w rubber feet
  3. 1 x Breadboard
  4. 2 x Sharp GP2Y0A21YK0F Analog Distance Sensor 10-80cm

[/vc_column_text][/vc_tab][vc_tab title=”Wiring Diagram” tab_id=”1393441178-2-74″][vc_column_text]The following diagram shows how to wire infrared sensors to pcDuino:

A picture of the real setup is shown below:

pongsetup[/vc_column_text][/vc_tab][vc_tab title=”Scratch for pcDuino Screen Shot” tab_id=”1393442783147-2-3″][vc_column_text]pong_1

pong_2

pong3

The pong scratch file can be downloaded from: https://github.com/pcduino/scratch4pcduino_project/blob/master/s4p_lesson3.sb

[/vc_column_text][/vc_tab][/vc_tour][/vc_column][/vc_row]

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