The Netduino forums have been replaced by new forums at community.wildernesslabs.co.
This site has been preserved for archival purposes only
and the ability to make new accounts or posts has been turned off.
The shield is quite simple; you can connect 2 DC-motors to it, and by sending some signals it's possible to change voltage to each motor from -12V to +12V (when Vin is set to 12V)
Now I got it to work on the Netduino I'm looking for a good solution to make it easy to control. I have four ways in mind, these codes do the same. Which one do you prefer?
The code sets motor one in reverse at full speed and the second motor half speed forward.
Hi guys (at now, no girls at sight...at least from your pictures)
I voted for the 4th option, because it is the most abstract.
I think that the most exciting task in the motor control is the speed-shaping, that is *NOT* easy!
Consider having a simple motor, where you may control its speed from -100 to +100%.
Now imagine having a dish hardly connected to the motor axis. On the dish there is a sign (e.g. at 12 o'clock).
The deal is: the motor/dish is idle with the sign exactly at noon. Let spin the dish N times as fast as possible, then position the sign back to noon.
When your brain is melted, but you've got the goal, just add this puzzle:
- grant the performance with dishes of different weight.
Biggest fault of Netduino? It runs by electricity.
The motor shield is intended for DC motors which aren't very precise. But it can be very useful for robots. You can let them walk slow or fast, forward and backward. If you want a precize motor it should be a servo anyway I suppose.
There's a solution for every problem, this one isn't a solution for clocks but a very nice one for rc cars and stuff I suppose
I liked the 4th myself as well, but I like the diversity in opinions in this.
To be honest, I designed "MotorShield.SetState(Motors.Motor1, Directions.Backward, 100);" at first, since that's how the shield works; a pin that switches forward and backward and a pin that defines speed. But while giving it some thought I decided to do "MotorShield.SetState(Motors.Motor1, -100);". Then I though some more and was like: "what would others do and why?"
And to get an answer on the first thing; Chris, if you read this, can you query how many users have their gender on female?
There are definitely some ladies who frequent the forums. But they're vastly outnumbered by the gentlemen, so perhaps they don't speak up often (or don't disclose their gender).
[ That said, ladies...you are welcome in this community. The guys are friendly. And if they aren't, just let me know ]
Ahhh like that. it's near to impossible to drive both motors simultaniously with exactly the same speed. DC-motors aren't precise and can't be trusted. But for just some speed (like netduino based vehicles) this is good enough.
Ohh it's a tie between:
MotorShield.SetState(Motors.Motor1, Directions.Backward, 100); (3 votes [50.00%])
MotorShield.SetState(Motors.Motor1, -100); (3 votes [50.00%])
hmmm appairently there are good reasons for me to doubt between those two options
I've just voted for the latter - the speed value can include the direction, positive - forward, negative - backward, zero - stop, so it is not necessary to have an extra 'direction' enum. I don't know what modes the used H-bridge supports, IMHO the reasonable use of enum would be to represent possible DC motor modes - running (left or right), coasting (free run) and braking (short circuit), because some of them (coasting, braking) do not have the additional speed parameter.