materials for TeZ Bioreactor course
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
353 B

  1. #include <ESP32Servo.h>
  2. Servo myservo; // create servo object to control a servo
  3. // Recommended PWM GPIO pins on the ESP32 include 2,4,12-19,21-23,25-27,32-33
  4. int servoPin = 23;
  5. void setup() {
  6. myservo.setPeriodHertz(50);
  7. myservo.attach(servoPin);
  8. }
  9. void loop() {
  10. myservo.write(0);
  11. delay(2000);
  12. myservo.write(180);
  13. delay(2000);
  14. }