Google Chat: zj734465502@gmail.com
+86-0755-88291180
sales01@spotpear.com
dragon_manager@163.com
services01@spotpear.com
manager01@spotpear.com
WhatsApp:13246739196
BB Black Expansion CAPE, Features RS485 and CAN Interfaces
Follow the steps below to write the Angstrom into TF card:
1) Extract the system image
Extract the system image file .img.7z by using archiver software like 7z920.exe.
Note: please download the image file from:
LCD CPAE(4.3inch) image for testing
LCD CPAE(7inch) image for testing
MISC CAPE and RS485/CAN CAPE image for testing
2) Format the TF card
Use HPUSBDisk.exe to format the TF card.
Choose the Device as your TF card, File system as FAT32. Then click Start.
Note: the TF card capacity should be 4GB or above!
3) Writing the system image
Launch Win32DiskImager.exe, select the extracted system image. Then click write.
1) Connect the LCD CAPE with USB TO UART interface to the PC through a USB cable.
Note: You need to install the corresponding driver. Please refer to the respective manuals of your USB TO UART module.
Interface definition:
2) Open PL2303_Prolific_DriverInstaller_v1.8.0.exe and install the driver.
3) Launch putty.exe, configure as follows, then click Open.
Note:
1) Insert the TF card into the BeagleBone Black onboard slot, keep pressing down the BOOT button, power up the board, then release the BOOT button.
2) When the system startups, input "root" to enter Bash Shell environment, now the shell commands are available to use. All the commands follows are executed here.
Note: please make sure that you are using the TF card image that we provide, and the system should boot from TF card (keep pressing down BOOT button, then power up), otherwise, the testing will fail.
The API source code can be found on /home/xuser/waveshare_demo/API.
1) Connect to a LCD
Note: There are two models of LCD CAPE, LCD CAPE (4.3inch) and LCD CAPE (7inch), each one corresponds our 4.3inch or 7inch resistive touch screen respectively. Some batches of LCD CAPE provide both interfaces. If the CAPE connected to the LCD by a wrong interface, it may damage the LCD and the main board.
Download LCD CPAE(4.3inch) image for testing.
Connect BB Black to the 4.3inch LCD.
Download LCD CPAE(7inch) image for testing.
Connect BB Black to the 7inch LCD.
2) The touchscreen should be calibrated when the display mode has been changed:
root@beaglebone:~# rm -rf /etc/pointercal* root@beaglebone:~# ts_calibrate root@beaglebone:~# sync
Reboot the system. Note: if the calibration failed, reboot and retry again.
Short the LED jumper, enter:
root@beaglebone:~# test_led
The 4 LEDs will light up one by one, press Ctrl+C to exit.
1) Short the buzzer jumper, enter:
root@beaglebone:~# ls /sys/devices/ocp.3/
You'll find the “pwm_ehrpwm1b.14” as shown:
2) Because the pwm_ehrpwm1b.14's extension is .14. It is needed to add parameter 14 when buzzer tested.
root@beaglebone:~# test_pwm 14
The buzzer will make sounds in different frequency.
1) Insert the DS18B20 into the 1-WIRE socket, short the 1-WIRE jumper, enter:
root@beaglebone:~#ls /sys/bus/w1/devices/
You will find the "28-00000 57c5948" (the last 7 characters are unique for each DS18B20, it depends)
2) Execute:
root@beaglebone:~#test_ds18b20 57c5948
The terminal will print the current temperature.
1) Execute
root@beaglebone:~# test_key event2
Note: Device file "event2" is based on user‘s device, Not necessarily "event2". you can execute the following command to view:
root@beaglebone:~# ls /dev/input
2) Press any of the onboard buttons, the terminal will show which one has been pressed, press Ctrl+C to exit.
Note: if the LCD screen was connected while testing joystick/buttons, the LCD screen seems that it was touched at the same time, it's normal.
Confirm that the module is powered by onboard battery.
1) Show system date time:
root@beaglebone:~# date
2) Set system date time:
root@beaglebone:~# date 020809302014.23
3) Set the hardware clock of RTC module:
root@beaglebone:~# hwclock –w –f /dev/rtc1
4) Show the hardware clock of RTC module:
root@beaglebone:~# hwclock –r –f /dev/rtc1
5) Synchronize the hardware clock to system date time:
root@beaglebone:~# hwclock –s –f /dev/rtc1
6) Power off and reboot, read the hardware clock of RTC module and synchronize to system date time:
root@beaglebone:~# hwclock –r –f /dev/rtc1
root@beaglebone:~# hwclock –s –f /dev/rtc1
root@beaglebone:~# date
Now the date time of software and hardware are synchronous.
Two BeagleBone Black and two RS485/CAN CAPEs are required for this testing. Set jumper to enable UART1(RXD1, TXD1). Connect two CAN Board to CAN1 interface separately, connect the CANH, CANL of one module to the CANH, CANL of another module via jumper wires.
1) Configure the baud rate:
root@beaglebone:~#canconfig can0 bitrate 115200 ctrlmode triple-sampling on
2) Enable the CAN device:
root@beaglebone:~# canconfig can0 start
The two CAN devices act as receiver and sender separately. The receiver gets ready to receive data first, and then the sender starts sending data.
3) Receiver:
root@beaglebone:~# candump can0
As shown in the picture:
4) Sender:
root@beaglebone:~# cansend can0 -i 0x11 0x12 0x13 0x14
As shown in the picture:
5) Stop the devices:
root@beaglebone:~# canconfig can0 stop
Two BeagleBone Black and two RS485/CAN CAPEs are required for this testing. Set jumper to enable UART2(RXD2, TXD2). Connect two RS485 Boards to UART2 interface separately. Connect the A, B of one module to the A, B of another module via jumper wires.
The two RS485 devices act as receiver and sender separately.
1) The receiver gets ready to receive data first, and then the sender starts sending data. Execute:
root@beaglebone:~# test_485 –d /dev/ttyO2 –b 115200
2) Receiver:
Select "2", it will keep receiving data until you select "3".
As shown in the picture:
3) Sender:
Select "1", and then enter the message, say, "abc", it loops sending the message until you select "3".
As shown in the picture:
4) Press Ctrl+C to exit.
1) Connect the USB Camera to the BeagleBone Black USB Host connector.
2) Check the assigned IP:
root@beaglebone:~# ifconfig eth0
As shown in the picture, the IP is 192.168.1.143. Note this IP(it depends).
3) Start up the video stream server:
root@beaglebone:~# cd/home/xuser/waveshare_demo/API/camera_test/mjpg-streamer
root@beaglebone:~# ./ start.sh
4) Open browser on the PC in the same local network, visit the following address to view the video (default port number is 8080):
http://192.168.1.143:8080/javascript.html
(It depends on the IP you have noted)
5) Press Ctrl+C to exit.
1) Config the wireless network:
a) Power off, connect the USB WIFI module to the BeagleBone Black USB Host connector, power up again.
b) Check the USB status:
root@beaglebone:~# lsusb
c) Check the network status:
root@beaglebone:~# ifconfig
d) Shut down the Ethernet NIC, start up the WIFI NIC:
root@beaglebone:~# ifconfig eth0 down
root@beaglebone:~# ifconfig wlan0 up
e) Check the WIFI status:
root@beaglebone:~# ifconfig
There's no AP connected, therefore, the wlan0 RX TX packets are both 0.
f) Config the wlan0 IP:
root@beaglebone:~# ifconfig wlan0 192.168.2.107
g) Config the gateway:
root@beaglebone:~# route add default gw 192.168.2.1
h) Config the DNS:
root@beaglebone:~# vi /etc/resolv.conf
Edit
nameserver 127.0.0.1
As:
nameserver 8.8.8.8
Save and exit.
i) Scan wireless router:
root@beaglebone:~# iwlist wlan0 scan
2) Connect to the router:
a) Config the key file /etc/wpa_supplicant.conf:
root@beaglebone:~# vi /etc/wpa_supplicant.conf
Edit:
network={ key_mgmt=NONE }
As:
network={ ssid="waveshare" psk="12345678" }
Save and exit.
b) Connect manually:
root@beaglebone:~# wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf
c) Test the connection:
root@beaglebone:~# ping www.baidu.com