Run Game Snake on PcDuino

Introduction: Run Game Snake on PcDuino

In this tutorial, we are going to show how to run a game named “Snake” on pcDuino, and controlled by Linker JoyStick Module.

About the Game Snake

Snake is a classic casual video game that many people love and are familiar with.
The player controls a long, thin creature, resembling a snake, which roams around on a bordered plane, picking up food (or some other item), trying to avoid hitting its own tail or the “walls” that surround the playing area. Each time the snake eats a piece of food, its tail grows longer, making the game increasingly difficult. The user controls the direction of the snake’s head (up, down, left, or right), and the snake’s body follows. The player cannot stop the snake from moving while the game is in progress, and cannot make the snake go in reverse.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Step 1: Wire Diagram

The JoyStick is connected as following:

  1. GND of JoyStick -> GND of pcDuino
  2. VCC of JoyStick -> 3.3V of pcDuino
  3. x of JoyStick -> A2 of pcDuino
  4. y of JoyStick -> A3 of pcDuino

Step 2: Step 2: Running Interface

Step 3: Step 3: Source Code

Download snake source code :

1. Put the source code into pcduino

2. Open the LXTerminal and cd into source code floder, and run " make all".

You must run command as ROOT when receive an "Access Denied" or a Permission Denied" scripting error message .

3. You must install curses library whe you receive cureses.h not found .

install curses library:

sudo apt-get install libncurses5-dev

4: Makefile variables in ARDUINO_PATH arduino installation directory. You can modify the actual situation

Step 4: Customer Support

Be the First to Share


    • Trash to Treasure Contest

      Trash to Treasure Contest
    • Raspberry Pi Contest 2020

      Raspberry Pi Contest 2020
    • Wearables Contest

      Wearables Contest