Changes

Jump to navigation Jump to search

X630-Software

2,691 bytes added, 12:39, 20 September 2021
no edit summary
If you see anything other than ‘file not found‘, then it’s available.
 
<hr/>
'''For Software Reset''' - Starting RASPISTILL or RASPIVID multiple times and no need to reboot Raspberry Pi
 
5. Execute CAM GPIO initialization at startup, need to add scripts in /etc/rc.local file.
Run the following two commends;
sudo sed -i '$ i echo "509" > /sys/class/gpio/export' /etc/rc.local
sudo sed -i '$ i echo "out" > /sys/class/gpio/gpio509/direction' /etc/rc.local
Or
sudo nano /etc/rc.local
Scroll down, and just before the 'exit 0' line, enter the following comment:
echo "509" > /sys/class/gpio/export
echo "out" > /sys/class/gpio/gpio509/direction
[[File:Raspi-config-4-1.jpg]]
Save and exit with ctrl + x, followed by y when prompted to save, and then enter.
 
6. Create a script to reset the X630 module
cd ~
sudo nano reset.sh
Enter the following:
echo "0" > /sys/class/gpio/gpio509/value
sleep 1
echo "1" > /sys/class/gpio/gpio509/value
Save and exit with ctrl + x, followed by y when prompted to save, and then enter.
 
NOTE:Don't forget the folder where the reset.sh file is located
7. Reboot your Raspberry Pi
sudo reboot
Then return the fold of reset.sh
8.To take first '''photo''' with the X630 Module
cd ~
sudo bash reset.sh
raspistill -o image1.jpg
Here, "image1.jpg" is the name of your image that will be saved to your Raspberry Pi
 
9. To take second '''photo''' with the X630 Module
sudo bash reset.sh
raspistill -o image2.jpg
Here, "image2.jpg" is the name of your image that will be saved to your Raspberry Pi
10. Record first '''video''' with the X630 module
sudo bash reset.sh
raspivid -o video1.h264 -t 10000
Here, "video1" is the name of your video and "10000" is the number of milliseconds.
11. Record second '''video''' with the X630 module
sudo bash reset.sh
raspivid -o video2.h264 -t 10000
Here, "video2" is the name of your video and "10000" is the number of milliseconds.
 
'''Note''': "sudo bash reset.sh" is always required to execute before starting RASPISTILL or RASPIVID. the CAM LED will go off for 1 second then turn on.
<hr>
'''For Hardware Reset''' - Starting RASPISTILL or RASPIVID once then reboot your Raspberry Pi
 
12. To take a photo with the X630 Module
raspistill -o image.jpg
Here, "image.jpg" is the name of your image that will be saved to your Raspberry Pi
 
13. If you need to take second image, then you will need to reboot the Raspberry Pi and execute the "raspistill" again.
sudo reboot
 
14. To record a video with the X630 module
raspivid -o video.h264 -t 10000
Here, "video" is the name of your video and "10000" is the number of milliseconds.
 
15. If you need to record second video, then you will need to reboot the Raspberry Pi and execute the "raspivid" again.
sudo reboot
 
<!--Add review function! -->
<comments />

Navigation menu