Outline
- Project:Microduino Snake Game
- Objective:Connect the mobile and Microduino-Core by Microduino BT module,then control the double color LED lattice to play snake game!
- Difficulty:High
- Time-consuming:4 hours
- Maker:Microduino Studio-YLB
First solution:
Bill of Materials
Module |
Number |
Function
|
Microduino-Core |
1 |
Core module
|
Microduino-FT232R |
1 |
Download program
|
Microduino-BT |
1 |
Make connectin with mobile
|
double color LED lattice |
1 |
Display
|
Pegboard |
1 |
Set up circuit
|
9_Pin Row needles |
3 |
Fix Microduino core
|
Bread board jumper |
4 |
Connect wire
|
Soldering iron |
1 |
welding tool
|
Solder |
1 |
welding tool
|
Wire |
1 |
welding tool
|
tweezers |
1 |
welding tool
|
3D printer |
1 |
Print the shell
|
Document
IIC lattice chip:
Library:
Debug
- Step 1:Prepare the experiment equipment
- Step2:Build adapter board
- Cut a certain specification size pegboard;
- Weld the row needles;
- After finished weldign, use the bread board to make connection, From left to right in turn is the SDA and SCL, GND, VCC.;
- Step 3:Change the lattice, because the original LED lattice doesn't easy to connect the jumper, so change its row needles match Microduino's pin.
- Step 4:Stack the module and lattice, measure the shell size.
- Step 7:Assembly, put all module into 3D shell
- Step 8:Software debug
- Download the library and test program
- Select the board and serial to download after compiled it. Note, program use softwareSerial to debug, SoftwareSerial mySerial(9, 10). So need change the serial pin to D9,D10 on Microduino BT module, or change the code.
- Turn on the mobile BLE and APP, connect the Microduino and mobile, and then start to control.
Result
Boot into the game after rolling Microduino, snake color is green, fruit is red. Because of the lattice is very small, won't increase the snake length, instead to increase the speed, and keep a certain high speed. When the snake hit the walls, show "GAMGOVER" and your scores, then restart again.
The issue need pay attention
- Bread board jumper connection between pegboard and Microduino should be correct;
- The serial communication pin between MIcroduino BT and Microduino Core can't make a mistake.
Video
http://v.youku.com/v_show/id_XNjg0MDYwNzQw.html
Second solution:
Use Microduino double color lattice.
Advantage
- Square LED lights, very beautiful
- Microduino standard board, stack it directly
- Microduino double color lattice's size is 60*60mm, Visual effect is better.
Bill of Materials
Module |
Number |
Function
|
Microduino-Core |
1 |
Core module
|
Microduino-FT232R |
1 |
Download program
|
Microduino-BT |
1 |
Make connectin with mobile
|
Double color LED module |
1 |
Display
|
PCB |
1 |
Set up circuit
|
9_Pin Row needles |
6 |
Fix Microduino core
|
Soldering iron |
1 |
welding tool
|
Solder |
1 |
welding tool
|
Wire |
1 |
welding tool
|
tweezers |
1 |
welding tool
|
Debug
- Download library and test program
- Turn on IDE, select the board and serial, download program after compiled it.
- Step 3:Unplug the Microduino FT232 and plug in MIcrodino BT module.
- Turn on the mobile BLE and APP, connect the Microduino and mobile, then start to control.
- If connect success, Microduino BT indictor doesn't blink.
Boot to display “Microduino”:
Start the game:
Result
The effect is better using Microduino lattice!
Video
http://v.youku.com/v_show/id_XNjkyNTY5MDky.html
|