Home > other >  Ask bosses can change the code, the realization of key control lights out (click on a bright again c
Ask bosses can change the code, the realization of key control lights out (click on a bright again c

Time:09-26

CodePudding user response:

To create a global variable x, like you have four kinds of circumstances, is within the main function is to write a switch case, external interrupt trigger a let x from 1, x is equal to 4 is reset,

CodePudding user response:

Thank you, the third picture that programs use need not change

CodePudding user response:

To change, global variables, since the increase, and to determine whether greater than or equal to 4, so will be reset

CodePudding user response:

Global variables

CodePudding user response:

reference 4 floor yjggiug response:
the problem of global variable

Could you help me change, thank you

CodePudding user response:

reference 1st floor SeanOY response:
create a global variable x, like you have four kinds of circumstances, is within the main function is to write a switch case, external interrupt trigger a let x from 1, x is equal to 4 reset,

Hello, how do you write this global variable

CodePudding user response:

Just outside the function variable declaration

CodePudding user response:

refer to 7th floor SeanOY response:
is on the outside of the function declaration variable

Can you help me to change a complete code, thank you

CodePudding user response:

, and it ourselves, search the global variable is not just a matter of
  • Related