开始使用覆盆子π和Test and Measurement Device
The following guide presents how to set up a Raspberry Pi 4 to control Test and Measurement devices and by the end of the guide, WaveForms will be running on Raspberry Pi 4. In this guide, a so called “headless” setup will be used, but other setups work as well.
Inventory
Hardware
-
A Digilent Test and Measurement device
-
A 5V 3A USB-C power supply
-
A minimum 8GB microSD card (an adapter might be needed, if your computer doesn't have a microSD socket)
-
A Computer connected to Wi-Fi
Note:If you plan to use your Raspberry Pi in another setup (with a display, or with Ethernet connection), you might need additional hardware.
Software on your PC
-
TeraTerm- or any other terminal emulator of your choice
Software on Raspberry Pi
Note:These programs will going to be downloaded and installed on the device, later in this guide.
Setting Up the Raspberry Pi
To see more setup options for your Raspberry Pi, check this site:Setting up your Raspberry Pi. If you have already set up your Raspberry Pi, you can skip this part.
- Raspberry Pi - "Headless" Setup
-
Insert the microSD card in your laptop, then download, install and open theRaspberry Pi Imager. Select the Raspberry PiOSas the operating system and your SD card in the second column, then click write. Once the writing process is finished, extract the SD card from your computer.
Reinsert the SD card into your PC. If you are working on Windows, you might be asked to format the SD card, but don't do that. Open the file manager, then open the only partition visible on your SD card: thebootpartition.
First create a new file namedssh(without extension!) in the root directory. When the Raspberry Pi boots, it will look for this file and if it finds it, it will enable Secure Shell (SSH) connection. We will use this connection to send commands to the Raspberry Pi when it boots first.
Create another file namedwpa_supplicant.conf(*.conf is the extension). Open this file with a text editor and copy the following lines in the file:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 country=
network={ ssid=" " psk=" " } Change the country code to fit your country, then set the SSID and the password of your Wi-Fi network before saving the file. This file will be used during the boot process of the Raspberry Pi to connect to the specified Wi-Fi network.
Insert the SD card in the Raspberry Pi, then power it up. Wait a bit (around 2-3 minutes) for the Raspberry Pi to connect to the network. On your PC, open a command prompt then display the Raspberry's IP address with the following command:
萍拉spberrypi.local -4
On your PC, download, install and openTera Term, or any other terminal emulator of your choice, then establish a new SSH connection to the IP address of the Raspberry Pi.
Log in with the username:
pi
and passphrase:
raspberry
Now you can send commands to your Raspberry Pi. First update and upgrade the installed packages with the commands:
sudo apt update sudo apt upgrade -y
When the upgrades are finished, open the settings of your Raspberry Pi with the command:
sudo raspi-config
You should see a graphical interface with different settings. SelectInterface Options(number 3 in the current version of the operating system) with the arrow keys and confirm with the enter key. Now selectVNC(P3 in the current version), then selectYes. This will enable Virtual Network Computing (VNC) when the device boots.
Exit the configuration tool with the escape key, then reboot the device with the following command:
sudo重启
You can close the terminal emulator.
On your PC, download, install and open aVNC Viewer. In the search bar, enter the IP address of the Raspberry Pi, then log in with the username:
pi
and password:
raspberry
Installing WaveForms on Raspberry Pi
On your Raspberry Pi, open theAdept Runtime Downloadand theWaveForms Downloadpages. Fill in the required fields, then download Adept runtime forLinux ARM-Raspberry Piand WaveForms forLinux ARM-32-bit.deb.
OpenDownloadsfolder with the file manager, then hitF4to open a terminal here. Install the downloaded packages with the following commands (don't forget to change the name of the files according to their version):
sudo dpkg -i digilent.adept.runtime_2.21.2-armhf.deb sudo dpkg -i digilent.waveforms_3.14.3_armhf.deb
Using WaveForms on Raspberry Pi
Connect your Test and Measurement device to one of the USB ports of the Raspberry Pi (doesn't matter which port).
WaveForms should automatically recognize the connected Test and Measurement device. If not, theDevice Managercan be opened from theSettingsmenu.
Now you have your Test and Measurement device connected to Raspberry Pi. You can use WaveForms on Raspberry Pi like on any other PC. For more guides about WaveForms, check:WaveForms Getting Started GuideandTest and Measurement Guides.
Next Steps
For more guides on how to use the Digilent Test and Measurement Device, return to the device's Resource Center, linked from theTest and Measurementpage of this wiki.
For technical support, please visit theTest and Measurementsection of the Digilent Forums.