-->
Page 1 of 1

wprint in for next loop slows and hangs

PostPosted: Mon Jul 04, 2016 3:40 am
by John L
Hardware, more recent NodeMCU, version AI-THINKER 4MB, and ESP Basic V3. Alfa 8.

Been playing and trying one of the blink examples.
When placing print or wprint in the blinkMe loop, loops normally about 5 times then slows right down and eventually finishes the loop but crashes the connection to the web browser, requiring hard power reset.
With Serial terminal connected, reports Exception (29) and dumps stack listing.

Also have numerous random resets during the pay, I have read about power supply stability importance and at this stage I'm not ruling anything out. But this is not related to above reported problem, without print or wprint example works fine.

Example listing

    noOfBlinks = 10
    pin = 16
    blinkDelay = 100
    [top]
    print "How many times to blink"
    textbox noOfBlinks
    print "Pin To use"
    textbox pin
    print "Blink Delay"
    textbox blinkDelay
    button "Blink Me Please", [blinkMe]
    button "Exit", [getMeOutOfHere]
    wait


    [blinkMe]
    for x = 1 to noOfBlinks
    io(po,pin,1)
    delay blinkDelay
    io(po,pin,0)
    delay blinkDelay
    wprint x
    next x
    print "Finished and waiting"
    wait

    [getMeOutOfHere]

    print "Terminated"
    end

Re: wprint in for next loop slows and hangs

PostPosted: Mon Jul 04, 2016 5:38 pm
by forlotto
The buffer gets filled up...

Try to use an html variable instead!

WPRINT with htmlvar() function:

To place a dynamic variable that will update on each refresh of the page with the current contents of that variable use the htmlvar function.

Each time browser is refreshed the latest contents of the variable are place in the page.

wprint htmlvar({var name})

Re: wprint in for next loop slows and hangs

PostPosted: Fri Jul 29, 2016 11:27 pm
by Mmiscool
Should be fixed in tonight's build