Referencia para la versión de Wiring 1.0 Build 0100+. Si tiene una versión previa, use la referencia incluida con su software. Si encuentra errores o tiene comentarios, no dude en contactarnos.
| Clase | Potentiometer |
|---|---|
| Nombre | getSector() |
| Ejemplos | #include <Potentiometer.h> #include <LED.h> LED ledBelow = LED(12); //object LED below at digital 12 LED ledAbove = LED(13); //object LED above at digital 13 Potentiometer potentiometer = Potentiometer(2); //a Potentiometer at analog in 2 void setup() { potentiometer.setSectors(2); //split the Potentiometer into two sectors } void loop() { if (potentiometer.getSector()==0) { ledBelow.on(); ledAbove.off(); } else { ledBelow.off(); ledAbove.on(); } } |
| Descripción | Obtiene el sector actual del potenciómetro. |
| Sintaxis | getSector() |
| Retorna | El valor del potenciómetro (0,sectores) |
| Uso | Application |

