SHARE
TWEET

Untitled

a guest Jun 25th, 2019 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <WiFi.h>
  2. #include <ESP32Servo.h>
  3.  
  4. #define DC_MOTOR_PIN1 25
  5. #define DC_MOTOR_PIN2 26
  6.  
  7.  
  8. #define LEFT_CONTROL_PIN 32
  9. #define RIGHT_CONTROL_PIN 35
  10.  
  11. BEGIN
  12.  
  13. Servo servo;
  14. char c, b, a;
  15. bool servo_state = false;
  16.  
  17. const char *ssid = "To6ka";
  18. const char *pass = "123456to6ka";
  19.  
  20. WiFiServer server(80);
  21.  
  22. void setup()
  23. {
  24.   Serial.begin(115200);
  25.   Serial.println("Arduino is ready!");
  26.  
  27.  
  28.   WiFi.softAP(ssid, pass);
  29.   IPAddress IP = WiFi.softAPIP();
  30.   Serial.print("AP IP address: ");
  31.   Serial.println(IP);
  32.  
  33.   server.begin();
  34.  
  35.   pinMode(DC_MOTOR_PIN1, OUTPUT);
  36.   pinMode(DC_MOTOR_PIN2, OUTPUT);
  37.   servo.setPeriodHertz(50);
  38.   servo.attach(12);
  39.   servo.write(87);
  40.  
  41. }
  42.  
  43. END
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top