Home 2018 Forums Crumble Support Simple buggy motor control Reply To: Simple buggy motor control

#2219
Joseph
Keymaster

I suspect as the program runs through the loop, both ‘else’ sections are being executed and turning the motor off, hence the pulsing.

You could fix this by adding an ‘if C low’ in the else section of the if A statement.

Alternatively, you could change the program so it deals with the four combinations of each input separately. So for motor 1:

    A: HI C: LO — Motor 1 Forwards
    A: LO C: HI — Motor 1 Reverse
    A: LO C: LO — Motor 1 Stop
    A: HI C: HI — Motor 1 Stop (or could set forward)

I’ve just enabled attachments, so you can now upload your program. I’ll try and attach and image now…

Hope this helps!

Joseph

Attachments:
You must be logged in to view attached files.