DIY Wireless LEGO ESP32 Spaceship Steering Wheel Game Console

by KittenBot in Circuits > Wireless

1833 Views, 8 Favorites, 0 Comments

DIY Wireless LEGO ESP32 Spaceship Steering Wheel Game Console

F6VXAGCKUH8OIBO.png
picture1 copy.JPG
picture2 copy.JPG

Here is a self-made LEGO wireless game console that we can use to play games on the computer.

When playing a game programmed by ourselves, we may need to connect the controller to the computer with a USB cable, which is not so comfortable to play with when the cable limits our operation with the handheld. So in this article, we will teach you to make a game console with Lego bricks that communicates wirelessly with the Future board (an ESP32-based mainboard) of the computer, to control the characters in the game.

All the things we used are listed below, and the code for this project is also provided in this article, so let's give it a go!

If you like our projects and tutorials, you can follow us on Twitter, Facebook, and Youtube for more interesting STEM projects and ideas.

Supplies

lego.png

Electronics:

2 × ESP32-based Future board

1 × USB-C

1 × Robotbit Edu - including the base and the battery (expansion board)

2 × Sugar Red Button Module (or other button sensors)

1 × Sugar Joystick Module (or other 4-direction analog joystick modules)

LEGO parts:

1 × Technic, Liftarm Thick 1 × 13 (41239)

2 × Technic, Liftarm Thick 1 × 11.5 (32009)

2 × Technic, Liftarm Thick L-Shape 3 × 5 (32526)

4 × Technic, Liftarm Thick H-Shape 3 × 5 (14720)

6 × Technic, Liftarm Thick 1 × 5 (32316)

2 × Technic, Liftarm Thick L-Shape 2 × 4 (32140)

2 × Technic, Liftarm Thick 1 × 3 (32523)

6 × Technic, Pin with Friction (6558)

30 × Technic, Pin with Friction (2780)

6 × Technic, Pin with Friction (43093)

You can find all the items in the Future Board Sugar Series IoT Educational Kit.
Also we use Kittenblock - the editor based on Scratch 3.0 to program in this project.

Assemble the Game Console

Assembly instruction-2.jpg
Assembly instruction-3.jpg
Assembly instruction-4.jpg
Assembly instruction-5.jpg
Assembly instruction-6.jpg
Assembly instruction-7.jpg
Assembly instruction-8.jpg
Assembly instruction-11.jpg
Assembly instruction-12.jpg
Assembly instruction-13.jpg
Assembly instruction-14.jpg
Assembly instruction-15.jpg
Assembly instruction-9.jpg
Assembly instruction-10.jpg
Assembly instruction-11.jpg

Assemble the game console according to the instruction.

Connect the Circuit

wiring.png
If you use a normal 4-direction analog joystick module, then the ACD (analog) pinouts should be P0, P1, P12, P14, and P15.


Next, two Future boards will be used in this project and the system can be divided into two parts:

  • Sending end (the game console), which is to send the control instructions;
  • Receiving end. A Future board is connected to the computer to receive the instructions from the console to control the interaction of characters in the game.

Write the Program of the Sending End

sending end program.png

Download the code and open it in Kittenblock (Kittenblock is a Scratch 3.0-based editor, you can download it here). The program needs to be downloaded to the Future board.

If you don't know how to download the program to the board, please refer to the tutorial here.

Here is the program file.

Program of the Receiving End

Receiving end program.png

To process the instructions from the console and interact with the sprites in the game.

Program source file

Test It Out And... Done!

Future board spaceship steering wheel game console

Now you can test out your project!

Enjoy your game ^^