Add the following snippet to your HTML:<iframe frameborder='0' height='385' scrolling='no' src='https://www.hackster.io/CodeRocks/dc-motor-control-2f65bc/embed' width='350'></iframe>
A DC motor control for Arduino Uno.
Read up about this project on
I changed a motor tutorial to work with my board.
int m = 5; void setup() { pinMode(m, OUTPUT); Serial.begin(9600); while (! Serial); } void loop() { if (Serial.available()) { int speed = Serial.parseInt(); if (speed >= 0 && speed <= 255) { analogWrite(m, speed); } } }
Please log in or sign up to comment.
Comments
Please log in or sign up to comment.