Global Variables - How to code an Arduino

preview_player
Показать описание
Through the use of 'global variables', you are able to keep track of the state of your application as it runs. You can use it to keep the previous sensor reading or any other form of input.

This is in comparison to 'local variables' (to the function) which will reset each time the function gets called - in this video we see how it comes into play with the 'loop' function.

If this video helped you out and you'd like to see more, make sure to leave a like and subscribe to dcode!
Рекомендации по теме
Комментарии
Автор

so basally a global variable is a variable declared outside the void loop function correct ?

ga
Автор

sir, can you help in making arduino code program for dual pulse batteryweld controller. i am using arduino uno, oled display, encoder switch. when foot switch is pressed the preweld time in ms startgiving an output. then apause occurs. then a post weld time occurs. the output should vary with the power %set on display. p1 &p2..pls help me out

rajeshshelke
Автор

Your name is Dom, right? I heard Dumb, ... even the subtitles says "my name is dumb"

DxBangD