Problem:
Lib Used:Youtube vid:
Read more- So I got punished because my mom caught me watching anime during study time.
- And when she enters my room I have no time to change the screen.
- so I just installed an ultrasonic sensor in my door so that whenever it sens any movement my computer will automatically change the channel.
- it is wireless.
- portable just stick to the pillar of the door and done.
- and I named it Room Intruder Pc Alert (RIPA)
- the normal width of a single door is 91.44cm(36 inches).
- so the ultrasonic distance measurement sensor attaches to Arduino monitors that if the distance < 90 then if will print H in serial.
1 / 2
- then the python program reads H then it will do the further procedure.
- I'm using here pyautogui python library to change the screen.wiring diagram:
- The particular module that I have can be powered from 3.6 to 6 volts because it comes on a breakout board that contains a voltage regulator. However, the logic voltage level of the data pins is 3.3V. So, the line between the Arduino TX (Transmit Pin, which has 5V output) and the Bluetooth module RX (Receive Pin, which supports only 3.3V) needs to be connected through a voltage divider in order not to burn the module. On the other hand, the line between the Bluetooth module TX pin and the Arduino RX pin can be connected directly because the 3.3V signal from the Bluetooth module is enough to be accepted as a high logic at the Arduino Board.
- first power up the Arduino.
- then look at the Bluetooth module led is blinking without delay this means it's not connected.
- open Bluetooth on pc( I'm using win 8.1 pc).
- pair and connect to the module passcode is 0000 or 1234.
- after this look at the Bluetooth module, the led is blinking with a delay then it means it's connected to pc.
- then we need to find the port for this search for devices and printers and open it.
- then fond Bluetooth module there and right-click on it and open properties.
- then go to services to know the port.
- then put the port here in code.
m5 = serial.Serial('COM8', 9600, timeout=.1)
- so now the setup is complete run the python program.
- if it shows this notification then it's working perfectly.
Comments
Please log in or sign up to comment.