I've just started coding with arduino (never coded in any program before) this school year. I#m making a reaction test with an LCD display, a button and 3 LEDS. I#m stuck on the millis() command. I#ve tried to make a sort of "stopwatch" but my arduino book doesnt help.
this is my code: #include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C Lcd(0x27,16,2);
int i = 8;
long start;
long stopp;
long diff;
void setup() {
There's a reason to ask for a complete (optimally minimal) sketch
Do you have problems with 'i' was not declared in this scope ?
Many issues come from variable definitions, which is an important part of the code.
Describing the observed problem gives you better answers. Please quote the compiler message, if that's your problem, @wouldlikesomehelpthanks.
I've just started coding with arduino (never coded in any program before) this school year. I#m making a reaction test with an LCD display, a button and 3 LEDS. I#m stuck on the millis() command. I#ve tried to make a sort of "stopwatch" but my arduino book doesnt help.
this is my code: #include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C Lcd(0x27,16,2);
int i = 8;
long start;
long stopp;
long diff;
void setup() {
millis() is a builtin function. It returns the number of milliseconds elapsed since the last reset as an unsigned long int. You didn't use code tags, so it's quite hard to make sense of your code, but one thing I did notice:
Hello
Take some time and describe in simple words what shall happens and this very simple.
You may post your sketch well formated and in code tags <"/">, too.
This translator will help you to work international.
I have merged your 2 topics on the same subject. Please do not start multiple topics on the same subject as they just waste the time of the volunteers trying to help you. Please read How to get the best out of this forum , especially the bit about posting code in code tags </> and the bit about us being volunteers.