I am trying to get the proper code to run an EMG 30 motor. This motor is hooked up to an Arduino Uno and Devantech MD25 in I2C configuration. I tried running the sample code from the Devantech website, but could only get the motor to run sporadically. I thought I would start from scratch and learn how to program this motor, so I used the code below:
}[/code]
When I run this code, I get the error message: “expected constructor, destructor, or type conversion expected before ‘void’” Could you tell me what additional code I need to add to make the motor run? I’m trying to learn the very basics of controlling the motor by the software, and would like to know just the bare minimum of what code is needed to run one motor - just enough to turn the motor on and off.
I ran the code that you gave in the example, and nothing happened. I have the motors setup in the I2C protocol, but nothing happened when I uploaded the code…the motors did not move. What am I doing incorrectly? The green LED on the MD25 flashes about once per second, alongside the steady red LED on the MD25. I know the motors are working, because once in a while they will run, although I can’t explain why.