1 Connect to USB Camera(FA-CAM202)
The FA-CAM202 is a 200M USB camera. You can refer to <Connect DVP Camera (CAM500B) to Board> on how to connect a USB camera to a board.
You need to change the start.sh script and make sure it uses a correct /dev/videoX node. You can check your FA-CAM202's node by running the following commands:
$ apt-get install v4l-utils $ v4l2-ctl -d /dev/video1 -D Driver Info (not using libv4l2): Driver name : uvcvideo Card type : HC 3358+2100: HC 3358+2100 Bus info : usb-1c1b000.usb-1 ...
Information above indicates that /dev/video1 is the device node of the FA-CAM 202.
2 Check CPU's Working Temperature
You can get CPU's working temperature by running the following command:
$ cpu_freq CPU0 online=1 temp=26581 governor=ondemand cur_freq=480000 CPU1 online=1 temp=26581 governor=ondemand cur_freq=480000 CPU2 online=1 temp=26581 governor=ondemand cur_freq=480000 CPU3 online=1 temp=26581 governor=ondemand cur_freq=480000
This message means there are currently four CPUs working. All of their working temperature is 26.5 degree in Celsius and each one's clock is 480MHz.
3 Test Watchdog
You can test watchdog by running the following commands:
$ cd /root/demo/watchdog/ $ gcc watchdog_demo.c -o watchdog_demo $ ./watchdog_demo /dev/watchdog0 10 Set timeout: 10 seconds Get timeout: 10 seconds System will reboot in 10 second
System will reboot in 10 seconds.
4 Test Infrared Receiver
Note: Please Check your board if IR receiver exist.
By default the infrared function is disabled you can enable it by using the npi-config utility:
$ npi-config 6 Advanced Options Configure advanced settings A8 IR Enable/Disable IR ir Enable/Disable ir[enabled]
Reboot your system and test its infrared function by running the following commands:
$ apt-get install ir-keytable $ echo "+rc-5 +nec +rc-6 +jvc +sony +rc-5-sz +sanyo +sharp +mce_kbd +xmp" > /sys/class/rc/rc0/protocols # Enable infrared $ ir-keytable -t Testing events. Please, press CTRL-C to abort.
"ir-keytable -t" is used to check whether the receiver receives infrared signals. You can use a remote control to send infrared signals to the receiver. If it works you will see similar messages as follows:
1522404275.767215: event type EV_MSC(0x04): scancode = 0xe0e43 1522404275.767215: event type EV_SYN(0x00). 1522404278.911267: event type EV_MSC(0x04): scancode = 0xe0e42 1522404278.911267: event type EV_SYN(0x00).
5 Read CHIP ID
As for Allwinner H2+/H3/H5/ SoCs each of these CPUs has an internal 16-btye CHIP ID which can be read by running the following commands in the Linux-4.14 kernel:
$ apt-get install bsdmainutils $ hexdump /sys/bus/nvmem/devices/sunxi-sid0/nvmem 0000000 8082 0447 0064 04c3 3650 ce0a 1e28 2202 0000010 0002 0000 0000 0000 0000 0000 0000 0000 0000020 0000 0000 0000 0000 0000 0000 0000 0000 0000030 0000 0008 0508 0000 0000 0000 0000 0000 0000040 0000 0000 0000 0000 0000 0000 0000 0000
"8082 0447 0064 04c3 3650 ce0a 1e28 2202" is the 16-byte CHIP ID.
6 Access GPIO Pins/Wirings with WiringNP
The wiringPi library was initially developed by Gordon Henderson in C. It contains libraries to access GPIO, I2C, SPI, UART, PWM and etc. The wiringPi library contains various libraries, header files and a commandline utility:gpio. The gpio utility can be used to read and write GPIO pins.
FriendlyElec integrated this utility in FriendlyCore system allowing users to easily access GPIO pins. For more details refer to WiringNP WiringNP
7 Run Qt Demo
Run the following command
$ sudo /opt/QtE-Demo/run.sh
Here is what you expect to observe. This is an open source Qt Demo:
8 How to install and use docker (for arm64 system)
8.1 How to Install Docker
Run the following commands：
sudo apt-get update sudo apt-get install docker.io
8.2 Test Docker installation
Test that your installation works by running the simple docker image:
git clone https://github.com/friendlyarm/debian-jessie-arm-docker cd debian-jessie-arm-docker ./rebuild-image.sh ./run.sh