IO
GPIO
Please change the code in <> to your GPIO export value
#switch to root
sudo su -
#set GPIO to high
echo 1 > /sys/class/gpio/<gpio339>/vlaue
#set GPIO to low
echo 0 > /sys/class/gpio/<gpio339>/vlaue
For auto config, write above commands to file
/etc/rc.local
.
Note: Description of GPIO external connection
DO is on/off output (on/off output is no output voltage, control output low voltage, pin grounding in normal time, control output high voltage, pin
neither output high level nor low level, high resistance state.If the external pull-up resistor is connected, the voltage will be drawn to the power
supply voltage of the pull-up resistor at the time of high output voltage.)
Set to high voltage, DO foot and external voltage are the same (0V~40V); Set to low level, DO feet for the ground.
UART
Open device node in /dev/. Then use stty command to set parameters. See stty command manual for details, please change the code in <> to
your UART device node.
#config UART
$ sudo stty -F /dev/<ttyTHS1> speed 115200 cs8 -parenb -cstopb -echo
#send data through UART
$ sudo echo “miivii tty debug” > /dev/<ttyTHS1>
#receive data from UART
$ sudo cat /dev/<ttyTHS1>
Use GPS To Give Time To The Device
Advantages of GPS timing function: The device obtains local standard time signal from GPS satellite through GPS device, so as to accurately
locate the device time
GPS Support Model
The serial port supports modifying baud rate. The default baud rate is 9600 GPS brand supported: all GPS devices that conform to GPRMC data
standard format output and must have PPS second pulse output
Connection Mode
Refer to the "Interface Description" in the manual.
Timing Function Configuration
When the GPS is connected for the first time, the system configuration should be conducted in MiiVii Setting configuration software. Configure
the Sync Mode option to GPS Mode and restart the system.Please refer to the section of "MiiVii Setting" for specific methods.