Panel Cookies
Automatic Curtain - Code
16/04/2022 | Views: 24165 | Arduino | by: ELECTRONOOBS      


Now that everything is connected inside, I upload the final code that you can download from below. Also download the Android App that I’ve designed, copy it to your smartphone using a USB cable and then install it. Let’s make a test. I connect 12V and turn on the Arduino. In bluetooth, I search for new devices and I pair toi the HC-05 module using 1234 or 0000 password. Now I open my App. Press the bluetooth icon and select the HC05 module and you will see that the LED will stop blinking. I can rotate the motor up and down. When I press the home button, as you can see on the tutorial video, the motor will rotate in one direction till I place a magnet in front of the hall sensor. When that happens, it stores the home position and we can use it normally. Use the arrows on the app to lower or rise the curtain. So everything seems to work ok.


Download Arduino Code (16/04/2022)


Arduino code automatic curtain






#include <SoftwareSerial.h>
#include <EEPROM.h>
const byte rxPin = 10;
const byte txPin = 11;
// Set up a new SoftwareSerial object
SoftwareSerial HC05 (rxPin, txPin);













Last tutorials

ESP32 WiFi Walkie Talkie with ESP-NOW and I2S Microphone
DIY Laser Power Meter for 10$ (PCB & code)
Fully Portable Battery Soldering Iron
Turbo Air Blower with Brushless motor + 3D printed case
3D Printed Headphones with PLANAR PCB

ADVERTISERS



Affiliate Disclosure

ADVERTISERS

PCBWAY PCB service







Curso Arduino Online nivel bajo