Slider Shield acts as Arduino Shield via 1Sheeld

Buy 1Sheeld
Slider Shield acts as Arduino Shield via 1Sheeld

Buy 1Sheeld

Use your smartphone touch screen as a slider. It’s always cool to control things using a slider like controlling light intensity or motors, so here comes the slider shield to help you control peripherals with your smartphone.

This shield is one of the I/O shields. I/O shields provides simple function of using your smartphone as input or output to Arduino.Learn more from the I/O shields tutorial.

Slider library converts & simulates your smartphone as a hardware potentiometer which will send certain values from 0-255 to Arduino .

Adding #define CUSTOM_SETTINGS along with #define INCLUDE_SLIDER_SHIELD is a key that will let you unlock the Slider shield only amongst all shields and prevent 1Sheeld library from eating your memory specially for UNO board.

byte getValue(void)

Get slider value adjusted by the 1Sheeld slider.

SYNTAX
Slider.getValue( );

RETURNS
Returns a byte holding the value of slider.

PARAMETERS
None.

USAGE
byte value = Slider.getValue();

 

void setValue(byte)

Sets slider value on 1Sheeld application.

SYNTAX
Slider.setValue(numberToBeUpdated);

RETURNS
None.

PARAMETERS
Takes a byte holding the value slider should be in the application.

USAGE
byte value = Slider.setValue(100);

 

void setOnValueChange(void(*userFunction)(byte))

Sets a certain individual function written by the user in the sketch to be called and runs its functionality once a slider position is changed giving a new value.

SYNTAX
Slider.setOnValueChange(&userFunctionName);

RETURNS
None.

PARAMETERS
&userFunctionName: takes the physical address of the userFunction in the memory and jump to it once called to execute it’s functionality.

USAGE
Slider.setOnValueChange(&myFunction);
/* myFunction exists under the loop function. */
/* This function will be invoked each time a slider position is changed. */
void myFunction (byte sliderValue)
{
  /*Fade an LED if something approaches. */
  analogWrite(pin11,sliderValue);
}