Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

little modification #12

Open
Akex2 opened this issue Sep 24, 2016 · 4 comments
Open

little modification #12

Akex2 opened this issue Sep 24, 2016 · 4 comments

Comments

@Akex2
Copy link

Akex2 commented Sep 24, 2016

Hi Misan,
I'm trying to use your arduino sketch, but I want to compile it for Arduino nano or Arduino pro.

And on my h-bridge board:http://www.ebay.fr/itm/Dual-Motor-Driver-Module-Board-H-bridge-DC-MOSFET-IRF3205-3-36V-10A-30A-TE589-/381782113555?hash=item58e3fcbd13:g:X9IAAOSwmLlX4uGE
there is only one PWM input, and one "pin dir". So to make the motor turn clockwise or reverse either I activate the pin dir, or I deactivate the pin dir. Is it possible to do this ? and how can i do this please ?
Thanks !

@misan
Copy link
Owner

misan commented Sep 24, 2016

Have a look at how something similar is done for brushless motor https://github.com/misan/dcservo/blob/master/dcservoESP_magencoder_brushless.ino#L125

In your case last command should be analogWrite(PWM, abs(out)); though. Of course PWM and DIR pints would need to be defined within your code as output pins.

@coupmstr
Copy link

If your still struggling with this I have a demo code for this board that will help you uncerstand it

@misan misan closed this as completed Nov 20, 2016
@misan
Copy link
Owner

misan commented Nov 20, 2016

Sorry, I pressed the wrong button :-)

I meant that coupmst, please feel free to share a link here,

@misan misan reopened this Nov 20, 2016
@coupmstr
Copy link

https://drive.google.com/file/d/0B-OvshlKUhh3Z1Bubk5PMERETVU/view?usp=sharing
Best way I can find to share this one, I had issues working out how to work it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants