Introduction: 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

Step 1:

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

Step 2:

make the sh file executable

$sudo chmod +x startup.sh

Step 3:

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.