Changes

Jump to navigation Jump to search

X630-Software

2,917 bytes removed, 12 March
no edit summary
{{GD Template Impl}}
This wiki describes how to use x630 on the Raspberry Pi OS. <span style="color:red;">Note: The software can currently be used directly on Raspberry Pi 4B, it 3B+/3B/Zero series. Software support for Raspberry Pi 5 software is just a demonot available which need to be tested.
==For The Raspberry Pi OS==X630 Foundation has two reset mode: '''Hardware reset''' and '''Software reset''' modes, we strongly recommend you use software reset mode if you use it on raspberry pi hardware or raspberry pi os, software reset uses GPIO 509 to reset operation through GPIO, which can prevent you from restarting the Raspberry Pi repeatedly, which is very convenient. And on other hardware platforms, X630 actually reserves pins to facilitate you to use custom GPIO pin to implement software reset operations or use directly hardware reset mode.updated several versions recently;
First, please choose your reset mode based The use guide of X630 depends on your hardware and the official Raspberry Pi OS (default is software reset mode), version you can skip this step if are using. Different versions have different usage methods. If you use software resethave some questions, it should be noted that disconnect power supply to please contact us and attach the Raspberry Pi before changing dip switch positionsos version you are using.(<span style="color:red;">Email: support@geekworm.com</span>)
[[File:Dip-switches.jpg|none|dip switch]]{| class="wikitable"! SELECTION !! SWITCH SETTINGS !! |-| Hardware reset || HW = 1 || SW For Raspberry Pi OS= 0|-| Software reset || HW = 0 || SW = 1|}'''NOTE:'''
Explain:* Hardware Since the X630 V1.5 version removes the software reset: After starting RASPISTILL or RASPIVID <span style="color:red;">once</span> then you will need to reboot Raspberry Pi to restart it again* Software &hardware reset: Starting RASPISTILL or RASPIVID <span style="color:red;">multiple times</span> and don't need to reboot Raspberry Pi ('''Recommend''')* Default setting is 'Software reset';* Please remove DIP switch, for the yellow protective film before change dip switchV1.<hr/>'''Preparations:'''1. Once booted5 version, update your Raspberry Pi by running please ignore the following commands in a terminal window: sudo aptuse of software reset or directly visit to [[X630-get update sudo aptHardware-get upgradeReset]]
2X630 v1. Run the following command to go into the Raspberry Pi configuration tool sudo raspi-config3 has two reset mode: '''Hardware reset''' and '''Software reset''' modes;
[[File:Raspi-config-1.jpg]]
3. Navigate You can use hardware reset mode if you use it on raspberry pi hardware or raspberry pi os, software reset uses GPIO 509 to ''''Interfacing Options'''' and hit Enter. Now select the ''''Camera'''' optionreset operation through GPIO, and hit which can prevent you from restarting the Enter key to enable it. Select “Finish” and select to '''reboot''' your Raspberry Pi.[[File:Raspi-config-2.jpg]] sudo reboot4. Once rebootedrepeatedly, you need to make sure that the ‘/dev/video0’ device which is available. Use this command to check in a terminal window: ls /dev/video0[[File:Raspi-config-3very convenient.jpg]]
If you see anything other than ‘file not found‘, then it’s available.
<hr/>'''For Software Reset''' The user guide of X630 is similar to [[HDMI TO CSI-2|C779]] when X630 is in hardware mode, but X630 supports audio when used with X630- Starting RASPISTILL or RASPIVID multiple times A2, and no need to reboot Raspberry Pi [[HDMI TO CSI-2|C779]] does not support audio
You can skip to step 12 if you use hardware reset mode;
5. Execute CAM GPIO initialization at startupFirst, need to add scripts in /etc/rc.local file.Run please confirm & select X630 work mode according the following two commendspicture; 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 sudo sed -i '$ i echo "1" > /sys/class/gpio/gpio509/value' /etc/rc.localOr sudo nano /etc/rc.local Scroll downAfter November 2021, and just before the 'exit 0' line, enter the following comment: echo "509" > /sys/class/gpio/export echo "out" > /sys/class/gpio/gpio509/direction echo "1" > /sys/class/gpio/gpio509/value[[File:Raspi-config-4-1.jpg]]default factory mode is hardware mode;
Save and exit with ctrl + xWe found that some users prefer hardware mode, followed by y when prompted so our factory default settings have been changed to save, and then enter.hardware mode
6. Create a script to reset the X630 module cd ~ sudo nano reset.shEnter the following[[File: echo "0" > /sys/class/gpio/gpio509/value sleep 1 echo "1" > /sys/class/gpio/gpio509/valueSave and exit with ctrl + x, followed by y when prompted to save, and then enterDip-switches.jpg|none|dip switch]]
NOTE<span style="color:Don't forget red;">Disconnect power to the folder where the reset.sh file is locatedRaspberry Pi before changing dip switch positions!!!</span>
7. Reboot your Raspberry Pi{| class="wikitable" sudo reboot! SELECTION !! SWITCH SETTINGS !! |-| Hardware reset(Default) || HW = 1 || SW = 0|-| Software reset || HW = 0 || SW = 1|}
8[[File:X630-Reset-01.To take first '''photo''' with the jpg|none|800px|X630 Moduledip switch setting]]
Return the fold of reset.sh file after restartExplain: cd ~ sudo bash * Hardware reset.sh raspistill -o image1.jpgHere, : After starting RASPISTILL or RASPIVID <span style="image1.jpgcolor:red;" is the name of your image that >once</span> then you will be saved need to your reboot Raspberry Pi 9. To take second '''photo''' with the X630 Module sudo bash reset.sh raspistill -o image2.jpgHere, "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 10000Here, "video1" is the name of your video and "10000" is the number of milliseconds. 11. Record second '''video''' with restart it again (Please use when operating system cannot control the X630 modulevia GPIO509) sudo bash * Software reset.sh raspivid -o video2.h264 -t 10000Here, "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 Starting RASPISTILL or RASPIVID. the CAM LED will go off for 1 second then turn on.<hrspan style="color:red;">multiple times</span> and don'''For Hardware Reset''' - Starting RASPISTILL or RASPIVID once then t need to reboot your Raspberry Pi. Please use the following guide if your dip switch * Default setting is changed to 'Hardware reset' position12. To take a photo with * Please remove the X630 Module raspistill -o imageyellow protective film before change dip switch.jpgHere, "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<hr/>
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 '''For Hardware Reset''' refer to record second video, then you will need to reboot the Raspberry Pi and execute the "raspivid" again. sudo reboot[[X630-Hardware-Reset]]
==How '''For Software Reset''' refer to check kernel version==Please run the following command to get the linux kernel version uname -a[[File:RaspiX630-kernelSoftware-version.jpgReset]]
Maybe you can refer to [https://www.raspberrypi.org/forums/viewtopic.php?f=38&t=281972 Here] if your kernel version is lower than 5.X.
Return to [[X630]]
<!--Add review function! -->

Navigation menu