Auto Connection of the Bluetooth and Auto Running the Camera on Raspberry Pi Zero
by NabeelLass in Circuits > Raspberry Pi
4646 Views, 5 Favorites, 0 Comments
Auto Connection of the Bluetooth and Auto Running the Camera on Raspberry Pi Zero
I saw people have problem with connecting or running commands/prog
creat new bash file
$ touch startup.sh
edit the file
$ sudo nano startup.sh
add the following:
#! /bin/sh
sudo rfcomm connect hci [MAC]
sudo /home/pi/myProgram
make the sh file executable
$sudo chmod +x startup.sh
edit the crontab :
$sudo crontab -e
then add:
@reboot /home/pi/startup.sh
This will make the Bluetooth connection to the pi automatically after a reboot and run any programs that help for running the camera.
for example, if you have a python script for taking a video this will work.