It might be, as it isn't entirely clear what is to be attempted at this point. If the intent is to wipe out memory then reset(1) is what you are after. If the intent is to re-initialize the position variables, then a separate function might be one solution to perform that task. From the two 'When I press and release' text instructions, the motors start and then stop. Function stopWallAvoid() stops updating and halts the motors. Code should remain in memory. dump() to reveal. What is expected at that point?
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Wed 2020.03.04
I have no experience with SmartiBot nor dpad.
Hello Steve @user104966 and thank you for posting your code block.
It would be nice to understand what details were attempted to be conveyed. Please post link so that we may follow with that understanding.
Again, please post the referenced web link.
Looking over the code module I find neither a load() function or an onInit() function.
Am I to conclude that
reset()
was entered into the Left Hand console side of the WebIDE just prior to this statement?It might be, as it isn't entirely clear what is to be attempted at this point. If the intent is to wipe out memory then
reset(1)
is what you are after. If the intent is to re-initialize the position variables, then a separate function might be one solution to perform that task. From the two 'When I press and release' text instructions, the motors start and then stop. Function stopWallAvoid() stops updating and halts the motors. Code should remain in memory.dump()
to reveal. What is expected at that point?There isn't a reference to the reset() function and either button functions.
Is it possible that ALL the code is not in the attached file?