Category: Tutorials

widget-tutorial-slider-header

This tutorial explains how to use the Slider controller widget to add an actuator connected to your Arduino.

Let’s look at each dropdown field that will be used when adding your actuator.


widget-tutorial-slider-form

Name

Give your actuator a name.

Device

Select your Arduino device.

Connectivity

Select your method of connectivity; will the button widget be use the physical PWM pins on the Arduino? Or will it make use of the Cayenne virtual pins?

  • Digital

    The Arduino has a 6 pins that can be used as PWM outputs (e.g. Arduino Uno has D3, D5, D6, D9, D10 & D11

  • Virtual

    Virtual pins are channels to send and receive different data types from and to the Arduino (e.g. SPI, I2C, 1-Wire and devices connected to Arduino expansion boards). There are 26 virtual pins available for each Arduino board.

Data, Unit, Icon

Select the Data type, the Units, and the Icon to be used for the widget. For example, a temperature sensor could have a Data type of temperature, Units of Celsius, and a thermometer Icon.

You’re all done!

Now you can view the sketch file in your Arduino IDE and add your widget. Don’t worry, you can always edit these settings after your widget is added to the dashboard.

Not sure what to do with the sketch file? Check out this sketch file overview.


widget-tutorial-2state-header

This tutorial explains how to use the 2 State display widget to add a sensor connected to your Arduino.

Let’s look at each dropdown field that will be used when adding your sensor.


widget-tutorial-2state-form

Name

Give your sensor a name.

Device

Select your Arduino device.

Connectivity

Select your method of connectivity; is your sensor Analog, Digital, or Virtual? You’ll then select what pin the sensor will be connected to.

  • Analog

    If you’re trying to read data from an analog sensor, the Arduino has 6 analog inputs that can be used. Simply connect your analog sensor to one of the 6 analog pins on the Arduino. Make sure you select the correct corresponding pin when adding a widget for your analog sensor.

    *It’s worth noting that for most Arduino models, the analog pins may be configured, and used, in exactly the same manner as digital pins.

  • Digital

    A digital pin can be used to read data from a non-analog sensor, but the data will need to be written to a virtual channel. If you’re trying to read data from a non-analog sensor, you’ll most likely use a virtual pin.

  • Virtual

    Virtual pins are channels to send and receive different data types from and to the Arduino (e.g. SPI, I2C, 1-Wire and devices connected to Arduino expansion boards). There are 26 virtual pins available for each Arduino board.

Data, Unit, Icon

Select the Data type, the Units, and the Icon to be used for the widget. For example, a temperature sensor could have a Data type of temperature, Units of Celsius, and a thermometer Icon.

You’re all done!

Now you can view the sketch file in your Arduino IDE and add your widget. Don’t worry, you can always edit these settings after your widget is added to the dashboard.

Not sure what to do with the sketch file? Check out this sketch file overview.

widget-tutorial-gauge-header

This tutorial explains how to use the Gauge display widget to add a sensor connected to your Arduino.

Let’s look at each dropdown field that will be used when adding your sensor.


widget-tutorial-gauge-form

Name

Give your sensor a name.

Device

Select your Arduino device.

Connectivity

Select your method of connectivity; is your sensor Analog, Digital, or Virtual? You’ll then select what pin the sensor will be connected to.

  • Analog

    If you’re trying to read data from an analog sensor, the Arduino has 6 analog inputs that can be used. Simply connect your analog sensor to one of the 6 analog pins on the Arduino. Make sure you select the correct corresponding pin when adding a widget for your analog sensor.

    *It’s worth noting that for most Arduino models, the analog pins may be configured, and used, in exactly the same manner as digital pins.

  • Digital

    A digital pin can be used to read data from a non-analog sensor, but the data will need to be written to a virtual channel. If you’re trying to read data from a non-analog sensor, you’ll most likely use a virtual pin.

  • Virtual

    Virtual pins are channels to send and receive different data types from and to the Arduino (e.g. SPI, I2C, 1-Wire and devices connected to Arduino expansion boards). There are 26 virtual pins available for each Arduino board.

Data, Unit, Icon

Select the Data type, the Units, and the Icon to be used for the widget. For example, a temperature sensor could have a Data type of temperature, Units of Celsius, and a thermometer Icon.

Minimum and Maximum Values (optional)

Input the minimum and maximum values that you’d like the gauge widget to use when displaying the range of data for your sensor. This can help improve the visualization of your sensor data as it displays on the gauge widget.

You’re all done!

Now you can view the sketch file in your Arduino IDE and add your widget. Don’t worry, you can always edit these settings after your widget is added to the dashboard.

Not sure what to do with the sketch file? Check out this sketch file overview.