Arduino 2048 Games

Source: Internet
Author: User

This article is copied directly from the forum and can be accessed by clicking on the Forum link .

I. Overview
Also do not understand the project submission format, refer to other projects have been submitted in the format.
Look at the project of the great God, I can only say that the heavy participation to comfort themselves, to their courage. Let's call it a small production, the project is too big on the name of the match AH.
Contact Arduino for three months, this small production is to test each sample program to write their own first complete project, the main purpose is familiar with the Arduino IDE and the Arduino programming grammar, as well as practice keys and LCD (I will tell you the real purpose is to have a participation award?) ^_-). Also take advantage of the competition, through the version and the supervision of the altar friends to urge themselves to overcome procrastination

Ii. List of components

    • Arduino motherboard piece (This is another great altar friend made by himself)
    • LCD12864 piece (preferably a yellow-green screen, the previous use of blue screen white-found photo effect is not good)
    • Key six (need to handle the foot, because the key foot is flat, the horizontal is not good to insert the breadboard, vertical and lead to direct short-circuit contact)
    • Pull-down resistor six (casually take 100K, resistance requirements are not very strict appearance, anyway working normally)
    • Power One (randomly find a mobile power)
    • A piece of bread (so that you can avoid exposing the ugly welding, haha)
    • The bread plate connecting line and the U-shaped line several (U-shaped line is actually the network folding)


Third, the production process

1. Components List


2. Key handling



3. Bending Wiring and resistance


4. Insert the wiring and resistance after the button



5. Insert the button


6. Put the Arduino position on the right


7. Arduino wiring


8. Connect the LCD


9. Connect the power supply


10. Add the Ammonium key description



Four, the code
Package upload attachments, because the IDE can not use Chinese, so did not write comments, now processing, one will upload ~
The logic and display modules are separated in small productions for easy maintenance.
Using the U8glib, the attachment was also uploaded according to the competition requirements.
Download:
    U8glib_arduino_v1.13.zip
    Game2048.zip

Five, interface display

1. Main interface
foreground 2048 characters, background 2 0 4 84 digits down, imitating the effect of the matrix. Press any key to start the prompt flashing prompt.


2. Game interface
Cue scores and cross-border goals.


3. Customs Tips
Clearance refreshes the next target and prompts to continue. Because the display range is limited, there is no detailed prompt to press any key to continue.


4. Tips for Customs clearance
Display range limit, after the goal 16384 to display five digits, the impact of beautiful, so even if the customs clearance, at this time only press the restart key or reset to start again.


VI. Video Demo
  

Arduino 2048 Games

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.