Single chip LCD12864 linked list to achieve the greedy snake source code

Publisher:QianfengLatest update time:2019-10-21 Source: 51heiKeywords:MCU Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

                //Draw the snake body

                for(n=0;n                {

                        Lcd_DisNode(snake.x[n],snake.y[n],1);

                }

                

                delay((10-speed)*300);          

                delay((10-speed)*300);

                Lcd_DisNode(snake.x[snake.node-1],snake.y[snake.node-1],0);

                switch(key)

                {

                        case dgrade:

                                        key=0;

                                        if(--speed<=0)

                                                speed=9;

                                                DisScore();

                                           DisSpeed();

                                        break;

                        case igrade:

                                  key=0;

                            if(++speed>=10)

                                                speed=1;

                                        DisScore();

                                        DisSpeed();

                                break;

                        case down:

……………………



[1] [2]
Keywords:MCU Reference address:Single chip LCD12864 linked list to achieve the greedy snake source code

Previous article:The single chip microcomputer adds a PCF8574 module to realize the IIC mode to drive LCD1602
Next article:Two-way learning fan remote control switch with natural wind MCU source program + circuit

Recommended ReadingLatest update time:2024-11-16 17:28

MSC51 MCU Traffic Light Program
/*************************************************************** * Program name: MSC51 single-chip traffic light Crystal: 12.00 P1 port * Experimental object: HC6800 single-chip learning development board * Single-chip: AT89S52 or STC89C52 Time: The red and green lights are on for 10s each * * For more inform
[Microcontroller]
Using AVR microcontroller to control GSM module to send and receive text messages
GSM modules are useful when our projects require remote access. With these modules we can do everything that our normal mobile phones can do, such as making/receiving calls, sending/receiving SMS, connecting to the internet using GPRS, etc. You can also connect a normal microphone and speaker to this module to talk to
[Microcontroller]
Using AVR microcontroller to control GSM module to send and receive text messages
C language program using DS18B20 temperature sensor in single chip microcomputer (reference 6)
/******************************************/ // // DS18B20 thermometer C program // 2007.06.08 /******************************************/ //Use AT89C2051 microcontroller, 12MHZ crystal oscillator, common anode LED digital tube //P1 port outputs segment code, P3 port scans, P3.4 connects to DS18B20 #include "r
[Microcontroller]
Design of sitting posture (reminder) correction system based on single chip microcomputer
1. System hardware design The root of writing posture control lies in sitting posture control. This design is to design a corrector that integrates detection, control, and voice reminder. It detects the distance between the placement position and the student's chest as the horizontal distance; and selects the height o
[Microcontroller]
Design of sitting posture (reminder) correction system based on single chip microcomputer
51 Single Chip Microcomputer (Ten)—— 8-bit Digital Tube-Digital Tube Scanning
1. Principle Introduction The control circuit of the digital tube is introduced in detail in "51 Single-Chip Microcomputer (VIII)", and the hardware circuit is shown in the figure below. In this experiment, we scan the digital tube. When conducting the experiment, you need to connect the P00~P07 pins of the microcon
[Microcontroller]
51 Single Chip Microcomputer (Ten)—— 8-bit Digital Tube-Digital Tube Scanning
[51 MCU Quick Start Guide] 9: Power saving mode (low power consumption)
Puzhong 51-Single-core-A2 STC89C52 Keil uVision V5.29.0.0 PK51 Prof. Developers Kit Version:9.60.0.0 Hard Knowledge        Excerpted from "STC89C52 Series Microcontroller Device Manual"        Only supports power-down mode, not idle mode        The STC89C52 series microcontrollers can run in two power saving modes t
[Microcontroller]
[51 MCU Quick Start Guide] 9: Power saving mode (low power consumption)
Several common reasons for serious MCU function abnormalities
When we are engaged in MCU application development, we will inevitably encounter MCU chip abnormalities. For example, abnormal reset, which is manifested by the reset pin having a level jump or simply being at the reset level; when debugging and tracing the code, it is found that the code often cannot enter the user's
[Microcontroller]
Design of electronic tour guide MP3 based on single chip microcomputer
introduction MP3 players have developed rapidly in recent years, and a large number of products have been launched. Tourism, an emerging industry, has been booming in recent years. Compared with manual tour guides, electronic tour guides can avoid the instability of service quality caused by personal factors of tour
[Microcontroller]
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号