I like to reset all my devices and here is the routine:
sys.disable5V(); // turn off switching transistor at the hSensor 5V supply line
sys.delay(200); // wait for discharging capacitors
sys.enable5V(); // turn on switching transistor again
sys.delay(50); // wait for stable reading from sensors
I have copied it from EXAMPLES/power-supply panel
Is it still valid the above?
it should be working now but you need to change the hFramework version in WebIDE to “Development”:
or if you work with VSCode, you need to build the newest version of hFramework from Github, following this tutorial:
By the way: 200ms can be too much or too less for capacitors to discharge, depending on the current consumption on 5V line. You may have to adjust this value.
Thanks, your suggestion works, however this change to “Development” triggers other errors in my program.
I got the error:
MotorControl.cpp:40:8: error: ‘class hFramework::hMotor’ has no member named ‘setActiveBreaking’
So I prefer then to go back to ‘stable’ without the resetDevices() routine I have made.
For the time being while inFramework version in WebIDE to “Development" mode,
until it gets corrected.
correction previous lines:
We’ve made some changes in hFramework library. One of them was replacing:
because it contained a spelling mistake. Development version on our IDE is the newest one and contains all the changes. We will unify stable and development versions as soon as possible. For now you have to use Development and
hMot1.setActiveBraking(); syntax. Sorry for inconvenience.