├── Smart Home ├── Smart RGB Led Controller │ ├── Youtube Video.txt │ ├── ESP-12E & 5V.png │ ├── Nodemcu & 5V.png │ ├── ESP-12E & 12V.png │ ├── Nodemcu & 12V.png │ ├── Circuit diagram to programming ESP-12E.png │ └── Smart_RGB │ │ └── Smart_RGB.ino ├── Smart Roller Blind │ ├── Youtube Video.txt │ ├── 3D Design.png │ ├── 3D Models │ │ ├── Axel.stl │ │ ├── Main Body.stl │ │ ├── Main Gear.stl │ │ ├── Top Cover.stl │ │ ├── Bottom Cover.stl │ │ ├── Motor Gear Left.stl │ │ └── Motor Gear Right.stl │ ├── Circuit Diagram.png │ ├── Circuit diagram to programming ESP-12E.png │ └── Smart_Roller_Bilind_V2 │ │ └── Smart_Roller_Bilind_V2.ino ├── Smart Room Thermometer │ ├── Youtube Video.txt │ ├── DHT-11_ESP-12E_1.png │ ├── DHT-11_ESP-12E_2.png │ ├── DHT-11_Nodemcu_1.png │ ├── DHT-11_Nodemcu_2.png │ └── Smart_Room_Thermometer │ │ └── Smart_Room_Thermometer.ino ├── Smart Plant Watering │ ├── Youtube Video.txt │ ├── Circuit.png │ ├── 3D Models │ │ └── Smashing Jaagub.stl │ └── Smart_Plant_Watering │ │ └── Smart_Plant_Watering.ino └── Smart Switch │ ├── Smart Plug Circuit diagram.png │ └── Smart_Switch │ └── Smart_Switch.ino ├── 3D Robot Arm ├── Youtube Video.txt ├── 3D Models │ ├── Arm_1.stl │ ├── Arm_2.stl │ ├── Clamp.stl │ ├── Arm Base.stl │ ├── Arm Hub.stl │ ├── Gear X3.stl │ ├── Main Axel.stl │ ├── Robot Arm.stl │ ├── Base Part_1.stl │ ├── Base Part_2.stl │ ├── Middle Axel.stl │ └── Middle Gear.stl ├── Circuit Diagram.png └── Codes │ ├── Robot_Arm_3D_Easing │ └── Robot_Arm_3D_Easing.ino │ └── Robot_Arm_3D_Box_Easing │ └── Robot_Arm_3D_Box_Easing.ino ├── Coin Counter&Sorter ├── Youtube Video.txt ├── 3D Models │ ├── Funnel.stl │ ├── Coin Tray.stl │ ├── LCD Holder.stl │ ├── Main Axle.stl │ ├── Main Body.stl │ ├── Main Ramp.stl │ ├── Coin Catcher.stl │ ├── Motor Holder.stl │ └── Coin Seperator.stl ├── Screenshot 2023-01-22 173026.png └── Coin_Counter │ └── Coin_Counter.ino └── RC Transmitter&Receiver ├── Circuit Diagram ├── RC Car.png ├── RC Receiver Schematic.png ├── RC Transmiter Circuit.png └── RC Transmiter Schematic.png ├── 3D Models ├── RC Car │ ├── Main Body.stl │ ├── Middle Cover.stl │ ├── Back Suspension.stl │ ├── Back Top Cover.stl │ ├── Front Top Cover.stl │ ├── Front Whel Axel.stl │ ├── Steering Arms.stl │ ├── Steering Hubs.stl │ ├── Back Whel Axel x2.stl │ ├── Back Whel Hub x2.stl │ ├── Front Whel Hub x2.stl │ ├── Suspension Arm x8.stl │ ├── Front Suspension x2.stl │ └── Motor Top Cover x2.stl └── RC Transmitter │ ├── Handles.stl │ ├── Joystick.stl │ ├── Main Body.stl │ ├── Bottom Cover.stl │ └── Bottom Cover 2.stl ├── Youtube Video.txt └── Code ├── RC Transmitter └── RC Transmitter.ino ├── RC Receiver Test └── RC Receiver Test.ino ├── RC Receiver Arduino Car └── RC Receiver Arduino Car.ino └── RC Receiver Robot Arm └── RC Receiver Robot Arm.ino /Smart Home/Smart RGB Led Controller/Youtube Video.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /3D Robot Arm/Youtube Video.txt: -------------------------------------------------------------------------------- 1 | https://youtu.be/YqrbWCVa3xA -------------------------------------------------------------------------------- /Coin Counter&Sorter/Youtube Video.txt: -------------------------------------------------------------------------------- 1 | https://youtu.be/EQvXOtrU3Vk -------------------------------------------------------------------------------- /Smart Home/Smart Roller Blind/Youtube Video.txt: -------------------------------------------------------------------------------- 1 | https://youtu.be/yxsz6cjm-5I -------------------------------------------------------------------------------- /Smart Home/Smart Room Thermometer/Youtube Video.txt: -------------------------------------------------------------------------------- 1 | https://youtu.be/gGyuAqpNo9o -------------------------------------------------------------------------------- /Smart Home/Smart Plant Watering/Youtube Video.txt: -------------------------------------------------------------------------------- 1 | https://www.youtube.com/watch?v=w4cUfedZXZE -------------------------------------------------------------------------------- /3D Robot Arm/3D Models/Arm_1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/3D Robot Arm/3D Models/Arm_1.stl -------------------------------------------------------------------------------- /3D Robot Arm/3D Models/Arm_2.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/3D Robot Arm/3D Models/Arm_2.stl -------------------------------------------------------------------------------- /3D Robot Arm/3D Models/Clamp.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/3D Robot Arm/3D Models/Clamp.stl -------------------------------------------------------------------------------- /3D Robot Arm/Circuit Diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/3D Robot Arm/Circuit Diagram.png -------------------------------------------------------------------------------- /3D Robot Arm/3D Models/Arm Base.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/3D Robot Arm/3D Models/Arm Base.stl -------------------------------------------------------------------------------- /3D Robot Arm/3D Models/Arm Hub.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/3D Robot Arm/3D Models/Arm Hub.stl -------------------------------------------------------------------------------- /3D Robot Arm/3D Models/Gear X3.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/3D Robot Arm/3D Models/Gear X3.stl -------------------------------------------------------------------------------- /3D Robot Arm/3D Models/Main Axel.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/3D Robot Arm/3D Models/Main Axel.stl -------------------------------------------------------------------------------- /3D Robot Arm/3D Models/Robot Arm.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/3D Robot Arm/3D Models/Robot Arm.stl -------------------------------------------------------------------------------- /3D Robot Arm/3D Models/Base Part_1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/3D Robot Arm/3D Models/Base Part_1.stl -------------------------------------------------------------------------------- /3D Robot Arm/3D Models/Base Part_2.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/3D Robot Arm/3D Models/Base Part_2.stl -------------------------------------------------------------------------------- /3D Robot Arm/3D Models/Middle Axel.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/3D Robot Arm/3D Models/Middle Axel.stl -------------------------------------------------------------------------------- /3D Robot Arm/3D Models/Middle Gear.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/3D Robot Arm/3D Models/Middle Gear.stl -------------------------------------------------------------------------------- /Coin Counter&Sorter/3D Models/Funnel.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/Coin Counter&Sorter/3D Models/Funnel.stl -------------------------------------------------------------------------------- /Coin Counter&Sorter/3D Models/Coin Tray.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/Coin Counter&Sorter/3D Models/Coin Tray.stl -------------------------------------------------------------------------------- /Coin Counter&Sorter/3D Models/LCD Holder.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/Coin Counter&Sorter/3D Models/LCD Holder.stl -------------------------------------------------------------------------------- /Coin Counter&Sorter/3D Models/Main Axle.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/Coin Counter&Sorter/3D Models/Main Axle.stl -------------------------------------------------------------------------------- /Coin Counter&Sorter/3D Models/Main Body.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/Coin Counter&Sorter/3D Models/Main Body.stl -------------------------------------------------------------------------------- /Coin Counter&Sorter/3D Models/Main Ramp.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/Coin Counter&Sorter/3D Models/Main Ramp.stl -------------------------------------------------------------------------------- /Smart Home/Smart Plant Watering/Circuit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/Smart Home/Smart Plant Watering/Circuit.png -------------------------------------------------------------------------------- /Smart Home/Smart Roller Blind/3D Design.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/Smart Home/Smart Roller Blind/3D Design.png -------------------------------------------------------------------------------- /Coin Counter&Sorter/3D Models/Coin Catcher.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/Coin Counter&Sorter/3D Models/Coin Catcher.stl -------------------------------------------------------------------------------- /Coin Counter&Sorter/3D Models/Motor Holder.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/Coin Counter&Sorter/3D Models/Motor Holder.stl -------------------------------------------------------------------------------- /Coin Counter&Sorter/3D Models/Coin Seperator.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/Coin Counter&Sorter/3D Models/Coin Seperator.stl -------------------------------------------------------------------------------- /RC Transmitter&Receiver/Circuit Diagram/RC Car.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/RC Transmitter&Receiver/Circuit Diagram/RC Car.png -------------------------------------------------------------------------------- /Smart Home/Smart Roller Blind/3D Models/Axel.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/Smart Home/Smart Roller Blind/3D Models/Axel.stl -------------------------------------------------------------------------------- /Smart Home/Smart Roller Blind/Circuit Diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/Smart Home/Smart Roller Blind/Circuit Diagram.png -------------------------------------------------------------------------------- /Coin Counter&Sorter/Screenshot 2023-01-22 173026.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/Coin Counter&Sorter/Screenshot 2023-01-22 173026.png -------------------------------------------------------------------------------- /Smart Home/Smart RGB Led Controller/ESP-12E & 5V.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/Smart Home/Smart RGB Led Controller/ESP-12E & 5V.png -------------------------------------------------------------------------------- /Smart Home/Smart RGB Led Controller/Nodemcu & 5V.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/Smart Home/Smart RGB Led Controller/Nodemcu & 5V.png -------------------------------------------------------------------------------- /RC Transmitter&Receiver/3D Models/RC Car/Main Body.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/RC Transmitter&Receiver/3D Models/RC Car/Main Body.stl -------------------------------------------------------------------------------- /Smart Home/Smart RGB Led Controller/ESP-12E & 12V.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/Smart Home/Smart RGB Led Controller/ESP-12E & 12V.png -------------------------------------------------------------------------------- /Smart Home/Smart RGB Led Controller/Nodemcu & 12V.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/Smart Home/Smart RGB Led Controller/Nodemcu & 12V.png -------------------------------------------------------------------------------- /Smart Home/Smart Roller Blind/3D Models/Main Body.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/Smart Home/Smart Roller Blind/3D Models/Main Body.stl -------------------------------------------------------------------------------- /Smart Home/Smart Roller Blind/3D Models/Main Gear.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/Smart Home/Smart Roller Blind/3D Models/Main Gear.stl -------------------------------------------------------------------------------- /Smart Home/Smart Roller Blind/3D Models/Top Cover.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/Smart Home/Smart Roller Blind/3D Models/Top Cover.stl -------------------------------------------------------------------------------- /Smart Home/Smart Room Thermometer/DHT-11_ESP-12E_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/Smart Home/Smart Room Thermometer/DHT-11_ESP-12E_1.png -------------------------------------------------------------------------------- /Smart Home/Smart Room Thermometer/DHT-11_ESP-12E_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/Smart Home/Smart Room Thermometer/DHT-11_ESP-12E_2.png -------------------------------------------------------------------------------- /Smart Home/Smart Room Thermometer/DHT-11_Nodemcu_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/Smart Home/Smart Room Thermometer/DHT-11_Nodemcu_1.png -------------------------------------------------------------------------------- /Smart Home/Smart Room Thermometer/DHT-11_Nodemcu_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/Smart Home/Smart Room Thermometer/DHT-11_Nodemcu_2.png -------------------------------------------------------------------------------- /Smart Home/Smart Switch/Smart Plug Circuit diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/Smart Home/Smart Switch/Smart Plug Circuit diagram.png -------------------------------------------------------------------------------- /RC Transmitter&Receiver/3D Models/RC Car/Middle Cover.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/RC Transmitter&Receiver/3D Models/RC Car/Middle Cover.stl -------------------------------------------------------------------------------- /Smart Home/Smart Roller Blind/3D Models/Bottom Cover.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/Smart Home/Smart Roller Blind/3D Models/Bottom Cover.stl -------------------------------------------------------------------------------- /RC Transmitter&Receiver/3D Models/RC Car/Back Suspension.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/RC Transmitter&Receiver/3D Models/RC Car/Back Suspension.stl -------------------------------------------------------------------------------- /RC Transmitter&Receiver/3D Models/RC Car/Back Top Cover.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/RC Transmitter&Receiver/3D Models/RC Car/Back Top Cover.stl -------------------------------------------------------------------------------- /RC Transmitter&Receiver/3D Models/RC Car/Front Top Cover.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/RC Transmitter&Receiver/3D Models/RC Car/Front Top Cover.stl -------------------------------------------------------------------------------- /RC Transmitter&Receiver/3D Models/RC Car/Front Whel Axel.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/RC Transmitter&Receiver/3D Models/RC Car/Front Whel Axel.stl -------------------------------------------------------------------------------- /RC Transmitter&Receiver/3D Models/RC Car/Steering Arms.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/RC Transmitter&Receiver/3D Models/RC Car/Steering Arms.stl -------------------------------------------------------------------------------- /RC Transmitter&Receiver/3D Models/RC Car/Steering Hubs.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/RC Transmitter&Receiver/3D Models/RC Car/Steering Hubs.stl -------------------------------------------------------------------------------- /RC Transmitter&Receiver/3D Models/RC Transmitter/Handles.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/RC Transmitter&Receiver/3D Models/RC Transmitter/Handles.stl -------------------------------------------------------------------------------- /Smart Home/Smart Roller Blind/3D Models/Motor Gear Left.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/Smart Home/Smart Roller Blind/3D Models/Motor Gear Left.stl -------------------------------------------------------------------------------- /Smart Home/Smart Roller Blind/3D Models/Motor Gear Right.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/Smart Home/Smart Roller Blind/3D Models/Motor Gear Right.stl -------------------------------------------------------------------------------- /RC Transmitter&Receiver/3D Models/RC Car/Back Whel Axel x2.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/RC Transmitter&Receiver/3D Models/RC Car/Back Whel Axel x2.stl -------------------------------------------------------------------------------- /RC Transmitter&Receiver/3D Models/RC Car/Back Whel Hub x2.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/RC Transmitter&Receiver/3D Models/RC Car/Back Whel Hub x2.stl -------------------------------------------------------------------------------- /RC Transmitter&Receiver/3D Models/RC Car/Front Whel Hub x2.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/RC Transmitter&Receiver/3D Models/RC Car/Front Whel Hub x2.stl -------------------------------------------------------------------------------- /RC Transmitter&Receiver/3D Models/RC Car/Suspension Arm x8.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/RC Transmitter&Receiver/3D Models/RC Car/Suspension Arm x8.stl -------------------------------------------------------------------------------- /RC Transmitter&Receiver/3D Models/RC Transmitter/Joystick.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/RC Transmitter&Receiver/3D Models/RC Transmitter/Joystick.stl -------------------------------------------------------------------------------- /RC Transmitter&Receiver/3D Models/RC Transmitter/Main Body.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/RC Transmitter&Receiver/3D Models/RC Transmitter/Main Body.stl -------------------------------------------------------------------------------- /Smart Home/Smart Plant Watering/3D Models/Smashing Jaagub.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/Smart Home/Smart Plant Watering/3D Models/Smashing Jaagub.stl -------------------------------------------------------------------------------- /RC Transmitter&Receiver/3D Models/RC Car/Front Suspension x2.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/RC Transmitter&Receiver/3D Models/RC Car/Front Suspension x2.stl -------------------------------------------------------------------------------- /RC Transmitter&Receiver/3D Models/RC Car/Motor Top Cover x2.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/RC Transmitter&Receiver/3D Models/RC Car/Motor Top Cover x2.stl -------------------------------------------------------------------------------- /RC Transmitter&Receiver/3D Models/RC Transmitter/Bottom Cover.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/RC Transmitter&Receiver/3D Models/RC Transmitter/Bottom Cover.stl -------------------------------------------------------------------------------- /RC Transmitter&Receiver/Circuit Diagram/RC Receiver Schematic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/RC Transmitter&Receiver/Circuit Diagram/RC Receiver Schematic.png -------------------------------------------------------------------------------- /RC Transmitter&Receiver/Circuit Diagram/RC Transmiter Circuit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/RC Transmitter&Receiver/Circuit Diagram/RC Transmiter Circuit.png -------------------------------------------------------------------------------- /RC Transmitter&Receiver/3D Models/RC Transmitter/Bottom Cover 2.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/RC Transmitter&Receiver/3D Models/RC Transmitter/Bottom Cover 2.stl -------------------------------------------------------------------------------- /RC Transmitter&Receiver/Circuit Diagram/RC Transmiter Schematic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/RC Transmitter&Receiver/Circuit Diagram/RC Transmiter Schematic.png -------------------------------------------------------------------------------- /Smart Home/Smart Roller Blind/Circuit diagram to programming ESP-12E.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/Smart Home/Smart Roller Blind/Circuit diagram to programming ESP-12E.png -------------------------------------------------------------------------------- /Smart Home/Smart RGB Led Controller/Circuit diagram to programming ESP-12E.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doganhobby/Arduino-Projects/HEAD/Smart Home/Smart RGB Led Controller/Circuit diagram to programming ESP-12E.png -------------------------------------------------------------------------------- /RC Transmitter&Receiver/Youtube Video.txt: -------------------------------------------------------------------------------- 1 | RC Transmitter full build 2 | https://youtu.be/x8mul0Das2k 3 | 4 | RC Joystick build 5 | https://youtu.be/n5gFHKa8dmA 6 | 7 | 3D Printed Arduino RC Car 8 | https://youtu.be/1Wil4X_2eIA -------------------------------------------------------------------------------- /RC Transmitter&Receiver/Code/RC Transmitter/RC Transmitter.ino: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | 6 | // Define the digital inputs 7 | #define t1 9 // Toggle switch 1 8 | #define t2 8 // Toggle switch 1 9 | #define b1 2 // Button 1 10 | #define b2 3 // Button 2 11 | 12 | 13 | RF24 radio(5, 6); // nRF24L01 (CE, CSN) 14 | const uint64_t pipeOut = 0xE8E8F0F0E1LL; 15 | 16 | // Max size of this struct is 32 bytes - NRF24L01 buffer limit 17 | struct Data_Package { 18 | byte j1PotX; 19 | byte j1PotY; 20 | byte j2PotX; 21 | byte j2PotY; 22 | byte pot1; 23 | byte pot2; 24 | byte tSwitch1; 25 | byte tSwitch2; 26 | byte button1; 27 | byte button2; 28 | }; 29 | 30 | Data_Package data; //Create a variable with the above structure 31 | 32 | void setup() { 33 | Serial.begin(9600); 34 | 35 | // Define the radio communication 36 | 37 | radio.begin(); 38 | radio.setAutoAck(false); 39 | radio.setDataRate(RF24_250KBPS); 40 | 41 | radio.openWritingPipe(pipeOut); 42 | 43 | pinMode(t1, INPUT_PULLUP); 44 | pinMode(t2, INPUT_PULLUP); 45 | pinMode(b1, INPUT_PULLUP); 46 | pinMode(b2, INPUT_PULLUP); 47 | 48 | resetData(); 49 | } 50 | 51 | void loop() { 52 | data.j1PotX = map(analogRead(A2), 440, 605, 0, 255); 53 | data.j1PotY = map(analogRead(A3), 587, 425, 0, 255); 54 | data.j2PotX = map(analogRead(A0), 432, 601, 0, 255); 55 | data.j2PotY = map(analogRead(A1), 436, 595, 0, 255); 56 | data.pot1 = map(analogRead(A7), 0, 1023, 0, 255); 57 | data.pot2 = map(analogRead(A6), 0, 1023, 0, 255); 58 | 59 | data.tSwitch1 = digitalRead(t1); 60 | data.tSwitch2 = digitalRead(t2); 61 | data.button1 = digitalRead(b1); 62 | data.button2 = digitalRead(b2); 63 | 64 | radio.write(&data, sizeof(Data_Package)); 65 | } 66 | 67 | void resetData(){ 68 | data.j1PotX = 127; 69 | data.j1PotY = 127; 70 | data.j2PotX = 127; 71 | data.j2PotY = 127; 72 | data.pot1 = 1; 73 | data.pot2 = 1; 74 | data.tSwitch1 = 1; 75 | data.tSwitch2 = 1; 76 | data.button1 = 1; 77 | data.button2 = 1; 78 | } -------------------------------------------------------------------------------- /Smart Home/Smart Switch/Smart_Switch/Smart_Switch.ino: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #define relay_pin 2 9 | 10 | ESP8266WebServer httpServer(80); 11 | ESP8266HTTPUpdateServer httpUpdater; 12 | 13 | bool state = false; 14 | int counter = 0; 15 | 16 | unsigned long lastSensorRead = 0; 17 | unsigned long sensorReadDelay = 1000; 18 | 19 | 20 | 21 | void setup() { 22 | Serial.begin(115200); 23 | 24 | analogWriteRange(255); 25 | 26 | pinMode(relay_pin, OUTPUT); 27 | 28 | bool success = SPIFFS.begin(); 29 | if (!success) Serial.println("Error mounting the file system"); 30 | 31 | connectToWifi(); 32 | } 33 | 34 | void loop() { 35 | if ((millis() - lastSensorRead) > sensorReadDelay) { 36 | 37 | } 38 | 39 | digitalWrite(relay_pin, state ? HIGH : LOW); 40 | 41 | httpServer.handleClient(); 42 | } 43 | 44 | 45 | void connectToWifi() { 46 | Serial.print("Connecting"); 47 | 48 | IPAddress staticIP(192, 168, 1, 150); 49 | IPAddress gateway(192, 168, 1, 1); 50 | IPAddress subnet(255, 255, 255, 0); 51 | IPAddress dns(192, 168, 1, 1); 52 | IPAddress dns2(8, 8, 8, 8); 53 | 54 | const char* deviceName = "MakeItSmart_Smart_Switch"; 55 | const char *ssid = "**********Your_SSID************"; 56 | const char *password = "********Your Password**********"; 57 | 58 | WiFi.hostname(deviceName); 59 | WiFi.config(staticIP, gateway, subnet, dns, dns2); 60 | 61 | WiFi.mode(WIFI_AP_STA); 62 | WiFi.begin(ssid, password); 63 | 64 | int counter = 0; 65 | while (WiFi.status() != WL_CONNECTED && counter++ < 20) { 66 | delay(500); 67 | Serial.print("."); 68 | } 69 | if (WiFi.status() != WL_CONNECTED) ESP.restart(); 70 | 71 | Serial.print("IP:"); 72 | Serial.println(WiFi.localIP()); 73 | 74 | httpUpdater.setup(&httpServer); 75 | httpServer.on("/get_state", get_state); 76 | httpServer.on("/toggle", toggle); 77 | httpServer.on("/get_device_type", get_device_type); 78 | httpServer.begin(); 79 | 80 | Serial.print("IP:"); 81 | Serial.println(WiFi.localIP()); 82 | 83 | delay(3000); 84 | } 85 | 86 | //---------------------------------Http Functions--------------------------------------------------------------- 87 | 88 | void get_state() { 89 | httpServer.send(200, "text/plain", String(state)); 90 | } 91 | 92 | void toggle() { 93 | state = !state; 94 | httpServer.send(200, "text/plain", String(state)); 95 | } 96 | 97 | void get_device_type() { 98 | httpServer.send(200, "text/plain", "Switch"); 99 | } 100 | -------------------------------------------------------------------------------- /RC Transmitter&Receiver/Code/RC Receiver Test/RC Receiver Test.ino: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | struct MyData { 8 | byte j1PotX; 9 | byte j1PotY; 10 | byte j2PotX; 11 | byte j2PotY; 12 | byte pot1; 13 | byte pot2; 14 | byte tSwitch1; 15 | byte tSwitch2; 16 | byte button1; 17 | byte button2; 18 | }; 19 | 20 | MyData data; 21 | unsigned long lastRecvTime = 0; 22 | 23 | RF24 radio(7, 8); 24 | const uint64_t pipeIn = 0xE8E8F0F0E1LL; 25 | 26 | #define channel1 2 27 | #define channel3 4 28 | 29 | #define channel2 3 30 | #define channel4 5 31 | #define channel5 6 32 | #define channel6 9 33 | #define channel7 10 34 | 35 | 36 | 37 | Servo servo1; 38 | Servo servo2; 39 | Servo servo3; 40 | 41 | void setup() { 42 | Serial.begin(9600); 43 | 44 | pinMode(channel1, OUTPUT); 45 | 46 | servo1.attach(channel2); 47 | servo2.attach(channel4); 48 | servo3.attach(channel5); 49 | 50 | resetData(); 51 | 52 | radio.begin(); 53 | radio.setAutoAck(false); 54 | radio.setDataRate(RF24_250KBPS); 55 | 56 | radio.openReadingPipe(1, pipeIn); 57 | radio.startListening(); 58 | } 59 | 60 | void loop() { 61 | recvData(); 62 | unsigned long now = millis(); 63 | if (now - lastRecvTime > 1000) { 64 | Serial.println("Signal lost!"); 65 | resetData(); 66 | } 67 | 68 | //delay(250); 69 | digitalWrite(channel1, data.tSwitch1 == 1 ? HIGH : LOW); 70 | servo1.write(map(data.j1PotX, 0, 255, 0, 180)); 71 | servo2.write(map(data.j1PotY, 0, 255, 0, 180)); 72 | servo3.write(map(data.pot1, 255, 0, 0, 180)); 73 | } 74 | 75 | void recvData() { 76 | while (radio.available()) { 77 | radio.read(&data, sizeof(MyData)); 78 | 79 | /*analogWrite(throtle_pin, data.throttle); 80 | servo_yaw.write(map(data.yaw, 0, 255, 0, 180)); 81 | servo_pitch.write(map(data.pitch, 0, 255, 0, 180)); 82 | servo_roll.write(map(data.roll, 0, 255, 0, 180));*/ 83 | 84 | /*Serial.print(data.j1PotX); 85 | Serial.print(", "); 86 | Serial.print(data.j1PotY); 87 | Serial.print(", "); 88 | Serial.print(data.j2PotX); 89 | Serial.print(", "); 90 | Serial.print(data.j2PotY); 91 | Serial.print(", "); 92 | Serial.print(data.pot1); 93 | Serial.print(", "); 94 | Serial.print(data.pot2); 95 | Serial.print(", "); 96 | Serial.print(data.tSwitch1); 97 | Serial.print(", "); 98 | Serial.print(data.tSwitch2); 99 | Serial.print(", "); 100 | Serial.print(data.button1); 101 | Serial.print(", "); 102 | Serial.println(data.button2);*/ 103 | 104 | lastRecvTime = millis(); 105 | } 106 | } 107 | 108 | void resetData() { 109 | data.j1PotX = 127; 110 | data.j1PotY = 127; 111 | data.j2PotX = 127; 112 | data.j2PotY = 127; 113 | data.pot1 = 1; 114 | data.pot2 = 1; 115 | data.tSwitch1 = 1; 116 | data.tSwitch2 = 1; 117 | data.button1 = 1; 118 | data.button2 = 1; 119 | } 120 | -------------------------------------------------------------------------------- /Coin Counter&Sorter/Coin_Counter/Coin_Counter.ino: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | 5 | LiquidCrystal_I2C lcd = LiquidCrystal_I2C(0x27, 16, 2); 6 | 7 | int currentStep = 0, pStep = 0; 8 | int stepperPins[4] = { 7, 6, 5, 4 }; 9 | 10 | long started_at; 11 | 12 | void setup() { 13 | Serial.begin(9600); 14 | 15 | lcd.init(); 16 | lcd.setBacklight(1); 17 | 18 | lcd.setCursor(0, 0); 19 | lcd.print("Make It Smart "); 20 | 21 | pinMode(4, OUTPUT); 22 | pinMode(5, OUTPUT); 23 | pinMode(6, OUTPUT); 24 | pinMode(7, OUTPUT); 25 | 26 | started_at = millis(); 27 | } 28 | 29 | int counter = 0; 30 | int p_counter = -1; 31 | 32 | bool sensorState_5_kr = false; 33 | bool sensorState_10_kr = false; 34 | bool sensorState_25_kr = false; 35 | bool sensorState_50_kr = false; 36 | bool sensorState_1_tl = false; 37 | 38 | //This value should be define as your sensor reading value. 39 | int sensorThreashHold = 75; 40 | 41 | void loop() { 42 | // if (millis() - started_at > 3000) { 43 | int sensorValue_5_kr = analogRead(A0); 44 | int sensorValue_10_kr = analogRead(A1); 45 | int sensorValue_25_kr = analogRead(A2); 46 | int sensorValue_50_kr = analogRead(A3); 47 | 48 | //Important note; Because of the LCD I2C pins also use the SDA(A5) pin of Arduino, the default reading value should be greater than 700. 49 | int sensorValue_1_tl = analogRead(A5); 50 | 51 | Serial.print("Sensor : "); 52 | Serial.print(sensorValue_5_kr); 53 | Serial.print(", "); 54 | Serial.print(sensorValue_10_kr); 55 | Serial.print(", "); 56 | Serial.print(sensorValue_25_kr); 57 | Serial.print(", "); 58 | Serial.print(sensorValue_50_kr); 59 | Serial.print(", "); 60 | Serial.println(sensorValue_1_tl); 61 | 62 | if (sensorValue_5_kr < sensorThreashHold && sensorState_5_kr == false) counter += 5; 63 | if (sensorValue_10_kr < sensorThreashHold && sensorState_10_kr == false) counter += 5; 64 | if (sensorValue_25_kr < sensorThreashHold && sensorState_25_kr == false) counter += 15; 65 | if (sensorValue_50_kr < sensorThreashHold && sensorState_50_kr == false) counter += 25; 66 | if (sensorValue_1_tl < sensorThreashHold && sensorState_1_tl == false) counter += 50; 67 | 68 | sensorState_5_kr = sensorValue_5_kr < sensorThreashHold; 69 | sensorState_10_kr = sensorValue_10_kr < sensorThreashHold; 70 | sensorState_25_kr = sensorValue_25_kr < sensorThreashHold; 71 | sensorState_50_kr = sensorValue_50_kr < sensorThreashHold; 72 | sensorState_1_tl = sensorValue_1_tl < sensorThreashHold ; 73 | 74 | 75 | if (counter != p_counter && sensorValue_1_tl > 700) { 76 | printTotal(); 77 | p_counter = counter; 78 | } 79 | 80 | for (int a = 0; a < 10; a++) { 81 | for (int i = 0; i < 4; i++) { 82 | digitalWrite(stepperPins[i], (i == currentStep || i == pStep) ? HIGH : LOW); 83 | delay(1); 84 | } 85 | if (pStep != currentStep) pStep = currentStep; 86 | else currentStep = (currentStep + 1) % 4; 87 | } 88 | } 89 | 90 | void printTotal() { 91 | lcd.setCursor(0, 1); 92 | lcd.print("Total : "); 93 | lcd.print(((double)counter) / 100.0); 94 | lcd.print(" tl "); 95 | } 96 | -------------------------------------------------------------------------------- /3D Robot Arm/Codes/Robot_Arm_3D_Easing/Robot_Arm_3D_Easing.ino: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include "ServoEasing.hpp" 4 | 5 | ServoEasing servo_x_axis; 6 | ServoEasing servo_y_left_axis; 7 | ServoEasing servo_y_right_axis; 8 | ServoEasing servo_z_axis; 9 | ServoEasing servo_r_axis; 10 | 11 | Servo clamp; 12 | 13 | int x_axis_degree = 90; 14 | int y_axis_degree = 120; 15 | int z_axis_degree = 40; 16 | int r_axis_degree = 110; 17 | 18 | int clamp_open_degree = 120; 19 | int clamp_half_open_degree = 60; 20 | int clamp_closed_degree = 35; 21 | 22 | int general_speed = 38; 23 | int low_speed = 20; 24 | 25 | void setup() { 26 | Serial.begin(9600); 27 | 28 | servo_y_left_axis.setReverseOperation(true); 29 | 30 | servo_x_axis.attach(3, x_axis_degree); 31 | servo_y_left_axis.attach(5, y_axis_degree); 32 | servo_y_right_axis.attach(6, y_axis_degree); 33 | servo_z_axis.attach(9, z_axis_degree); 34 | servo_r_axis.attach(10, r_axis_degree); 35 | 36 | clamp.attach(11); 37 | clamp.write(clamp_closed_degree); 38 | 39 | //setSpeedForAllServos(general_speed); 40 | //setEasingTypeForAllServos(EASE_CUBIC_IN_OUT); 41 | //setEasingTypeForAllServos(EASE_QUADRATIC_IN_OUT); 42 | //setEasingTypeForAllServos(EASE_SINE_IN_OUT); 43 | setEasingTypeForAllServos(EASE_SINE_IN_OUT); 44 | 45 | delay(1000); // Wait for servo to reach start position. 46 | } 47 | 48 | void loop() { 49 | Serial.print("Enter command : "); 50 | while (Serial.available() == 0) delay(10); 51 | 52 | String command = Serial.readString(); 53 | Serial.println(command); 54 | 55 | int index = 0; 56 | while ((index = command.indexOf(',')) > 0) { 57 | String subcommand = command.substring(0, index); 58 | command = command.substring(index + 1); 59 | subcommand.trim(); 60 | parse_command(subcommand); 61 | } 62 | parse_command(command); 63 | 64 | synchronizeAllServosStartAndWaitForAllServosToStop(); 65 | } 66 | 67 | void parse_command(String command) { 68 | String axis = command.substring(0, 1); 69 | int value = command.substring(2).toInt(); 70 | 71 | if (axis == "X" || axis == "x") { 72 | int speed = (abs(value - x_axis_degree) <= 20) ? low_speed : general_speed; 73 | 74 | servo_x_axis.setEaseTo(value, general_speed); 75 | x_axis_degree = value; 76 | } else if (axis == "Y" || axis == "y") { 77 | int speed = (abs(value - y_axis_degree) <= 20) ? low_speed : general_speed; 78 | 79 | servo_y_left_axis.setEaseTo(value - 10, speed); 80 | servo_y_right_axis.setEaseTo(value - 10, speed); 81 | 82 | y_axis_degree = value; 83 | } else if (axis == "Z" || axis == "z") { 84 | int speed = (abs(value - z_axis_degree) <= 20) ? low_speed : general_speed; 85 | 86 | servo_z_axis.setEaseTo(value, speed); 87 | z_axis_degree = value; 88 | } else if (axis == "R" || axis == "r") { 89 | int speed = (abs(value - r_axis_degree) <= 20) ? low_speed : general_speed; 90 | 91 | servo_r_axis.setEaseTo(value, speed); 92 | r_axis_degree = value; 93 | } else if (axis == "C" || axis == "c") { 94 | clamp.write(value == 2 ? clamp_open_degree : (value == 1 ? clamp_half_open_degree : clamp_closed_degree)); 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /Smart Home/Smart Plant Watering/Smart_Plant_Watering/Smart_Plant_Watering.ino: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | //Static IP address configuration 10 | IPAddress staticIP(192, 168, 1, 170); 11 | IPAddress gateway(192, 168, 1, 1); 12 | IPAddress subnet(255, 255, 255, 0); 13 | IPAddress dns(192, 168, 1, 1); 14 | IPAddress dns2(8, 8, 8, 8); 15 | 16 | const char *deviceName = "MakeItSmart_Plant_Watering"; 17 | const char *ssid = "**********Your_SSID************"; 18 | const char *password = "********Your Password**********"; 19 | 20 | ESP8266WebServer httpServer(80); 21 | ESP8266HTTPUpdateServer httpUpdater; 22 | 23 | #define mosfet 12 24 | #define relay 14 25 | 26 | const int analogInPin = A0; 27 | 28 | Ticker timer; 29 | bool state = false; 30 | int humidity = 0; 31 | 32 | Ticker relay_timer; 33 | 34 | void setup() { 35 | Serial.begin(115200); 36 | 37 | pinMode(relay, OUTPUT); 38 | pinMode(mosfet, OUTPUT); 39 | 40 | //analogWriteRange(1024); 41 | 42 | timer.attach_ms(1000, readSensorValue); 43 | 44 | connectToWifi(); 45 | } 46 | 47 | void loop() { 48 | analogWrite(mosfet, state ? 130 : 0); 49 | digitalWrite(relay, state ? HIGH : LOW); 50 | 51 | httpServer.handleClient(); 52 | } 53 | 54 | //--------------------Operational functions----------------------------------------- 55 | void connectToWifi() { 56 | WiFi.hostname(deviceName); 57 | WiFi.config(staticIP, gateway, subnet, dns, dns2); 58 | 59 | WiFi.mode(WIFI_STA); 60 | WiFi.begin(ssid, password); 61 | 62 | int counter = 0; 63 | while (WiFi.status() != WL_CONNECTED && counter < 20) { 64 | delay(500); 65 | } 66 | 67 | if (WiFi.status() != WL_CONNECTED) ESP.restart(); 68 | 69 | httpUpdater.setup(&httpServer); 70 | httpServer.on("/get_device_type", get_device_type); 71 | httpServer.on("/get_humidity", get_humidity); 72 | httpServer.on("/get_state", get_state); 73 | httpServer.on("/waterize", waterize); 74 | 75 | httpServer.begin(); 76 | } 77 | 78 | void readSensorValue() { 79 | humidity = (int)((1024 - analogRead(analogInPin)) / 10.24); 80 | } 81 | 82 | void stopWaterizing() { 83 | if (relay_timer.active()) relay_timer.detach(); 84 | state = false; 85 | } 86 | 87 | //--------------------Http functions----------------------------------------- 88 | void get_device_type() { 89 | httpServer.send(200, "text/plain", "Plant Watering"); 90 | } 91 | 92 | void get_humidity() { 93 | httpServer.send(200, "text/plain", String(humidity)); 94 | } 95 | 96 | void get_state() { 97 | httpServer.send(200, "text/plain", String(state)); 98 | } 99 | 100 | void waterize() { 101 | state = httpServer.arg("value").toInt() == 1; 102 | if (state) { 103 | int duration = httpServer.arg("duration").toInt(); 104 | if (!relay_timer.active()) relay_timer.attach_ms(duration > 0 ? duration : 3000, stopWaterizing); 105 | } else { 106 | if (relay_timer.active()) relay_timer.detach(); 107 | } 108 | 109 | httpServer.send(200, "text/plain", "Ok"); 110 | } 111 | -------------------------------------------------------------------------------- /Smart Home/Smart Room Thermometer/Smart_Room_Thermometer/Smart_Room_Thermometer.ino: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #include "DHT.h" 9 | 10 | #define DHTTYPE DHT11 11 | #define DHTpin 14 12 | 13 | ESP8266WebServer httpServer(80); 14 | ESP8266HTTPUpdateServer httpUpdater; 15 | 16 | DHT dht(DHTpin, DHTTYPE); 17 | 18 | int counter = 0; 19 | 20 | float humidity = 0; 21 | float temperature = 0; 22 | 23 | unsigned long lastSensorRead = 0; 24 | unsigned long sensorReadDelay = 1000; 25 | 26 | void setup() { 27 | Serial.begin(115200); 28 | 29 | analogWriteRange(255); 30 | 31 | dht.begin(); 32 | 33 | bool success = SPIFFS.begin(); 34 | if (!success) Serial.println("Error mounting the file system"); 35 | 36 | connectToWifi(); 37 | } 38 | 39 | void loop() { 40 | if ((millis() - lastSensorRead) > sensorReadDelay) { 41 | lastSensorRead = millis(); 42 | 43 | float tmp = dht.readTemperature(); 44 | if (tmp != temperature) updateTemperature(tmp); 45 | 46 | float hmd = dht.readHumidity(); 47 | if (hmd != humidity) updateHumidity(hmd); 48 | } 49 | 50 | httpServer.handleClient(); 51 | } 52 | 53 | 54 | void connectToWifi() { 55 | Serial.print("Connecting"); 56 | 57 | IPAddress staticIP(192, 168, 1, 160); 58 | IPAddress gateway(192, 168, 1, 1); 59 | IPAddress subnet(255, 255, 255, 0); 60 | IPAddress dns(192, 168, 1, 1); 61 | IPAddress dns2(8, 8, 8, 8); 62 | 63 | const char* deviceName = "MakeItSmart_Smart_Thermometer"; 64 | const char *ssid = "**********Your_SSID************"; 65 | const char *password = "********Your Password**********"; 66 | 67 | WiFi.hostname(deviceName); 68 | WiFi.config(staticIP, gateway, subnet, dns, dns2); 69 | 70 | WiFi.mode(WIFI_AP_STA); 71 | WiFi.begin(ssid, password); 72 | 73 | int counter = 0; 74 | while (WiFi.status() != WL_CONNECTED && counter++ < 20) { 75 | delay(500); 76 | Serial.print("."); 77 | } 78 | if (WiFi.status() != WL_CONNECTED) ESP.restart(); 79 | 80 | Serial.print("IP:"); 81 | Serial.println(WiFi.localIP()); 82 | 83 | httpUpdater.setup(&httpServer); 84 | httpServer.on("/getHumidity", getHumidity); 85 | httpServer.on("/getTemperature", getTemperature); 86 | httpServer.on("/get_device_type", get_device_type); 87 | httpServer.begin(); 88 | 89 | Serial.print("IP:"); 90 | Serial.println(WiFi.localIP()); 91 | 92 | delay(3000); 93 | } 94 | 95 | void updateTemperature(float value) { 96 | temperature = value ; 97 | //temperature = random(-20, 80); //value ; 98 | } 99 | 100 | void updateHumidity(float value) { 101 | humidity = value; 102 | //humidity = random(0, 100); //value; 103 | } 104 | 105 | //---------------------------------Http Functions--------------------------------------------------------------- 106 | 107 | void getHumidity(){ 108 | httpServer.send(200, "text/plain", /*"hum : " +*/ String(humidity)); 109 | } 110 | 111 | void getTemperature(){ 112 | httpServer.send(200, "text/plain", /*"temp : " +*/ String(temperature)); 113 | } 114 | 115 | void get_device_type(){ 116 | httpServer.send(200, "text/plain", "Thermometer"); 117 | } 118 | -------------------------------------------------------------------------------- /Smart Home/Smart RGB Led Controller/Smart_RGB/Smart_RGB.ino: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #include "FS.h" 9 | 10 | #define LED_R 15 11 | #define LED_G 13 12 | #define LED_B 12 13 | 14 | ESP8266WebServer httpServer(80); 15 | ESP8266HTTPUpdateServer httpUpdater; 16 | 17 | String RGB = "0,0,0,255,0"; 18 | 19 | unsigned long lastSensorRead = 0; 20 | unsigned long sensorReadDelay = 1000; 21 | 22 | void setup() { 23 | Serial.begin(115200); 24 | 25 | analogWriteRange(255); 26 | analogWrite(LED_R, 0); 27 | analogWrite(LED_G, 0); 28 | analogWrite(LED_B, 0); 29 | 30 | bool success = SPIFFS.begin(); 31 | if (!success) Serial.println("Error mounting the file system"); 32 | 33 | connectToWifi(); 34 | 35 | readTheConfigFiles(); 36 | updateRGBColors(); 37 | } 38 | 39 | void loop() { 40 | if ((millis() - lastSensorRead) > sensorReadDelay) { 41 | lastSensorRead = millis(); 42 | 43 | File f = SPIFFS.open("/mis_rgb.cfg", "w"); 44 | if (f) { 45 | f.println(RGB); 46 | f.close(); 47 | } 48 | } 49 | 50 | httpServer.handleClient(); 51 | } 52 | 53 | 54 | void connectToWifi() { 55 | Serial.print("Connecting"); 56 | 57 | IPAddress staticIP(192, 168, 1, 230); 58 | IPAddress gateway(192, 168, 1, 1); 59 | IPAddress subnet(255, 255, 255, 0); 60 | IPAddress dns(192, 168, 1, 1); 61 | IPAddress dns2(8, 8, 8, 8); 62 | 63 | const char* deviceName = "MakeItSmart_Smart_RGB"; 64 | const char *ssid = "**********Your_SSID************"; 65 | const char *password = "********Your Password**********"; 66 | 67 | WiFi.hostname(deviceName); 68 | WiFi.config(staticIP, gateway, subnet, dns, dns2); 69 | 70 | WiFi.mode(WIFI_AP_STA); 71 | WiFi.begin(ssid, password); 72 | 73 | int counter = 0; 74 | while (WiFi.status() != WL_CONNECTED && counter++ < 20) { 75 | delay(500); 76 | Serial.print("."); 77 | } 78 | if (WiFi.status() != WL_CONNECTED) ESP.restart(); 79 | 80 | Serial.print("IP:"); 81 | Serial.println(WiFi.localIP()); 82 | 83 | httpUpdater.setup(&httpServer); 84 | httpServer.on("/updateRGBColors", updateRGBColors); 85 | httpServer.on("/getRGBColors", getRGBColors); 86 | httpServer.on("/get_device_type", get_device_type); 87 | httpServer.begin(); 88 | 89 | Serial.print("IP:"); 90 | Serial.println(WiFi.localIP()); 91 | 92 | delay(3000); 93 | } 94 | 95 | void readTheConfigFiles() { 96 | File f = SPIFFS.open("/mis_rgb.cfg", "r"); 97 | if (f) { 98 | RGB = f.readStringUntil('\n'); 99 | f.close(); 100 | } 101 | } 102 | 103 | //---------------------------------Http Functions--------------------------------------------------------------- 104 | void updateRGBColors() { 105 | RGB = httpServer.arg("rgb_color"); 106 | 107 | int R, G, B, A, toggle ; 108 | int n = sscanf(RGB.c_str(), "%d,%d,%d,%d,%d", &R, &G, &B, &A, &toggle); 109 | 110 | A *= toggle; 111 | analogWrite(LED_R, max(0, min(R * A / 255, 255))); 112 | analogWrite(LED_G, max(0, min(G * A / 255, 255))); 113 | analogWrite(LED_B, max(0, min(B * A / 255, 255))); 114 | 115 | httpServer.send(200, "text/plain", RGB); 116 | } 117 | 118 | void getRGBColors(){ 119 | httpServer.send(200, "text/plain", RGB); 120 | } 121 | 122 | void get_device_type(){ 123 | httpServer.send(200, "text/plain", "RGB Controller"); 124 | } 125 | -------------------------------------------------------------------------------- /RC Transmitter&Receiver/Code/RC Receiver Arduino Car/RC Receiver Arduino Car.ino: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include 6 | 7 | struct MyData { 8 | byte j1PotX; 9 | byte j1PotY; 10 | byte j2PotX; 11 | byte j2PotY; 12 | byte pot1; 13 | byte pot2; 14 | byte tSwitch1; 15 | byte tSwitch2; 16 | byte button1; 17 | byte button2; 18 | }; 19 | 20 | MyData data; 21 | unsigned long lastRecvTime = 0; 22 | 23 | RF24 radio(7, 8); 24 | const uint64_t pipeIn = 0xE8E8F0F0E1LL; 25 | 26 | #define servo_pin 3 27 | 28 | #define motor_forward_pin 5 29 | #define motor_backward_pin 6 30 | 31 | #define horn 2 32 | #define front_led 10 33 | #define back_led 9 34 | 35 | Servo servo; 36 | 37 | void setup() { 38 | Serial.begin(9600); 39 | 40 | servo.attach(servo_pin); 41 | 42 | pinMode(horn, OUTPUT); 43 | pinMode(front_led, OUTPUT); 44 | pinMode(back_led, OUTPUT); 45 | 46 | pinMode(motor_forward_pin, OUTPUT); 47 | pinMode(motor_backward_pin, OUTPUT); 48 | 49 | resetData(); 50 | 51 | radio.begin(); 52 | 53 | radio.setAutoAck(false); 54 | radio.setDataRate(RF24_250KBPS); 55 | 56 | radio.openReadingPipe(1, pipeIn); 57 | radio.startListening(); 58 | } 59 | 60 | void loop() { 61 | while (radio.available()) { 62 | radio.read(&data, sizeof(MyData)); 63 | 64 | /*Serial.print(data.j1PotX); 65 | Serial.print(", "); 66 | Serial.print(data.j1PotY); 67 | Serial.print(", "); 68 | Serial.print(data.j2PotX); 69 | Serial.print(", "); 70 | Serial.print(data.j2PotY); 71 | Serial.print(", "); 72 | Serial.print(data.pot1); 73 | Serial.print(", "); 74 | Serial.print(data.pot2); 75 | Serial.print(", "); 76 | Serial.print(data.tSwitch1); 77 | Serial.print(", "); 78 | Serial.print(data.tSwitch2); 79 | Serial.print(", "); 80 | Serial.print(data.button1); 81 | Serial.print(", "); 82 | Serial.println(data.button2);*/ 83 | 84 | //int angle = min(130, max(45, data.j2PotX - 35)); 85 | int angle = min(130, max(45, (87 + (data.j2PotX - 127) / 2))); 86 | servo.write(angle); 87 | 88 | if (data.j1PotY < 100) { 89 | digitalWrite(motor_forward_pin, LOW); 90 | //digitalWrite(motor_backward_pin, HIGH); 91 | analogWrite(motor_backward_pin, map(data.j1PotY, 100, 0, 180, 255)); 92 | } else if (data.j1PotY > 150) { 93 | //digitalWrite(motor_forward_pin, HIGH); 94 | digitalWrite(motor_backward_pin, LOW); 95 | analogWrite(motor_forward_pin, map(data.j1PotY, 150, 255, 180, 255)); 96 | } else { 97 | digitalWrite(motor_forward_pin, LOW); 98 | digitalWrite(motor_backward_pin, LOW); 99 | } 100 | 101 | digitalWrite(horn, data.button2 == 0 ? HIGH : LOW); 102 | 103 | digitalWrite(front_led, data.tSwitch1 == 1 ? HIGH : LOW); 104 | digitalWrite(back_led, data.tSwitch1 == 1 ? HIGH : LOW); 105 | 106 | lastRecvTime = millis(); 107 | } 108 | 109 | if (millis() - lastRecvTime > 1000) { 110 | resetData(); 111 | 112 | servo.write(min(140, max(35, data.j2PotX - 35))); 113 | 114 | digitalWrite(motor_forward_pin, LOW); 115 | digitalWrite(motor_backward_pin, LOW); 116 | digitalWrite(horn, LOW); 117 | digitalWrite(front_led, LOW); 118 | digitalWrite(back_led, LOW); 119 | } 120 | } 121 | 122 | 123 | void resetData() { 124 | data.j1PotX = 127; 125 | data.j1PotY = 127; 126 | data.j2PotX = 127; 127 | data.j2PotY = 127; 128 | data.pot1 = 1; 129 | data.pot2 = 1; 130 | data.tSwitch1 = 1; 131 | data.tSwitch2 = 1; 132 | data.button1 = 1; 133 | data.button2 = 1; 134 | } 135 | -------------------------------------------------------------------------------- /RC Transmitter&Receiver/Code/RC Receiver Robot Arm/RC Receiver Robot Arm.ino: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | struct MyData { 8 | byte j1PotX; 9 | byte j1PotY; 10 | byte j2PotX; 11 | byte j2PotY; 12 | byte pot1; 13 | byte pot2; 14 | byte tSwitch1; 15 | byte tSwitch2; 16 | byte button1; 17 | byte button2; 18 | }; 19 | 20 | MyData data; 21 | unsigned long lastRecvTime = 0; 22 | 23 | RF24 radio(7, 8); 24 | const uint64_t pipeIn = 0xE8E8F0F0E1LL; 25 | 26 | #define channel1 2 27 | #define channel3 4 28 | 29 | #define channel2 3 30 | #define channel4 5 31 | #define channel5 6 32 | #define channel6 9 33 | #define channel7 10 34 | 35 | Servo servo_z_axis; 36 | Servo servo_x_axis; 37 | Servo servo_y_axis; 38 | Servo servo_clamp; 39 | 40 | int x_axis_degree = 90; 41 | int y_axis_degree = 90; 42 | int z_axis_degree = 85; 43 | int clamp_degree = 90; 44 | 45 | void setup() { 46 | Serial.begin(9600); 47 | 48 | 49 | servo_x_axis.attach(3); 50 | servo_y_axis.attach(5); 51 | servo_z_axis.attach(6); 52 | servo_clamp.attach(10); 53 | 54 | resetData(); 55 | 56 | radio.begin(); 57 | radio.setAutoAck(false); 58 | radio.setDataRate(RF24_250KBPS); 59 | 60 | radio.openReadingPipe(1, pipeIn); 61 | radio.startListening(); 62 | } 63 | 64 | void loop() { 65 | recvData(); 66 | unsigned long now = millis(); 67 | if (now - lastRecvTime > 1000) { 68 | Serial.println("Signal lost!"); 69 | resetData(); 70 | } 71 | 72 | 73 | if (data.j1PotX < 80) x_axis_degree += 7; 74 | else if (data.j1PotX > 160) x_axis_degree -= 7; 75 | 76 | if (data.j1PotY < 80) y_axis_degree -= 7; 77 | else if (data.j1PotY > 160) y_axis_degree += 7; 78 | 79 | if (data.j2PotY < 80) z_axis_degree -= 7; 80 | else if (data.j2PotY > 160) z_axis_degree += 7; 81 | 82 | clamp_degree = data.tSwitch1 ==1 ? 75 : 90; 83 | 84 | //************************************* 85 | //You should decide the max/min angles. 86 | z_axis_degree = min(145, max(15, z_axis_degree)); 87 | x_axis_degree = min(175, max(40, x_axis_degree)); 88 | y_axis_degree = min(150, max(5, y_axis_degree)); 89 | clamp_degree = min(90, max(75, clamp_degree)); 90 | 91 | Serial.print("x_axis_degree : "); 92 | Serial.print(x_axis_degree); 93 | Serial.print(", y_axis_degree : "); 94 | Serial.print(y_axis_degree); 95 | Serial.print(", z_axis_degree 4 : "); 96 | Serial.print(z_axis_degree); 97 | Serial.print(", clamp_degree : "); 98 | Serial.println(clamp_degree); 99 | 100 | servo_clamp.write(clamp_degree); 101 | servo_x_axis.write(x_axis_degree); 102 | servo_y_axis.write(y_axis_degree); 103 | servo_z_axis.write(z_axis_degree); 104 | } 105 | 106 | void recvData() { 107 | while (radio.available()) { 108 | radio.read(&data, sizeof(MyData)); 109 | 110 | /*analogWrite(throtle_pin, data.throttle); 111 | servo_yaw.write(map(data.yaw, 0, 255, 0, 180)); 112 | servo_pitch.write(map(data.pitch, 0, 255, 0, 180)); 113 | servo_roll.write(map(data.roll, 0, 255, 0, 180));*/ 114 | 115 | /*Serial.print(data.j1PotX); 116 | Serial.print(", "); 117 | Serial.print(data.j1PotY); 118 | Serial.print(", "); 119 | Serial.print(data.j2PotX); 120 | Serial.print(", "); 121 | Serial.print(data.j2PotY); 122 | Serial.print(", "); 123 | Serial.print(data.pot1); 124 | Serial.print(", "); 125 | Serial.print(data.pot2); 126 | Serial.print(", "); 127 | Serial.print(data.tSwitch1); 128 | Serial.print(", "); 129 | Serial.print(data.tSwitch2); 130 | Serial.print(", "); 131 | Serial.print(data.button1); 132 | Serial.print(", "); 133 | Serial.println(data.button2);*/ 134 | 135 | lastRecvTime = millis(); 136 | } 137 | } 138 | 139 | void resetData() { 140 | data.j1PotX = 127; 141 | data.j1PotY = 127; 142 | data.j2PotX = 127; 143 | data.j2PotY = 127; 144 | data.pot1 = 1; 145 | data.pot2 = 1; 146 | data.tSwitch1 = 1; 147 | data.tSwitch2 = 1; 148 | data.button1 = 1; 149 | data.button2 = 1; 150 | } 151 | -------------------------------------------------------------------------------- /3D Robot Arm/Codes/Robot_Arm_3D_Box_Easing/Robot_Arm_3D_Box_Easing.ino: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include "ServoEasing.hpp" 4 | 5 | ServoEasing servo_x_axis; 6 | ServoEasing servo_y_left_axis; 7 | ServoEasing servo_y_right_axis; 8 | ServoEasing servo_z_axis; 9 | ServoEasing servo_r_axis; 10 | 11 | Servo clamp; 12 | 13 | int x_axis_degree = 90; 14 | int y_axis_degree = 120; 15 | int z_axis_degree = 40; 16 | int r_axis_degree = 110; 17 | 18 | int clamp_open_degree = 120; 19 | int clamp_half_open_degree = 60; 20 | int clamp_closed_degree = 35; 21 | 22 | int general_speed = 38; 23 | int low_speed = 20; 24 | 25 | void setup() { 26 | Serial.begin(9600); 27 | 28 | servo_y_left_axis.setReverseOperation(true); 29 | 30 | servo_x_axis.attach(3, x_axis_degree); 31 | servo_y_left_axis.attach(5, y_axis_degree); 32 | servo_y_right_axis.attach(6, y_axis_degree); 33 | servo_z_axis.attach(9, z_axis_degree); 34 | servo_r_axis.attach(10, r_axis_degree); 35 | 36 | clamp.attach(11); 37 | clamp.write(clamp_closed_degree); 38 | 39 | //setSpeedForAllServos(general_speed); 40 | //setEasingTypeForAllServos(EASE_CUBIC_IN_OUT); 41 | //setEasingTypeForAllServos(EASE_QUADRATIC_IN_OUT); 42 | //setEasingTypeForAllServos(EASE_SINE_IN_OUT); 43 | setEasingTypeForAllServos(EASE_SINE_IN_OUT); 44 | 45 | delay(1000); // Wait for servo to reach start position. 46 | } 47 | 48 | String commands[] = { 49 | "X=50", 50 | "C=2", 51 | 52 | "Y=40,Z=75,R=150", 53 | "C=1", 54 | "Y=120,Z=40,R=110", 55 | "X=90", 56 | "Y=23,Z=85,R=160", 57 | "C=2", 58 | "Y=120,Z=40,R=110", 59 | "X=50", 60 | 61 | "Y=35,Z=75,R=150", 62 | "C=1", 63 | "Y=120,Z=40,R=110", 64 | "X=90", 65 | "Y=40,Z=78,R=150", 66 | "C=2", 67 | "Y=120,Z=40,R=110", 68 | "X=50", 69 | 70 | "Y=35,Z=75,R=150", 71 | "C=1", 72 | "Y=120,Z=40,R=110", 73 | "X=90", 74 | "Y=52,Z=75,R=140", 75 | "C=2", 76 | "Y=120,Z=40,R=110", 77 | "X=50", 78 | 79 | "Y=35,Z=75,R=150", 80 | "C=1", 81 | "Y=120,Z=40,R=110", 82 | "X=90", 83 | "Y=59,Z=80,R=130", 84 | "C=2", 85 | "Y=120,Z=40,R=110", 86 | "X=50", 87 | 88 | 89 | "Y=22,Z=83,R=160", 90 | "C=1", 91 | "Y=120,Z=40,R=110", 92 | "X=90", 93 | "Y=65,Z=90,R=110", 94 | "C=2", 95 | "Y=120,Z=40,R=110", 96 | }; 97 | 98 | void loop() { 99 | delay(3000); 100 | 101 | for (int i = 0; i < 41; i++) { 102 | String command = commands[i]; 103 | Serial.println(command); 104 | 105 | int index = 0; 106 | while ((index = command.indexOf(',')) > 0) { 107 | String subcommand = command.substring(0, index); 108 | command = command.substring(index + 1); 109 | subcommand.trim(); 110 | parse_command(subcommand); 111 | } 112 | parse_command(command); 113 | 114 | synchronizeAllServosStartAndWaitForAllServosToStop(); 115 | Serial.print("Command "); 116 | Serial.print(i + 1); 117 | Serial.println(" completed."); 118 | 119 | delay(1000); 120 | } 121 | 122 | Serial.print("Press enter to contine."); 123 | while (Serial.available() == 0) delay(10); 124 | } 125 | 126 | void parse_command(String command) { 127 | String axis = command.substring(0, 1); 128 | int value = command.substring(2).toInt(); 129 | 130 | if (axis == "X" || axis == "x") { 131 | int speed = (abs(value - x_axis_degree) <= 20) ? low_speed : general_speed; 132 | 133 | servo_x_axis.setEaseTo(value, general_speed); 134 | x_axis_degree = value; 135 | } else if (axis == "Y" || axis == "y") { 136 | int speed = (abs(value - y_axis_degree) <= 20) ? low_speed : general_speed; 137 | 138 | servo_y_left_axis.setEaseTo(value - 10, speed); // Use x.y with trailing f (to specify a floating point constant) to avoid compiler errors. 139 | servo_y_right_axis.setEaseTo(value - 10, speed); 140 | 141 | y_axis_degree = value; 142 | } else if (axis == "Z" || axis == "z") { 143 | int speed = (abs(value - z_axis_degree) <= 20) ? low_speed : general_speed; 144 | 145 | servo_z_axis.setEaseTo(value, speed); 146 | z_axis_degree = value; 147 | } else if (axis == "R" || axis == "r") { 148 | int speed = (abs(value - r_axis_degree) <= 20) ? low_speed : general_speed; 149 | 150 | servo_r_axis.setEaseTo(value, speed); 151 | r_axis_degree = value; 152 | } else if (axis == "C" || axis == "c") { 153 | clamp.write(value == 2 ? clamp_open_degree : (value == 1 ? clamp_half_open_degree : clamp_closed_degree)); 154 | } 155 | } 156 | -------------------------------------------------------------------------------- /Smart Home/Smart Roller Blind/Smart_Roller_Bilind_V2/Smart_Roller_Bilind_V2.ino: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | #include "FS.h" 11 | 12 | //Static IP address configuration 13 | IPAddress staticIP(192, 168, 1, 220); 14 | IPAddress gateway(192, 168, 1, 1); 15 | IPAddress subnet(255, 255, 255, 0); 16 | IPAddress dns(192, 168, 1, 1); 17 | IPAddress dns2(8, 8, 8, 8); 18 | 19 | const char *deviceName = "MakeItSmart_Roller_Blind"; 20 | const char *ssid = "**********Your_SSID************"; 21 | const char *password = "********Your Password**********"; 22 | 23 | ESP8266WebServer httpServer(80); 24 | ESP8266HTTPUpdateServer httpUpdater; 25 | 26 | 27 | #define left_Motor_forward_pin 14 28 | #define left_Motor_backward_pin 12 29 | 30 | #define right_Motor_forward_pin 15 31 | #define right_Motor_backward_pin 13 32 | 33 | WiFiUDP ntpUDP; 34 | NTPClient timeClient(ntpUDP, "pool.ntp.org"); 35 | 36 | int motor_direction = 0; 37 | int timeZone = 3; 38 | 39 | bool isReverse = false; 40 | 41 | struct Position { 42 | String id; 43 | String name; 44 | int position; 45 | int time; 46 | }; 47 | 48 | int numPositions = 0; 49 | Position positionList[10]; 50 | 51 | void setup() { 52 | Serial.begin(115200); 53 | 54 | bool success = SPIFFS.begin(); 55 | if (!success) Serial.println("Error mounting the file system"); 56 | 57 | pinMode(left_Motor_forward_pin, OUTPUT); 58 | pinMode(left_Motor_backward_pin, OUTPUT); 59 | 60 | pinMode(right_Motor_forward_pin, OUTPUT); 61 | pinMode(right_Motor_backward_pin, OUTPUT); 62 | 63 | connectToWifi(); 64 | loadLastValues(); 65 | 66 | timeClient.begin(); 67 | timeClient.setTimeOffset(timeZone * 60 * 60); //GMT+3 => 3*60*60 68 | } 69 | 70 | void loop() { 71 | digitalWrite(left_Motor_forward_pin, motor_direction > 0 ? HIGH : LOW); 72 | digitalWrite(right_Motor_forward_pin, motor_direction > 0 ? HIGH : LOW); 73 | 74 | digitalWrite(left_Motor_backward_pin, motor_direction < 0 ? HIGH : LOW); 75 | digitalWrite(right_Motor_backward_pin, motor_direction < 0 ? HIGH : LOW); 76 | 77 | httpServer.handleClient(); 78 | } 79 | 80 | //--------------------Operational functions----------------------------------------- 81 | void connectToWifi() { 82 | WiFi.hostname(deviceName); 83 | WiFi.config(staticIP, gateway, subnet, dns, dns2); 84 | 85 | WiFi.mode(WIFI_STA); 86 | 87 | //If you are using the device with a powerbank, You can uncomment the ones you want to use to reduce power consuption of the project. 88 | //The default value is 20dbm and it's power consuption is 100mW. 89 | //when you reduce the output power it's connection range also will reduce. So you need to decide optimum value by trying yourself 90 | 91 | //WiFi.setOutputPower(20); // Set to 20 dBm (100 mW) (default value) 92 | //WiFi.setOutputPower(18); // Set to 18 dBm (63 mW) 93 | //WiFi.setOutputPower(12); // Set to 12 dBm (16 mW) 94 | //WiFi.setOutputPower(6); // Set to 6 dBm (4 mW) 95 | 96 | WiFi.begin(ssid, password); 97 | 98 | int counter = 0; 99 | while (WiFi.status() != WL_CONNECTED && counter < 20) { 100 | delay(500); 101 | } 102 | 103 | if (WiFi.status() != WL_CONNECTED) ESP.restart(); 104 | 105 | httpUpdater.setup(&httpServer); 106 | httpServer.on("/getInfo", getInfo); 107 | httpServer.on("/get_device_type", get_device_type); 108 | httpServer.on("/motor_move", motor_move); 109 | httpServer.on("/go_to", go_to); 110 | httpServer.on("/setReverse", setReverse); 111 | httpServer.on("/addPosition", addPosition); 112 | httpServer.on("/deletePosition", deletePosition); 113 | httpServer.on("/getPositionList", getPositionList); 114 | httpServer.on("/getPosition", getPosition); 115 | 116 | httpServer.begin(); 117 | } 118 | 119 | 120 | void loadLastValues() { 121 | File f = SPIFFS.open("/reverse.log", "r"); 122 | if (f) { 123 | isReverse = f.readStringUntil('\n').toInt() == 1; 124 | f.close(); 125 | } 126 | } 127 | 128 | //--------------------HTTP functions----------------------------------------- 129 | 130 | void getInfo() { 131 | httpServer.send(200, "text/plain", "0," + String(isReverse)); 132 | } 133 | 134 | void get_device_type() { 135 | httpServer.send(200, "text/plain", "Roller Blind"); 136 | } 137 | 138 | void motor_move() { 139 | motor_direction = httpServer.arg("direction").toInt(); 140 | if (isReverse) motor_direction *= -1; 141 | 142 | httpServer.send(200, "text/plain", "Moving"); 143 | } 144 | 145 | void go_to() { 146 | httpServer.send(200, "text/plain", "Ok."); 147 | } 148 | 149 | void setReverse() { 150 | int value = httpServer.arg("value").toInt(); 151 | isReverse = value == 1; 152 | 153 | File f = SPIFFS.open("/reverse.log", "w"); 154 | if (f) { 155 | f.println(isReverse); 156 | f.close(); 157 | } 158 | 159 | httpServer.send(200, "text/plain", "Ok."); 160 | } 161 | 162 | void addPosition() { 163 | httpServer.send(200, "text/plain", "Ok."); 164 | } 165 | 166 | void deletePosition() { 167 | httpServer.send(200, "text/plain", "Ok."); 168 | } 169 | 170 | void getPositionList() { 171 | httpServer.send(200, "text/plain", ""); 172 | } 173 | 174 | void getPosition() { 175 | httpServer.send(400, "text/plain", "Position not found"); 176 | } 177 | --------------------------------------------------------------------------------