Netduino home hardware projects downloads community

Jump to content


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.

kaiser

Member Since 26 Sep 2012
Offline Last Active Nov 30 2012 07:31 PM
-----

Topics I've Started

Need Help with DFRduino motor Shield

26 September 2012 - 02:20 AM

Hello guys, I'm a newbie of netduino and I just read some thread from this forum to start my netduino robot project. finally I decide to use the DFRobot's motor shield. Unfortunately, When I hook up everything and run the sample from forum, Nothing happens to my motor. I'm pretty sure the motors works fine, so I think maybe something wrong with my wiring, Can you guys help to figure out what's wrong this it. I even wonder if the shield cannot work at all. I noticed the controller for this shield is L298P, but the demo code works on L298N, will this cause the problem? Here I attached the sample code. There's no compile error or run time exception happens at all. it just doesn't work for my motor. I set break point for these code and it seems work correctly. HBridge MotorDriver = new HBridge(new Netduino.PWM(Pins.GPIO_PIN_D6), Pins.GPIO_PIN_D7, new Netduino.PWM(Pins.GPIO_PIN_D5), Pins.GPIO_PIN_D4); // Motor 1 half speed backward MotorDriver.SetState(HBridge.Motors.Motor1, -50); // Motor 2 half speed forward MotorDriver.SetState(HBridge.Motors.Motor2, 50); // Lets run for 5 seconds Thread.Sleep(5000); // Motor 1 full speed backward MotorDriver.SetState(HBridge.Motors.Motor1, -100); // Motor 2 full speed forward MotorDriver.SetState(HBridge.Motors.Motor2, 100); // Lets run for 5 seconds Thread.Sleep(5000); // Stops both motors MotorDriver.SetState(HBridge.Motors.Motor1, 0); MotorDriver.SetState(HBridge.Motors.Motor2, 0);

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.