├── 8X8 Counter └── Counter8X8.ino ├── Arduino Basics ├── Episode01_Arduino_testing │ └── Episode01_Arduino_testing.ino ├── Episode02_BULB │ └── Episode02_BULB.ino └── report.md ├── Bluetooth_display_16X2 └── Bluetooth_display_16X2.ino ├── Display I2C ├── I2C_LCD_Code │ └── I2C_LCD_Code.ino └── temp.txt ├── HeartBeat └── HeartBeat.ino ├── House Automation ├── Report └── Screenshot (380).png ├── LDR ├── LDR.ino └── LDR.png ├── LICENSE ├── Parking_System_Firebase ├── Parking System circuit .png ├── Parking_system_nodemcu_code │ └── Parking_system_nodemcu_code.ino └── report.md ├── Parking_servoMotor ├── Parking_servoMotor.ino ├── Report.md └── parking_Servomotor.png ├── README.md ├── Real_time_clock └── Real_time_clock.ino ├── SoilMoisture ├── SoilMoisture.ino └── SoilMoisture.png ├── UltrasonicSensor └── UltrasonicSensor.ino ├── Ultrasonic_SERVO └── Ultrasonic_SERVO.ino ├── Ultrasonic_alarm ├── Ultrasonic_alarm.ino └── ultrasonic_alarm.png ├── WifiServo ├── PageIndex.h └── WifiServo.ino └── pir ├── pir.ino └── pir.png /8X8 Counter/Counter8X8.ino: -------------------------------------------------------------------------------- 1 | #include "LedControl.h" 2 | 3 | LedControl lc=LedControl(12,10,11,1); 4 | 5 | unsigned long delaytime1=1000; 6 | unsigned long delaytime2=5000; 7 | void setup() { 8 | 9 | lc.shutdown(0,false); 10 | /* Set the brightness to a medium values */ 11 | lc.setIntensity(0,1); 12 | /* and clear the display */ 13 | lc.clearDisplay(0); 14 | 15 | } 16 | 17 | /* 18 | This method will count down from 10 to 1 then display a heart. Byte letters refer to digits, Byte z is the heart 19 | */ 20 | void CountdownOnMatrix() 21 | { 22 | 23 | /* here is the data for the characters */ 24 | byte j[8]={B01000001,B11111111,B10000000,B01111110,B10000001,B10000001,B10000001,B01111110}; 25 | byte i[8]={B00000000,B01001110,B10010001,B10010001,B10010001,B01111110,B00000000,B00000000}; 26 | byte h[8]={B00000000,B01110110,B10001001,B10001001,B10001001,B01110110,B00000000,B00000000}; 27 | byte g[8]={B00000000,B00000001,B11100001,B00010001,B00001001,B00000111,B00000000,B00000000}; 28 | byte f[8]={B00000000,B01111110,B10001001,B10001001,B10001001,B01110010,B00000000,B00000000}; 29 | byte e[8]={B00000000,B01001111,B10001001,B10001001,B10001001,B01110001,B00000000,B00000000}; 30 | byte d[8]={B00000000,B00110000,B00101000,B00100100,B00100010,B11111111,B00100000,B00000000}; 31 | byte c[8]={B00000000,B01000010,B10000001,B10001001,B10001001,B01110110,B00000000,B00000000}; 32 | byte b[8]={B00000000,B10000010,B11000001,B10100001,B10010001,B10001110,B00000000,B00000000}; 33 | byte a[8]={B00000000,B00000000,B10000001,B11111111,B10000000,B00000000,B00000000,B00000000}; 34 | byte z[8]={B00011110,B00111111,B01111111,B11111110,B11111110,B01111111,B00111111,B00011110}; 35 | 36 | 37 | /* now display them one by one with a small delay */ 38 | lc.setRow(0,0,j[0]); 39 | lc.setRow(0,1,j[1]); 40 | lc.setRow(0,2,j[2]); 41 | lc.setRow(0,3,j[3]); 42 | lc.setRow(0,4,j[4]); 43 | lc.setRow(0,5,j[5]); 44 | lc.setRow(0,6,j[6]); 45 | lc.setRow(0,7,j[7]); 46 | delay(delaytime1); 47 | lc.setRow(0,0,i[0]); 48 | lc.setRow(0,1,i[1]); 49 | lc.setRow(0,2,i[2]); 50 | lc.setRow(0,3,i[3]); 51 | lc.setRow(0,4,i[4]); 52 | lc.setRow(0,5,i[5]); 53 | lc.setRow(0,6,i[6]); 54 | lc.setRow(0,7,i[7]); 55 | delay(delaytime1); 56 | lc.setRow(0,0,h[0]); 57 | lc.setRow(0,1,h[1]); 58 | lc.setRow(0,2,h[2]); 59 | lc.setRow(0,3,h[3]); 60 | lc.setRow(0,4,h[4]); 61 | lc.setRow(0,5,h[5]); 62 | lc.setRow(0,6,h[6]); 63 | lc.setRow(0,7,h[7]); 64 | delay(delaytime1); 65 | lc.setRow(0,0,g[0]); 66 | lc.setRow(0,1,g[1]); 67 | lc.setRow(0,2,g[2]); 68 | lc.setRow(0,3,g[3]); 69 | lc.setRow(0,4,g[4]); 70 | lc.setRow(0,5,g[5]); 71 | lc.setRow(0,6,g[6]); 72 | lc.setRow(0,7,g[7]); 73 | delay(delaytime1); 74 | lc.setRow(0,0,f[0]); 75 | lc.setRow(0,1,f[1]); 76 | lc.setRow(0,2,f[2]); 77 | lc.setRow(0,3,f[3]); 78 | lc.setRow(0,4,f[4]); 79 | lc.setRow(0,5,f[5]); 80 | lc.setRow(0,6,f[6]); 81 | lc.setRow(0,7,f[7]); 82 | delay(delaytime1); 83 | lc.setRow(0,0,e[0]); 84 | lc.setRow(0,1,e[1]); 85 | lc.setRow(0,2,e[2]); 86 | lc.setRow(0,3,e[3]); 87 | lc.setRow(0,4,e[4]); 88 | lc.setRow(0,5,e[5]); 89 | lc.setRow(0,6,e[6]); 90 | lc.setRow(0,7,e[7]); 91 | delay(delaytime1); 92 | lc.setRow(0,0,d[0]); 93 | lc.setRow(0,1,d[1]); 94 | lc.setRow(0,2,d[2]); 95 | lc.setRow(0,3,d[3]); 96 | lc.setRow(0,4,d[4]); 97 | lc.setRow(0,5,d[5]); 98 | lc.setRow(0,6,d[6]); 99 | lc.setRow(0,7,d[7]); 100 | delay(delaytime1); 101 | lc.setRow(0,0,c[0]); 102 | lc.setRow(0,1,c[1]); 103 | lc.setRow(0,2,c[2]); 104 | lc.setRow(0,3,c[3]); 105 | lc.setRow(0,4,c[4]); 106 | lc.setRow(0,5,c[5]); 107 | lc.setRow(0,6,c[6]); 108 | lc.setRow(0,7,c[7]); 109 | delay(delaytime1); 110 | lc.setRow(0,0,b[0]); 111 | lc.setRow(0,1,b[1]); 112 | lc.setRow(0,2,b[2]); 113 | lc.setRow(0,3,b[3]); 114 | lc.setRow(0,4,b[4]); 115 | lc.setRow(0,5,b[5]); 116 | lc.setRow(0,6,b[6]); 117 | lc.setRow(0,7,b[7]); 118 | delay(delaytime1); 119 | lc.setRow(0,0,a[0]); 120 | lc.setRow(0,1,a[1]); 121 | lc.setRow(0,2,a[2]); 122 | lc.setRow(0,3,a[3]); 123 | lc.setRow(0,4,a[4]); 124 | lc.setRow(0,5,a[5]); 125 | lc.setRow(0,6,a[6]); 126 | lc.setRow(0,7,a[7]); 127 | delay(delaytime1); 128 | lc.setRow(0,0,z[0]); 129 | lc.setRow(0,1,z[1]); 130 | lc.setRow(0,2,z[2]); 131 | lc.setRow(0,3,z[3]); 132 | lc.setRow(0,4,z[4]); 133 | lc.setRow(0,5,z[5]); 134 | lc.setRow(0,6,z[6]); 135 | lc.setRow(0,7,z[7]); 136 | delay(delaytime2); 137 | } 138 | 139 | 140 | void loop() 141 | { 142 | // if (digitalRead(buttonApin) == LOW) 143 | // { 144 | CountdownOnMatrix(); 145 | lc.clearDisplay(0); 146 | //} 147 | } 148 | -------------------------------------------------------------------------------- /Arduino Basics/Episode01_Arduino_testing/Episode01_Arduino_testing.ino: -------------------------------------------------------------------------------- 1 | 2 | void setup() { 3 | // initialize digital pin LED_BUILTIN as an output. 4 | pinMode(LED_BUILTIN, OUTPUT); 5 | } 6 | 7 | // the loop function runs over and over again forever 8 | void loop() { 9 | digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) 10 | delay(1000); // wait for a second 11 | digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW 12 | delay(1000); // wait for a second 13 | } 14 | -------------------------------------------------------------------------------- /Arduino Basics/Episode02_BULB/Episode02_BULB.ino: -------------------------------------------------------------------------------- 1 | void setup() { 2 | // put your setup code here, to run once: 3 | pinMode(13,OUTPUT); 4 | digitalWrite(13,LOW); 5 | } 6 | 7 | void loop() { 8 | // put your main code here, to run repeatedly: 9 | digitalWrite(13,HIGH); 10 | delay(1000); 11 | digitalWrite(13,LOW); 12 | delay(1000); 13 | } 14 | -------------------------------------------------------------------------------- /Arduino Basics/report.md: -------------------------------------------------------------------------------- 1 | # 🔌 Arduino Basics: From Zero to Hero 2 | 3 | Welcome to the **Arduino Basics** series – your beginner-friendly gateway into the world of **embedded systems**, **electronics**, and **programming microcontrollers**. Whether you're a student, hobbyist, or an absolute beginner, this series will take you from your first LED blink to building interactive Arduino projects – one episode at a time. 4 | 5 | 📺 **Watch the Full Series on YouTube** 6 | Join us on this journey! Each episode is crafted to be beginner-friendly, practical, and fun. 7 | > 🔗 [Subscribe to the Channel](https://youtube.com/@theneostudios) for updates and new lessons! 8 | 9 | --- 10 | 11 | ## 🚀 What's Inside? 12 | 13 | This repository is a companion to the video series and contains: 14 | - 🧠 Source code for every episode 15 | - 📷 Circuit diagrams & pinouts 16 | - 📎 Helpful references 17 | - 🛠️ Tools and tips to get started 18 | 19 | --- 20 | 21 | ## 🎬 Episode Guide 22 | 23 | | Episode | Topic | Watch on YouTube | Source Code | 24 | |---------|-----------------------------|-------------------------------------------|-------------| 25 | | 1️⃣ | Arduino Blink (built in led) | [Watch Now](https://youtu.be/hVzRmsy6lyU) | [builtin_led.ino](https://github.com/neosandeep24/ArduinoExperiments/tree/main/Arduino%20Basics/Episode01_Arduino_testing) | 26 | | 2️⃣ | Simple Bulb blink | [Watch Now]() | [Bulb_blink.ino](https://github.com/neosandeep24/ArduinoExperiments/blob/main/Arduino%20Basics/Episode02_BULB/Episode02_BULB.ino) | 27 | | ... | More Coming Soon! | Stay tuned & subscribe! | Coming soon | 28 | 29 | > 🆕 More episodes added weekly – Don’t forget to ⭐ star the repo if you're learning something new! 30 | 31 | --- 32 | 33 | ## 📦 Requirements 34 | 35 | - Arduino UNO (or compatible board) 36 | - USB cable 37 | - Breadboard, LEDs, resistors, buttons, potentiometer, jumper wires 38 | - Sensors like Ultrasonic, IR etc 39 | - Display screen (16 X 2 I2C), Servo motors etc 40 | 41 | You can install the Arduino IDE here: [https://www.arduino.cc/en/software](https://www.arduino.cc/en/software) 42 | 43 | --- 44 | 45 | ## 🌟 Support & Community 46 | 47 | - 💬 **Comments? Questions?** Drop them on the YouTube videos or open an [Issue](https://github.com/neosandeep24/arduino-basics/issues) 48 | - 🧑‍💻 Contribute your code or improvements through Pull Requests 49 | - ❤️ Share with fellow makers! 50 | 51 | --- 52 | 53 | ## 📣 Let's Connect 54 | 55 | Follow me on other platforms for behind-the-scenes content, project sneak peeks, and more tutorials! 56 | 57 | - 🎥 YouTube: [@TheNeoStudios](https://youtube.com/@theneostudios) 58 | 59 | --- 60 | 61 | ## 📖 License 62 | 63 | This project is open-source and licensed under the [MIT License](LICENSE). 64 | 65 | > Made with ❤️ and Arduino. 66 | -------------------------------------------------------------------------------- /Bluetooth_display_16X2/Bluetooth_display_16X2.ino: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | // Initialize the LCD with the address 0x27 for a 16x2 display 6 | LiquidCrystal_I2C lcd(0x27, 16, 2); 7 | 8 | // Initialize Bluetooth module using SoftwareSerial on pins 2 (RX) and 3 (TX) 9 | SoftwareSerial bluetooth(2, 3); // RX, TX 10 | 11 | void setup() { 12 | lcd.init(); 13 | lcd.backlight(); 14 | 15 | bluetooth.begin(9600); 16 | 17 | lcd.setCursor(0, 0); 18 | lcd.print("Waiting for BT"); 19 | } 20 | 21 | void loop() { 22 | if (bluetooth.available()) { 23 | delay(100); 24 | lcd.clear(); 25 | 26 | while (bluetooth.available() > 0) { 27 | char incomingChar = bluetooth.read(); 28 | lcd.write(incomingChar); 29 | delay(100); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Display I2C/I2C_LCD_Code/I2C_LCD_Code.ino: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | LiquidCrystal_I2C lcd(0x27, 16, 2); // set the LCD address to 0x27 for a 16 chars and 2 line display 5 | 6 | void setup() 7 | { 8 | lcd.init(); // initialize the lcd 9 | lcd.backlight(); // Turn on the LCD screen backlight 10 | } 11 | 12 | void loop() 13 | { 14 | lcd.setCursor(2, 0); 15 | lcd.print("NAMASTE "); 16 | lcd.setCursor(2, 1); 17 | lcd.print(" INDIA"); 18 | delay(4000); 19 | lcd.clear(); 20 | 21 | lcd.setCursor(2, 0); 22 | lcd.print("JAI "); 23 | lcd.setCursor(2, 1); 24 | lcd.print(" SRI RAM"); 25 | delay(4000); 26 | lcd.clear(); 27 | 28 | 29 | lcd.setCursor(2, 0); 30 | lcd.print("I LOVE "); 31 | lcd.setCursor(2, 1); 32 | lcd.print(" MY MOM"); 33 | delay(4000); 34 | lcd.clear(); 35 | } 36 | -------------------------------------------------------------------------------- /Display I2C/temp.txt: -------------------------------------------------------------------------------- 1 | This is temp file 2 | -------------------------------------------------------------------------------- /HeartBeat/HeartBeat.ino: -------------------------------------------------------------------------------- 1 | //You will need a Max7219 library 2 | //In Arduino IDE go to Tools -> Manage Libraries -> Search Max7219 and install it 3 | 4 | int ANIMDELAY = 100; 5 | int INTENSITYMIN = 0; 6 | int INTENSITYMAX = 8; 7 | //Subcribe to the neo studios 8 | //Pins 9 | //VCC -> VCC 10 | //GND -> GND 11 | int DIN_PIN = 12; // data in pin 12 | int CS_PIN = 10; // load (CS) pin 13 | int CLK_PIN = 11; // clock pin 14 | 15 | // MAX7219 registers 16 | byte MAXREG_DECODEMODE = 0x09; 17 | byte MAXREG_INTENSITY = 0x0a; 18 | byte MAXREG_SCANLIMIT = 0x0b; 19 | byte MAXREG_SHUTDOWN = 0x0c; 20 | byte MAXREG_DISPTEST = 0x0f; 21 | 22 | //heart pattern for each led 23 | const unsigned char heart[] = 24 | { 25 | B01100110, 26 | B11111111, 27 | B11111111, 28 | B11111111, 29 | B01111110, 30 | B00111100, 31 | B00011000, 32 | B00000000 33 | }; 34 | 35 | void setup () 36 | { 37 | pinMode(DIN_PIN, OUTPUT); 38 | pinMode(CLK_PIN, OUTPUT); 39 | pinMode(CS_PIN, OUTPUT); 40 | 41 | // initialization of the MAX7219 42 | setRegistry(MAXREG_SCANLIMIT, 0x07); 43 | setRegistry(MAXREG_DECODEMODE, 0x00); 44 | setRegistry(MAXREG_SHUTDOWN, 0x01); 45 | setRegistry(MAXREG_DISPTEST, 0x00); 46 | setRegistry(MAXREG_INTENSITY, 0x0f & INTENSITYMIN); 47 | 48 | // draw hearth 49 | setRegistry(1, heart[0]); 50 | setRegistry(2, heart[1]); 51 | setRegistry(3, heart[2]); 52 | setRegistry(4, heart[3]); 53 | setRegistry(5, heart[4]); 54 | setRegistry(6, heart[5]); 55 | setRegistry(7, heart[6]); 56 | setRegistry(8, heart[7]); 57 | } 58 | 59 | 60 | void loop () 61 | { 62 | // second beat 63 | setRegistry(MAXREG_INTENSITY, 0x0f & INTENSITYMAX); 64 | delay(ANIMDELAY); 65 | 66 | // switch off 67 | setRegistry(MAXREG_INTENSITY, 0x0f & INTENSITYMIN); 68 | delay(ANIMDELAY); 69 | 70 | // second beat 71 | setRegistry(MAXREG_INTENSITY, 0x0f & INTENSITYMAX); 72 | delay(ANIMDELAY); 73 | 74 | // switch off 75 | setRegistry(MAXREG_INTENSITY, 0x0f & INTENSITYMIN); 76 | delay(ANIMDELAY*6); 77 | } 78 | 79 | 80 | void setRegistry(byte reg, byte value) 81 | { 82 | digitalWrite(CS_PIN, LOW); 83 | 84 | putByte(reg); // specify register 85 | putByte(value); // send data 86 | 87 | digitalWrite(CS_PIN, LOW); 88 | digitalWrite(CS_PIN, HIGH); 89 | } 90 | 91 | void putByte(byte data) 92 | { 93 | byte i = 8; 94 | byte mask; 95 | while (i > 0) 96 | { 97 | mask = 0x01 << (i - 1); 98 | digitalWrite( CLK_PIN, LOW); 99 | if (data & mask) 100 | digitalWrite(DIN_PIN, HIGH); 101 | else 102 | digitalWrite(DIN_PIN, LOW); 103 | digitalWrite(CLK_PIN, HIGH); 104 | --i; 105 | } 106 | } 107 | -------------------------------------------------------------------------------- /House Automation/Report: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /House Automation/Screenshot (380).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neosandeep24/ArduinoExperiments/45539326abbcbc45a497f07b5b7290de9333aeec/House Automation/Screenshot (380).png -------------------------------------------------------------------------------- /LDR/LDR.ino: -------------------------------------------------------------------------------- 1 | 2 | void setup() 3 | { 4 | pinMode(A0,INPUT); 5 | pinMode(13, OUTPUT); 6 | Serial.begin(9600); 7 | } 8 | int value=0; 9 | void loop() 10 | { 11 | value=analogRead(A0); 12 | if(value>20) 13 | { 14 | digitalWrite(13,HIGH); 15 | } 16 | else 17 | { 18 | digitalWrite(13,LOW); 19 | } 20 | 21 | 22 | } 23 | -------------------------------------------------------------------------------- /LDR/LDR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neosandeep24/ArduinoExperiments/45539326abbcbc45a497f07b5b7290de9333aeec/LDR/LDR.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 neosandeep24 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Parking_System_Firebase/Parking System circuit .png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neosandeep24/ArduinoExperiments/45539326abbcbc45a497f07b5b7290de9333aeec/Parking_System_Firebase/Parking System circuit .png -------------------------------------------------------------------------------- /Parking_System_Firebase/Parking_system_nodemcu_code/Parking_system_nodemcu_code.ino: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #define FIREBASE_HOST "ENTER YOUR FIREBASE HOST WILL BE LIKE ------.firebaseio.com" 6 | #define WIFI_SSID "YOUR WIFI NAME" 7 | #define WIFI_PASSWORD "YOUR WIFI PASSWORD" 8 | #define FIREBASE_Authorization_key "YOUR AUTHORIZATION KEY" 9 | 10 | FirebaseData firebaseData; 11 | FirebaseJson json; 12 | 13 | unsigned long presentTime1 = 0, presentTime2 = 0; 14 | unsigned long previousTime1 = 0, previousTime2 = 0; 15 | int resultTime1, resultTime2; 16 | int f1 = 0, f2 = 0; 17 | int rate = 10; // per 1 second 18 | int amount1, amount2; 19 | String filled = "Filled"; 20 | String empty = "Empty"; 21 | 22 | Servo gateServo; 23 | int servoPin = 14; 24 | 25 | void setup() { 26 | Serial.begin(9600); 27 | delay(10); 28 | WiFi.begin(WIFI_SSID, WIFI_PASSWORD); 29 | Serial.print("Connecting to "); 30 | Serial.print(WIFI_SSID); 31 | while (WiFi.status() != WL_CONNECTED) { 32 | Serial.print("."); 33 | delay(100); 34 | } 35 | Serial.println(); 36 | Serial.print("Connected"); 37 | Serial.print("IP Address: "); 38 | Serial.println(WiFi.localIP()); 39 | Firebase.begin(FIREBASE_HOST, FIREBASE_Authorization_key); 40 | pinMode(4, INPUT); 41 | pinMode(5, INPUT); 42 | gateServo.attach(servoPin); 43 | Serial.println("Initializing..."); 44 | delay(10); 45 | } 46 | 47 | void loop() { 48 | if (digitalRead(4) == LOW) { 49 | Serial.println("\nP1:Filled4"); 50 | Firebase.setString(firebaseData, "PS1", filled); 51 | presentTime1 = millis(); 52 | f1 = 1; 53 | resultTime1 = (presentTime1 - previousTime1) / 1000; 54 | } 55 | if (digitalRead(4) == HIGH) { 56 | if (f1 == 1) { 57 | amount1 = resultTime1 * rate; 58 | Serial.print("\nP1 Amount:"); 59 | Serial.print(amount1); 60 | previousTime1 = presentTime1; 61 | } 62 | f1 = 0; 63 | Serial.println("\nP1:Empty4"); 64 | Firebase.setString(firebaseData, "PS1", empty); 65 | } 66 | if (digitalRead(5) == LOW) { 67 | Serial.println("\nP2:Filled5"); 68 | Firebase.setString(firebaseData, "PS2", filled); 69 | presentTime2 = millis(); 70 | f2 = 1; 71 | resultTime2 = (presentTime2 - previousTime2) / 1000; 72 | } 73 | if (digitalRead(5) == HIGH) { 74 | if (f2 == 1) { 75 | amount2 = resultTime2 * rate; 76 | Serial.print("\nP2 Amount:"); 77 | Serial.print(amount2); 78 | previousTime2 = presentTime2; 79 | } 80 | f2 = 0; 81 | Serial.println("\nP2:Empty5"); 82 | Firebase.setString(firebaseData, "PS2", empty); 83 | } 84 | 85 | Firebase.setFloat(firebaseData, "PS1Bill", amount1); 86 | Firebase.setFloat(firebaseData, "PS2Bill", amount2); 87 | 88 | //any ir sensor detects nothing then free parking slot is available 89 | 90 | if (digitalRead(4) == LOW && digitalRead(5) == LOW) { 91 | openGate(); 92 | } else { 93 | closeGate(); 94 | } 95 | } 96 | 97 | void openGate() { 98 | gateServo.write(150); // Adjust the angle to open the gate 99 | delay(2000); 100 | } 101 | 102 | void closeGate() { 103 | gateServo.write(0); // Adjust the angle to close the gate 104 | } 105 | -------------------------------------------------------------------------------- /Parking_System_Firebase/report.md: -------------------------------------------------------------------------------- 1 | # Car Parking System with slots and billing 2 | 3 | ## Working 4 | In this video I have implemented a automatic Car parking system. 5 | Based on the availability of car parking slots the Nodemcu gives instruction to servo motor to rise the toll gate and updates the availability , 6 | car parking fee in the firebase 7 | 8 | ## Components used : 9 | 1. Nodemcu 10 | 2. IR Sensors 11 | 3. Servo Motor 12 | 13 | ## Softwares used : 14 | 1. Firebase 15 | 2. Arduino ide 16 | 17 | ## Circuit Connections:- 18 | 19 | IR sensor one ---- Nodemcu 20 | 21 | out pin --- digital pin D1 22 | 23 | Vcc --- 3v 24 | 25 | Gnd --- Gnd 26 | 27 | IR sensor two ---- Nodemcu 28 | 29 | out pin --- digital pin D2 30 | 31 | Vcc --- 3v 32 | 33 | Gnd --- Gnd 34 | 35 | Servo motor 36 | 37 | control signal of servo motor (ORANGE) ----- Digital pin D5 of Nodemcu 38 | 39 | vcc of servo motor (RED) ----- 3v of Nodemcu 40 | 41 | GND of servo motor (BLACK) ----- GND of Nodemcu 42 | 43 | ## Circuit diagram :- 44 | 45 | ![Parking System circuit ](https://github.com/neosandeep24/ArduinoExperiments/assets/103883917/1c78dcc0-79ab-4b92-bd51-a77c42556b7a) 46 | -------------------------------------------------------------------------------- /Parking_servoMotor/Parking_servoMotor.ino: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | Servo myservo; 4 | 5 | int pos = 0; 6 | 7 | int cm = 0; 8 | 9 | long readUltrasonicDistance(int triggerPin, int echoPin) 10 | { 11 | pinMode(triggerPin, OUTPUT); 12 | digitalWrite(triggerPin, LOW); 13 | delayMicroseconds(2); 14 | digitalWrite(triggerPin, HIGH); 15 | delayMicroseconds(10); 16 | digitalWrite(triggerPin, LOW); 17 | pinMode(echoPin, INPUT); 18 | return pulseIn(echoPin, HIGH); 19 | } 20 | 21 | 22 | 23 | void setup() { 24 | digitalWrite(12,LOW); 25 | myservo.attach(9); 26 | Serial.begin(9600); 27 | } 28 | 29 | void loop() { 30 | cm = 0.01723 * readUltrasonicDistance(6, 7); 31 | 32 | if(cm<30){ 33 | Serial.print(cm); 34 | Serial.println("cm"); 35 | 36 | for (pos = 0; pos <= 120; pos += 1) { 37 | myservo.write(pos); 38 | delay(15); 39 | } 40 | delay(500); 41 | 42 | for (pos = 120; pos >= 0; pos -= 1) { 43 | myservo.write(pos); 44 | delay(15); 45 | } 46 | delay(5000); //add delay how much you want 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /Parking_servoMotor/Report.md: -------------------------------------------------------------------------------- 1 | # Automatic Gate opener 2 | 3 | ## Working 4 | In this I have implemented a automatic tollgate system. 5 | Detecting the car using ultrasonic sensor the arduino gives instruction to servo motor to rise the toll gate 6 | 7 | ## Components used : 8 | 1. Arduino 9 | 2. UltraSonic sensor 10 | 3. Servo Motor 11 | 4. Breadboard 12 | 13 | ## Circuit Connections:- 14 | 15 | Ultrasonic sensor ---- Arduino 16 | 17 | trigger pin --- digital pin 6 18 | 19 | echo pin --- digital pin 7 20 | 21 | Vcc --- 5v 22 | 23 | Gnd --- Gnd 24 | 25 | Servo motor 26 | 27 | control signal of servo motor (ORANGE) ----- Digital pin Number 9 of arduino 28 | 29 | vcc of servo motor (RED) ----- 5v of arduino 30 | 31 | GND of servo motor (BLACK) ----- GND of arduino 32 | 33 | ## Circuit diagram :- 34 | 35 | ![Screenshot (261)](https://github.com/neosandeep24/ArduinoExperiments/assets/103883917/c73c964d-4498-49f8-93dd-5aa18014e5b6) 36 | 37 | 38 | Arduino project 39 | -------------------------------------------------------------------------------- /Parking_servoMotor/parking_Servomotor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neosandeep24/ArduinoExperiments/45539326abbcbc45a497f07b5b7290de9333aeec/Parking_servoMotor/parking_Servomotor.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Arduino Experiments 🚀 2 | 3 |

Hello everyone

4 | 5 |

6 | 7 | YouTube 8 | 9 | 12 |

13 | 14 |

15 | Arduino GIF 16 |

17 | 18 |

Explore the world of Arduino with my experiments and projects!

19 | 20 | ## 📺 Check Out My YouTube Channel 21 | Dive deeper into the projects by watching detailed videos on my YouTube channel: 22 | The Neo Studios. 23 | 24 | ## 📂 Source Codes 25 | I regularly post source codes for Arduino projects 🧑‍💻 that I've developed. Feel free to explore, use, and contribute! 26 | 27 | ## ⚙️ Requirements 28 | To get started with these projects, you'll need: 29 | - Arduino Board 30 | - Arduino IDE 31 | - Various modules and components 32 | 33 | ## ⭐ Star This Repository 34 | If you find these projects helpful, please give this repository a star ⭐ to show your support and help others find it! 35 | 36 |

37 | 38 | 39 | 40 |

41 | -------------------------------------------------------------------------------- /Real_time_clock/Real_time_clock.ino: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | LiquidCrystal_I2C lcd(0x27, 16, 2); // IF YOUR ADDRESS IS DIFFERENT, PUT THAT IN PLACE OF '0x27F' 8 | const char *ssid = ""; 9 | const char *password = ""; 10 | WiFiUDP ntpUDP; 11 | #define offset 19800 12 | NTPClient timeClient(ntpUDP, "pool.ntp.org"); 13 | void setup() { 14 | WiFi.begin(ssid, password); 15 | timeClient.begin(); 16 | timeClient.setTimeOffset(offset); 17 | lcd.init(); 18 | lcd.backlight(); 19 | lcd.blink_on(); 20 | lcd.clear(); 21 | } 22 | void loop() { 23 | timeClient.update(); 24 | time_t epochTime = timeClient.getEpochTime(); 25 | String formattedTime = timeClient.getFormattedTime(); 26 | struct tm *ptm = gmtime ((time_t *)&epochTime); 27 | 28 | int monthDay = ptm->tm_mday; 29 | int currentMonth = ptm->tm_mon+1; 30 | int currentYear = ptm->tm_year+1900; 31 | String currentDate = String(monthDay)+"/"+String(currentMonth)+"/"+String(currentYear); 32 | 33 | lcd.setCursor(0, 0); 34 | lcd.print("DATE:"+currentDate); 35 | lcd.setCursor(0, 1); 36 | lcd.print("TIME:"+formattedTime); 37 | lcd.setCursor(15, 1); 38 | delay(500); 39 | } 40 | -------------------------------------------------------------------------------- /SoilMoisture/SoilMoisture.ino: -------------------------------------------------------------------------------- 1 | 2 | void setup() 3 | { 4 | pinMode(13, OUTPUT); 5 | Serial.begin(9600); 6 | } 7 | int value=0; 8 | void loop() 9 | { 10 | value=analogRead(A0); 11 | int values=(value/539.00)*100; 12 | Serial.println(values);//percentage of moisture 13 | if(values>50) 14 | digitalWrite(13, HIGH); 15 | else 16 | digitalWrite(13, LOW); 17 | delay(1000); 18 | } 19 | -------------------------------------------------------------------------------- /SoilMoisture/SoilMoisture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neosandeep24/ArduinoExperiments/45539326abbcbc45a497f07b5b7290de9333aeec/SoilMoisture/SoilMoisture.png -------------------------------------------------------------------------------- /UltrasonicSensor/UltrasonicSensor.ino: -------------------------------------------------------------------------------- 1 | 2 | int inches = 0; 3 | 4 | int cm = 0; 5 | 6 | long readUltrasonicDistance(int triggerPin, int echoPin) 7 | { 8 | pinMode(triggerPin, OUTPUT); // Clear the trigger 9 | digitalWrite(triggerPin, LOW); 10 | delayMicroseconds(2); 11 | // Sets the trigger pin to HIGH state for 10 microseconds 12 | digitalWrite(triggerPin, HIGH); 13 | delayMicroseconds(10); 14 | digitalWrite(triggerPin, LOW); 15 | pinMode(echoPin, INPUT); 16 | // Reads the echo pin, and returns the sound wave travel time in microseconds 17 | return pulseIn(echoPin, HIGH); 18 | } 19 | 20 | void setup() 21 | { 22 | Serial.begin(9600); 23 | } 24 | 25 | void loop() 26 | { 27 | // measure the ping time in cm 28 | cm = 0.01723 * readUltrasonicDistance(6, 7); 29 | // convert to inches by dividing by 2.54 30 | inches = (cm / 2.54); 31 | Serial.print(inches); 32 | Serial.print("in, "); 33 | Serial.print(cm); 34 | Serial.println("cm"); 35 | delay(100); // Wait for 100 millisecond(s) 36 | } 37 | -------------------------------------------------------------------------------- /Ultrasonic_SERVO/Ultrasonic_SERVO.ino: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | Servo myServo; 4 | 5 | int inches = 0; 6 | int cm = 0; 7 | 8 | long readUltrasonicDistance(int triggerPin, int echoPin) 9 | { 10 | pinMode(triggerPin, OUTPUT); 11 | digitalWrite(triggerPin, LOW); 12 | delayMicroseconds(2); 13 | 14 | digitalWrite(triggerPin, HIGH); 15 | delayMicroseconds(10); 16 | digitalWrite(triggerPin, LOW); 17 | pinMode(echoPin, INPUT); 18 | return pulseIn(echoPin, HIGH); 19 | } 20 | 21 | void setup() 22 | { 23 | Serial.begin(9600); 24 | pinMode(4, OUTPUT); 25 | digitalWrite(4, LOW); 26 | myServo.attach(9); 27 | myServo.write(0); 28 | } 29 | 30 | void loop() 31 | { 32 | cm = 0.01723 * readUltrasonicDistance(6, 7); 33 | 34 | if (cm <= 15) 35 | { 36 | digitalWrite(4, HIGH); 37 | myServo.write(30); 38 | Serial.print(cm); 39 | Serial.println("cm"); 40 | } 41 | else 42 | { 43 | digitalWrite(4, LOW); 44 | myServo.write(0); 45 | } 46 | 47 | delay(100); 48 | } 49 | -------------------------------------------------------------------------------- /Ultrasonic_alarm/Ultrasonic_alarm.ino: -------------------------------------------------------------------------------- 1 | const int trigPin = 2; 2 | const int echoPin = 3; 3 | // defines variables 4 | long duration; 5 | int distance; 6 | void setup() { 7 | pinMode(4,OUTPUT); 8 | pinMode(trigPin, OUTPUT); // Sets the trigPin as an Output 9 | pinMode(echoPin, INPUT); // Sets the echoPin as an Input 10 | Serial.begin(9600); // Starts the serial communication 11 | } 12 | void loop() { 13 | // Clears the trigPin 14 | digitalWrite(trigPin, LOW); 15 | delayMicroseconds(2); 16 | // Sets the trigPin on HIGH state for 10 micro seconds 17 | digitalWrite(trigPin, HIGH); 18 | delayMicroseconds(10); 19 | digitalWrite(trigPin, LOW); 20 | // Reads the echoPin, returns the sound wave travel time in microseconds 21 | duration = pulseIn(echoPin, HIGH); 22 | // Calculating the distance 23 | distance = duration * 0.034 / 2; 24 | // Prints the distance on the Serial Monitor 25 | if(distance<5){ 26 | digitalWrite(4,HIGH); 27 | } 28 | else 29 | { 30 | digitalWrite(4,LOW); 31 | } 32 | Serial.print("Distance: "); 33 | Serial.println(distance); 34 | } 35 | -------------------------------------------------------------------------------- /Ultrasonic_alarm/ultrasonic_alarm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neosandeep24/ArduinoExperiments/45539326abbcbc45a497f07b5b7290de9333aeec/Ultrasonic_alarm/ultrasonic_alarm.png -------------------------------------------------------------------------------- /WifiServo/PageIndex.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 20 |

ESP32 with Servo

21 |

Position:

22 | 23 | 37 | 38 | -------------------------------------------------------------------------------- /WifiServo/WifiServo.ino: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | Servo myservo; // create servo object to control a servo 5 | // twelve servo objects can be created on most boards 6 | 7 | // GPIO the servo is attached to 8 | static const int servoPin = D1; 9 | 10 | // Replace with your network credentials 11 | char* ssid = "Your Wifi Name"; 12 | char* password = "Your wifi password"; 13 | 14 | // Set web server port number to 80 15 | WiFiServer server(80); 16 | 17 | // Variable to store the HTTP request 18 | String header; 19 | 20 | // Decode HTTP GET value 21 | String valueString = String(5); 22 | int pos1 = 0; 23 | int pos2 = 0; 24 | 25 | // Current time 26 | unsigned long currentTime = millis(); 27 | // Previous time 28 | unsigned long previousTime = 0; 29 | // Define timeout time in milliseconds (example: 2000ms = 2s) 30 | const long timeoutTime = 2000; 31 | 32 | void setup() { 33 | Serial.begin(115200); 34 | 35 | myservo.attach(servoPin); // attaches the servo on the servoPin to the servo object 36 | myservo.write(0); 37 | // Connect to Wi-Fi network with SSID and password 38 | Serial.print("Connecting to "); 39 | Serial.println(ssid); 40 | WiFi.begin(ssid, password); 41 | while (WiFi.status() != WL_CONNECTED) { 42 | delay(500); 43 | Serial.print("."); 44 | } 45 | // Print local IP address and start web server 46 | Serial.println(""); 47 | Serial.println("WiFi connected."); 48 | Serial.println("IP address: "); 49 | Serial.println(WiFi.localIP()); 50 | server.begin(); 51 | } 52 | 53 | void loop(){ 54 | WiFiClient client = server.available(); // Listen for incoming clients 55 | 56 | if (client) { // If a new client connects, 57 | currentTime = millis(); 58 | previousTime = currentTime; 59 | Serial.println("New Client."); // print a message out in the serial port 60 | String currentLine = ""; // make a String to hold incoming data from the client 61 | while (client.connected() && currentTime - previousTime <= timeoutTime) { // loop while the client's connected 62 | currentTime = millis(); 63 | if (client.available()) { // if there's bytes to read from the client, 64 | char c = client.read(); // read a byte, then 65 | Serial.write(c); // print it out the serial monitor 66 | header += c; 67 | if (c == '\n') { // if the byte is a newline character 68 | // if the current line is blank, you got two newline characters in a row. 69 | // that's the end of the client HTTP request, so send a response: 70 | if (currentLine.length() == 0) { 71 | // HTTP headers always start with a response code (e.g. HTTP/1.1 200 OK) 72 | // and a content-type so the client knows what's coming, then a blank line: 73 | client.println("HTTP/1.1 200 OK"); 74 | client.println("Content-type:text/html"); 75 | client.println("Connection: close"); 76 | client.println(); 77 | 78 | // Display the HTML web page 79 | client.println(""); 80 | client.println(""); 81 | client.println(""); 82 | // CSS to style the on/off buttons 83 | // Feel free to change the background-color and font-size attributes to fit your preferences 84 | client.println(""); 86 | client.println(""); 87 | 88 | // Web Page 89 | client.println("

ESP32 with Servo

"); 90 | client.println("

Position:

"); 91 | client.println(""); 92 | 93 | client.println(""); 98 | 99 | client.println(""); 100 | 101 | //GET /?value=180& HTTP/1.1 102 | if(header.indexOf("GET /?value=")>=0) { 103 | pos1 = header.indexOf('='); 104 | pos2 = header.indexOf('&'); 105 | valueString = header.substring(pos1+1, pos2); 106 | 107 | //Rotate the servo 108 | myservo.write(valueString.toInt()); 109 | Serial.println(valueString); 110 | } 111 | // The HTTP response ends with another blank line 112 | client.println(); 113 | // Break out of the while loop 114 | break; 115 | } else { // if you got a newline, then clear currentLine 116 | currentLine = ""; 117 | } 118 | } else if (c != '\r') { // if you got anything else but a carriage return character, 119 | currentLine += c; // add it to the end of the currentLine 120 | } 121 | } 122 | } 123 | // Clear the header variable 124 | header = ""; 125 | // Close the connection 126 | client.stop(); 127 | Serial.println("Client disconnected."); 128 | Serial.println(""); 129 | } 130 | } 131 | -------------------------------------------------------------------------------- /pir/pir.ino: -------------------------------------------------------------------------------- 1 | int pirSensor = 2; 2 | 3 | void setup() { 4 | pinMode(pirSensor, INPUT); 5 | pinMode(13, OUTPUT); 6 | Serial.begin(9600); 7 | } 8 | 9 | void loop() { 10 | int sensorValue = digitalRead(pirSensor); 11 | 12 | if (sensorValue == 1) { 13 | digitalWrite(13,HIGH); 14 | Serial.write("Detected\n"); 15 | } 16 | else 17 | { 18 | digitalWrite(13,LOW); 19 | Serial.write("Not Detected\n"); 20 | 21 | } 22 | delay(1000); 23 | } 24 | -------------------------------------------------------------------------------- /pir/pir.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neosandeep24/ArduinoExperiments/45539326abbcbc45a497f07b5b7290de9333aeec/pir/pir.png --------------------------------------------------------------------------------