connect servo to arduino
// Include the Servo library #include <Servo.h>
// Declare the Servo pin
int servoPin = 3;
// Create a servo object
Servo Servo1;
void setup() {
// We need to attach the servo to the used pin number
Servo1.attach(servoPin);
}
void loop(){
// Make servo go to 0 degrees
Servo1.write(0);
delay(1000);
// Make servo go to 90 degrees
Servo1.write(90);
delay(1000);
// Make servo go to 180 degrees
Servo1.write(180);
delay(1000);
}
Also in C:
- how to print the elements of a linked list in c
- select all file from date powershell
- how can i show ant text by onclick
- YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
- fgets c
- FILE*
- difference between signed apk and unsigned apk
- pointeurs c
- main function in c
- atoi
- add border to image android
- error 403
- program to concatenate two strings in c
- windeployqt example
- slurm array job
- fa fa-facebook
- how to write flash memory in stm32f030
- putting value of struct in runtme
- how to store a user input with spaces in c
- multiplication of two numbers in c
- joins in update query
- find the largest number in else if javascript
- how to change the mapping from jkil to wasd in vim
- python web crawler