Hi there, first time posting so apologies if the post isn’t great.
I’m working on a self-balancing robot from the Ultimate 2.0 kit. Robot is built according to instruction, etc. But it doesn’t quite work. Even using the Firmware for it straight from the app/robot itself, without making any code ourselves, it doesn’t stay up - just violently throws itself against the box and maybe manages to stay up for a second or so before falling over.
But, as it’s a part of the college project, we want to write our own code for it. However, I can’t quite get it working - I’m not sure if it’s issue with my P & I values for the controller or just general lack of Arduino knowledge (haven’t programmed in it at all prior to this, pretty much).
I’ve seen some useful tips here, especially from @CommandeR (thanks for all the help so far!) but it still isn’t working and I’m pretty sure it’s the code itself. I’ll attach the txt file - hope that works.
Merv_code_1.0.zip (1.2 KB)
Please let me know if anyone has ideas, we’ve been struggling with this guy for the last few weeks so we would appreciate any advice.