Ready to create your first Ruff project? Let’s turn on the LED on the Ruff development board.
- In order to get started, you’ll need the Ruff development kit. If you don’t yet have it, you can order it online.
Suggestion: Before you start Ruff journey at the first time, please upgrade your firmware to get lastest features.
- If you have any problem, refere to Trouble Shooting please.
- Download Ruff SDK and extract the contents.
- Now execute
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:
rap is the development toolkit with features like device pairing, application initialization, and driver and module managing.
ruff is the runtime of Ruff. The PC version of
ruff targets testing and simulation.
Open your favorite project folder and run the following commands (excluding comments starting with
# Create a project folder
Fill in information as prompted. You can use default values for all fields.
? app name: hello-ruff
rap will initialize the project, download configuration for the development board.
srcfolder with any editor. You will see the sample code created during initialization:
These lines of code turn on the red onboard LED after the application starts (the ID of the LED is
# instructs to query via device ID) and turn it off when the application exits.
- First, connect the micro USB port on the Ruff development board with a USB power cable. The Ruff development board will now boot up into RuffOS.
- After development board boots up, it will setup a hotspot named as
[S/N]is a serial number of the board). Connect your computer to this hotspot. The hotspot does not provide no internet access.
It’s time to deploy your application. Run the following command:
rap deploy -s
If everything goes well, you should see the red onboard LED lit up after the application starts successfully.
Congratulations! Your first Ruff application is up and running!
Adding a device is an important step for IoT application. Visit here to continue your Ruff journey.