 |
 |
 |
 |
| Name |
|
QSlide
|
 |
|
|
| Examples |
|
#include <QSlide.h>
/* create a new QSlide instance
pin 2: data ready (drdy)
pin 3: data in (sdi)
pin 4: slave select (ss)
pin 5: clock (sclk)
pin 6: data out (sdo)
pin 7: detect (detect)
pin 8: proximity (prox)
*/
QSlide slider = QSlide(2, 3, 4, 5, 6, 7, 8);
void setup()
{
Serial.begin(9600); // begin serial communication at 9600bps
}
void loop()
{
if(slider.isTouching()) // if someone is touching the slider
{
int x = slider.read(); // read the slider as an integer
Serial.print(x); // print via serial port
}
}
|
|
|
| Description |
|
The QSlide library allows for manipulating QPROX QSlide sensors.
|
 |
|
|
| Syntax |
|
QSlide(drdy, sdi, ss, sclk, sdo, detect, prox)
|
 |
|
|
| Parameters |
|
| drdy
|
|
The pin connected to the QSlide sensor data ready signal
|
| sdi
|
|
The pin connected to the QSlide sensor data in signal
|
| ss
|
|
The pin connected to the QSlide sensor slave select signal
|
| sclk
|
|
The pin connected to the QSlide sensor clock signal
|
| sdo
|
|
The pin connected to the QSlide sensor data out signal
|
| detect
|
|
The pin connected to the QSlide sensor detect signal
|
| prox
|
|
The pin connected to the QSlide sensor proximity signal
|
|
 |
|
|
| Methods |
|
|
 |
|
|
| Returns |
|
None
|
 |
|
|
| Usage |
|
Application
|
 |
|
|
|