#include <Plaquette.h>
AnalogIn potR(A0);
AnalogIn potG(A1);
AnalogIn potB(A2);
SineWave osc(2.0);
Alarm serialAlarm(0.2); //envoi les donnees seulement chaque 20 millisecondes
AnalogOut redLed(11);
AnalogOut greenLed(10);
AnalogOut blueLed(9);
void begin() {
// put your setup code here, to run once:
Serial.begin(9600); // baud = vitesse du transmission
}
void step() {
// put your main code here, to run repeatedly:
//osc >> redLed;
potR >> redLed;
potG >> greenLed;
potB >> blueLed;
//osc.amplitude(potR);
//osc.frequency(potG*3);
if (serialAlarm) {
Serial.println(potB);
//int potB_byte = potB*255;
//Serial.println(potB_byte); //actually write this
serialAlarm.start();
}
}