My project is a [u]5 motor robot arm[/u]. I have a megamoto plus mega2560. I got the test program running (megamoto test code) ramp up/down and modified enough to show that the high amp 9 vdc drill motor motors I am using can be handled by the megamotoplus. I am currently zeroing in on the 2nd 8 inch arm and one motor for now. I need help with code that will run one loop when a switch or button is pushed. (and act as a one shot-(switch on or button pushed for short or long time)) I am using a 50/1 worm gear and 3.3/1 belt pulley ratio so about 2.2 motor revs per degree. I have run with a direct toggle switch to show it will run. I want the loop to ramp up and down and travel 180 degrees, delay stop and repeat back to home. I want to use a pot on the output shaft or an encoder on the motor. ( I have both, but 1st want to see if the accuracy of a pot will be good enough.) Eventually I will add the other arms etc I can pay some so am interested if someone could help me. I have some knowledge with PLCs, but my background is Mechanical.
Thanks Jack firstname.lastname@example.org