Go Down

Topic: DC motor (Read 4389 times) previous topic - next topic


Code: [Select]
const int analogInPin = A0;
A0 is the value to use when using an analog pin (pin 0) as a digital pin. Stupid ass addition to WProgram.h, if you ask me.

You want to use 0, not A0.

Code: [Select]
   analogWrite(analogOut, LOW);
Pin 4 is not a PWM pin, so you can't use analogWrite to write to that pin.

What happens when sensor value IS 512?


OK Thanks !! that made it work but now how do I get it to run faster each way?


that made it work but now how do I get it to run faster each way?

Make what run faster? The code? Or the motor?


I mean the motor  I would like to make it stand still when the pot. is in the middle and then spin faster each way when I turn the potentiometer.


Try re-reading Reply #7. You were on the right track.


thanks for your help but I think i've burned my arduino becouse the atmel chip is getting hot when I plug it in to the usb. dont't really what I did wrong:D so will have to get a new one, i think.


Hi !!!

I'm back an I have a new chip :D.
And I'm also making a cnc mill and I've got a new driver for the stepper the Leadshine dm856 I'm waiting and looking for other parts so i have time to play. :)

so now I have found on this treat:http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1261516343/15

a code that makes it go faster now I'll try to make that What I wanted so that it spins both ways.

any suggestions ??

thanks in advance.

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131