Compile but does not work with a for next loop
-
My short exemple prints a number on the screen
But if I include a for next loop , it compiles but does not show the number on the M5 core screen.
If I uncomment the" for next" line, it does not print on the screen . Why ?#include <M5Stack.h>
#include "M5StackUpdater.h"
float voltage = 2224.33;void setup() {
M5.begin();
}
void loop() {
//for (int i = 1; i = 10; i++) {}
M5.Lcd.setTextColor(WHITE, BLUE);
M5.Lcd.drawString("Voltage = "+String(voltage)+" mV ",30,40,4);
delay(50);
} -
Hello @F1CJN_Alain
try with
for (int i = 1; i <= 10; i++)instead. Eg.i <= 10instead ofi = 10.Thanks
Felix -
Thanks a lot, Félix. I was concentrated on a big file and did not notice this .
Regards
Alain Hamradio F1CJN
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login