- You’ve already have Raspberry Pi 2B/2B+
- Raspbian has been installed on your Raspberry Pi
- Make sure your Raspberry Pi has Internet access
- Download Ruff SDK and extract the contents。
Configure the environment variables
Note: The methods below will apply only to your current session. Please refer to Environment Variables Configuration for instructions on making the configuration permanent.
Linux / OS X
Open the terminal and execute the following commands one by one, replacing
/path/to/ruff-sdkwith the path of your extracted SDK:
Open cmd and execute the following commands one by one, replacing
X:\path\to\ruff-sdkwith the path of your extracted SDK:
setx PATH “%PATH%;%RUFF_HOME%\bin”
rap --versionin the command line. If the version of rap is printed as expected,
PATHhas been successfully configured.
Note: Ruff SDK contains two executable files:
rapis the development toolkit with features like device pairing, application initialization, and driver and module managing.
ruffis the runtime of Ruff. The PC version of
rufftargets testing and simulation.
- Download Ruff for Raspberry Pi. Take 1.2.0 as example.
Transmit ruffos-rpi-1.2.0.zip to your Raspberry Pi
scp /path/to/ruffos-rpi-1.2.0.zip your_pi_user@your_pi_ip:/tmp
Login your Raspberry Pi
Extract the package
Run installation script
chmod +x install.sh
Enable I2C on Raspberry Pi
/boot/config.txt as follows and restart your Raspberry Pi.
# Uncomment some or all of these to enable the optional hardware interfaces
Create a new project folder (e.g.,
hello-ruff). Change the directory to the created folder and use rap to initialize the application. Note: Create your new project folder outside of the Ruff SDK directory.
rap init -b rpi-2b
Raspberry Pi 2B is specified here as board argument for init task.
Fill in information as prompted. You can use default values for all fields.
rapwill initialize the project, download configuration for the development board, and generate the hardware configuration file (
Execute the command
rap scanin the application directory to scan your Ruff development board:
If everything goes well, you should see your Ruff device in the list, as follows:
Scanning (this will take 10 seconds)...
* [unnamed] - 192.168.31.123
? select a device to interact: (Use arrow keys)
[unnamed] - 192.168.31.114
- Press enter to select your device, and
rapwill remember it for future operations. This only takes effect in the application folder. Follow the
rapprompts to set for the development board. You may also set up a password to avoid (to some degree) unauthorized operations.
Refer to Getting Started, it’s time write your own Ruff application.