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 <= 10 instead of i = 10.

    Thanks
    Felix



  • Thanks a lot, Félix. I was concentrated on a big file and did not notice this .
    Regards
    Alain Hamradio F1CJN