DIY Segway needs Laptop connection for proper work

Hi there,
I use a Due, a 9 Axis Motion Shield and two double H - Bridges for two DC Motors. The SW mainly is a PID - Controller that tries to keep the board with one Axel and two wheels under my body by reading the position out of the 9 Axis Shield.
As long as I have my mac book air connected to the programming port of the due, everything works fine, but after disconnecting the mac, the Software seems to be a different version, the one, that i used to get the step function of the system.
While uploading the software, there is no error message in the IDE 2.2.1.
I have no Serial.begin() in my setup(). So the code should be similar in both cases. It doesn't make a difference if i close the IDE before disconnecting or not. I have no idea how to figure out.
Probably someone knows?

cheers,
Mario

If the program successfully uploaded, it is stored in nonvolatile memory, and cannot be changed without connection to a programmer or another computer.

If you are confused about code versions, build in some sort of indicator or display and write code that on startup, announces the code version uploaded (could be number of LED blinks, etc.).

Hi again, the problem was me, feeding with a 7805 through the motion shield to the due. Getting the voltage supply from the mac worked fine (should be 5V on a USB C port), but getting the 5V in the Vin Pin from the 7805 didn't work fine after disconnecting the mac.
Thank you for thinking!

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.