Google Chat: zj734465502@gmail.com
+86-0755-88291180
sales01@spotpear.com
dragon_manager@163.com
services01@spotpear.com
manager01@spotpear.com
WhatsApp:13246739196
Raspberry Pi Expansion/Evaluation Board, features various interfaces
Download newest Rapsbian image from Raspberry Pi web site.
Programming the system image file with Win32DiskImager.exe
Format your TF card with the SDFormatter.exe.
Start the Win32DiskImager.exe, and select the system image file copied into your PC, then, click the button Write to program the system image file.
Connect your PC to the UART TO USB interface on DVK512 via a mini USB cable;
Install the cp2102_driver;
PuTTY settings
Start the software PuTTY.exe, and configure the following parameters:
After the system is started up, you should input following information: User name: pi and Password: raspberry. Then, you can enter the serial terminal to communicate with the Raspberry Pi.
Before performing any operations described in this section, you should connect DVK512 to RPi with onboard pin headers, unless otherwise specified.
Before using the DVK512 programs, you shall install the the bcm2835, wiringPi and python libraries to the RPi to add the additional APIs, and configure the settings to start up the core drivers of I2C, SPI and UART after the libraries installed. For more detailed information about the installation and configuration of the RPI library functions, please refer to Libraries Installation for RPi. Of course, we have provided a system image file with the libraries installed as well. In case that you don’t want to reinstall the libraries, you can program this ready-to-use system image file to your Raspberry Pi board. You can find the API source code in the directory /home/pi/DVK512 only if using the ready-to-use system image. Note: Each demo should be run under the corresponding directory, e.g. to use the bcm2835 demo of the LED, execute the command:
pi@raspberrypi ~/DVK512/LED/bcm2835 $ sudo ./led
This means that, you should first enter the path ~/DVK512/LED/bcm2835 than execute the command sudo ./led
(./led is a compiled executable file).
The sudo means that the command is executed by a super user. The sudo is not required If you log in as a root user, e.g.
root@raspberrypi:/home/pi/DVK512/LED/bcm2835# ./led
Unless otherwise specified, the following demos are pre-compiled to executable files which can be run directly. If you intend to compile the C program of bcm2835, wiringPi, sysfs, etc. then please enter the demo directory and execute the command make
to compile the program while the command make clean
to remove the executable files. For example:
pi@raspberrypi ~/DVK512/LED/bcm2835 $ make clean rm led pi@raspberrypi ~/DVK512/LED/bcm2835 $ make gcc -Wall led.c -o led -lbcm2835
Python program can be run directly without compilations, e.g.
pi@raspberrypi ~/DVK512/LED/python $ sudo python led.py
bcm2835 program:
pi@raspberrypi ~/DVK512/LED/bcm2835 $ sudo ./led
wiringPi program:
pi@raspberrypi ~/DVK512/LED/wiringPi $ sudo ./led
Python program:
pi@raspberrypi ~/DVK512/LED/python $ sudo python led.py
shell program:
pi@raspberrypi ~/DVK512/LED/shell $ sudo ./LED.sh 26 1
pi@raspberrypi ~/DVK512/LED/shell $ sudo ./LED.sh 26 0
bcm2835 program:
pi@raspberrypi ~/DVK512/KEY/bcm2835 $ sudo ./key
wiringPi program:
pi@raspberrypi ~/DVK512/KEY/bcm2835 $ sudo ./key
Python program:
pi@raspberrypi ~/DVK512/KEY/bcm2835 $ sudo ./key
Connect the 8-channel Logic Level Converter to the onboard 8I/Os interface. (Notices: The VCCA pin header on the Logic Level Converter should be connected to the 3V3 pin header of the 8I/Os connector on DVK512). Pin relationships between Logic Level Converter and DVK512:
Logic Level Converter | DVK512 |
---|---|
VCCB | 5V |
GND | GND |
B0 | LED0 |
B1 | LED2 |
B3 | LED3 |
B4 | KEY0 |
B5 | KEY1 |
B6 | KEY2 |
B7 | DEY3 |
Enter the terminal, and execute corresponding commands:
bcm2835 program:
pi@raspberrypi ~/DVK512/Logic-Converter/bcm2835 $ sudo ./Logic_Converter
wringPi program:
pi@raspberrypi ~/DVK512/Logic-Converter/wiringPi $ sudo ./Logic_Converter
python program:
pi@raspberrypi ~/DVK512/Logic-Converter/python $ sudo python Logic_Converter.py
Connect the Mix Board to the 8I/Os interface. Enter the terminal, and execute corresponding commands:
bcm2835 program:
pi@raspberrypi ~/DVK512/JOYSTICK/bcm2835 $ sudo ./joystick
wringPi program:
pi@raspberrypi ~/DVK512/JOYSTICK/wiringPi $ sudo ./joystick
python program:
pi@raspberrypi ~/DVK512/JOYSTICK/python $ sudo python joystick.py
Press or move the joystick, the terminal will show the action.
Connect the Mix Board to the 8I/Os interface. Enter the terminal, and execute corresponding commands:
wringPi program:
pi@raspberrypi ~/DVK512/Buzzer_PWM/wiringPi $ sudo ./Buzzer
python program:
pi@raspberrypi ~/DVK512/Buzzer_PWM/python $ sudo python buzzer.py
The buzzer on the Mix Board will buzz in 4 seconds.
Press the keys Ctrl+C to end the program.
Connect the Mix Board to the 8I/Os interface.
Insert the DS18B20 to the ON-WIRE interface on Mix Board.
Enter the terminal, and execute corresponding commands:
sysfs program:
pi@raspberrypi ~/DVK512/DS18B20/fs $ sudo ./ds18b20
python program:
pi@raspberrypi ~/DVK512/DS18B20/python $ sudo python ds18b20.py
The terminal will display the current temperature information.
Connect the Mix Board to the 8I/Os interface.
Connect the infrared receiver to the IRM interface on Mix Board.
Notices: The infrared receiver should be placed according to the shape of the icon shown on the IRM interface of Mix Board.
Terminal displays the key pressed on the infrared remote controller
Enter the terminal, and execute corresponding commands:
bcm2835 program:
pi@raspberrypi ~/DVK512/IRM/bcm2835 $ sudo ./irm
wiringPi program:
pi@raspberrypi ~/DVK512/IRM/wiringPi $ sudo ./irm
python program:
pi@raspberrypi ~/DVK512/IRM/python $ sudo python irm.py
Press any key on the infrared remote controller provided by Waveshare. The terminal will display the decoded infrared signal in hexadecimal format.
Press the keys Ctrl+C to end the demo.
Insert the LCD1602 into the LCD1602 interface on DVK512.
Enter the Linux terminal, and run the following commands:
pi@raspberrypi ~/DVK512/LCD1602 $ sudo ./lcd1602
LCD1602 will display relative information. If there is nothing shown, please adjust the potentiometer on the LCD1602. The red box in Figure 11 shows the position of the potentiometer.
Set the jumpers on DVK512:
Install i2c-tools. If you have not installed i2c-tools yet, please enter the terminal, and input: root@ raspberrypi:/# apt-get install i2c-tools
Enter the Linux terminal, and run the following commands:
root@ raspberrypi:/# i2cdetect –y 1
Then, you will see the device address of PCF8563 connected to Raspberry Pi module. Here, the device address of PCF8563 is 51, indicating that the PCF8563 is detected by Raspberry Pi.
Enter the terminal, and execute corresponding commands:
bcm2835 program:
pi@raspberrypi ~/DVK512/PCF8563/bcm2835 $ sudo ./pcf8563
wiringPi program:
pi@raspberrypi ~/DVK512/PCF8563/wiringPi $ sudo ./pcf8563
python program:
pi@raspberrypi ~/DVK512/PCF8563/python $ sudo ./pcf8563.py
Time of PCF8563 will be shown on the terminal.
Connect the PCF8591 module to the I2C interface on DVK512.
Connecting the pins AIN0 and AD0 together
Connect the pins AIN0 and AD0 on the PCF8591 together via a cable.
Displaying the AD values read from ADC0-ADC3
Enter the terminal, and execute corresponding commands:
bcm2835 program:
pi@raspberrypi ~/DVK512/PCF8591/ADC/bcm2835 $ sudo ./pcf8591
wiringPi program:
pi@raspberrypi ~/DVK512/PCF8591/ADC/wiringPi $ sudo ./pcf8591
python program:
pi@raspberrypi ~/DVK512/PCF8591/ADC/python $ sudo python pcf8591.py
The terminal will display the AD values read from ADC0-ADC3 (corresponding to the pins AIN0-AIN3 on PCF8591).
Connect the PCF8591 module to the I2C interface on DVK512.
Connecting the Pin AOUT on PCF8591 to the LED pin header on DVK512
Connect the Pin AOUT on PCF8591 to the LED pin header on DVK512.
Enter the terminal, and execute corresponding commands:
bcm2835 program:
pi@raspberrypi ~/DVK512/PCF8591/DAC/bcm2835 $ sudo ./pcf8591
wiringPi program:
pi@raspberrypi ~/DVK512/PCF8591/DAC/wiringPi $ sudo ./pcf8591
python program:
pi@raspberrypi ~/DVK512/PCF8591/DAC/python $ sudo python pcf8591.py
The digital conversion value is displayed in the terminal. And the brightness of the LED indicator on DVK512 will change with the level variation on the pin AOUT.
Connect the LSM303DLHC module to the I2C interface on DVK512.
Notices: LSM303DLHC module has two rows of pins, and the one connected to DVK512 contains the pins SDA and SCL.
Enter the terminal, and execute corresponding commands:
bcm2835 program:
pi@raspberrypi ~/DVK512/LSM303DLHC/bcm2835 $ sudo ./LSM303DLHC
wiringPi program:
pi@raspberrypi ~/DVK512/LSM303DLHC/wiringPi $ sudo ./LSM303DLHC
python program:
pi@raspberrypi ~/DVK512/LSM303DLHC/python $ sudo python LSM303DLHC.py
The terminal will display the relative values read from acceleration of gravity and magnetic sensor.
Connect the L3G4200D to the SPI interface on DVK512.
Angular velocity values
Enter the terminal, and execute corresponding commands:
bcm2835 program:
pi@raspberrypi ~/DVK512/L3G4200D/bcm2835 $ sudo ./L3G4200D
wiringPi program:
pi@raspberrypi ~/DVK512/L3G4200D/wiringPi $ sudo ./L3G4200D
python program:
pi@raspberrypi ~/DVK512/L3G4200D/python $ sudo python L3G4200D.py
The terminal will display the angular velocity values in three factors of x axis, y axis and z axis, respectively.
Note: The Serial Port of Raspberry pi is used for terminal debugging by default, so for using UART function, the Serial terminal debugging function needs to be closed.
Connect the onboard UART TO USB port to a PC via a mini USB cable.
Enter the terminal, and execute corresponding commands:
wiringPi program: pi@raspberrypi ~/DVK512/UART/wiringPi $ sudo ./UART
python program: pi@raspberrypi ~/DVK512/UART/python $ sudo ./uart.py
Run Serial monitor software, choose a corresponding COM port and set the baud rate as 115200. The field sent by the software will be sent back and shown on the software.
In the default boot mode of the system image provided by Waveshare, the serial port works as terminal debugging output. In order to control peripherals via serial port communication, you should input corresponding commands on the terminal to disable the debugging function of the serial port.
sudo raspi-config
Choose Advanced Options -> Serial –>no to disable the debugging function of the serial port.
Once the debugging function of the serial port is disabled, you cannot access the Pi using Serial port but you can re-enable the debugging function by raspi-config.
GPS position information
Insert a GPS module into the UART interface on DVK512, and remove the jumper wire from UART JMP.
Enter the terminal, and input the following commands to set the Baud rate (The Baud rate will be restored to the default value: 115200, after the system rebooted).
root@raspberrypi:/# stty -F /dev/ttyAMA0 38400 root@raspberrypi:/# gpsd /dev/ttyAMA0 -F /var/run/gpsd.sock
Enter the terminal and input the following command to open the GPS software provided by the Linux system:
root@raspberrypi:/# cgps -s
The terminal will display relative GPS position information.
Open the terminal of Raspberry Pi and install libraries as guides below
cd sudo apt-get install wiringpi wget https://project-downloads.drogon.net/wiringpi-latest.deb sudo dpkg -i wiringpi-latest.deb gpio -v
cd wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.60.tar.gz tar zxvf bcm2835-1.60.tar.gz cd bcm2835-1.60/ sudo ./configure sudo make && sudo make check && sudo make install
For more information and the newest libraries please refer to website:http://www.airspayce.com/mikem/bcm2835/
cd sudo apt-get update sudo apt-get install python-pip sudo pip install RPi.GPIO
cd sudo apt-get update sudo apt-get install python3-pip sudo pip install RPi.GPIO