I recently needed to hide the cursor upon boot in the GUI on a Raspberry Pi running Raspbian. I found the following method which is easy to install and works great.
Install Unclutter and edit the LXDE autostart script:
sudo apt-get install unclutter
nano ~/.config/lxsession/LXDE-pi/autostart Turn the cursor Off by adding the following line:
@unclutter -idle 0
Then you can reboot and cursor will disappear.
2 Comments
I recently purchased a PIR Detector HV-SR501 and here is a simple program to use it in Python with a Raspberry Pi 3.
Let's look at the wiring:
CAUTION: Verify on the PIR sensor's board that it has to be wired as displayed, the pinout on the PIR sensor is, on some models, inverted compared to the picture.
Once wired, below is a Python program that reads from the Raspberry Pi 3's GPIO ping #11 and prints every second if a movement has been detected.
import RPi.GPIO as GPIO
import time GPIO.setmode(GPIO.BOARD) GPIO.setup(11, GPIO.IN) while True: i=GPIO.input(11) if i==0: print time.ctime(),": no mouvement detected" else: print time.ctime(),": !!!!!!!!!! mouvement detected !!!!!!!!!!" time.sleep(1) You can change the two resistances on the other side of the PIR sensor using a screw driver to vary the delay and sensibility of the sensor. |
Archives
July 2021
Categories
All
|