Professional Documents
Culture Documents
M9-Microprocessadores: Joel Ferreira Nº4 Luís Santos Nº5
M9-Microprocessadores: Joel Ferreira Nº4 Luís Santos Nº5
#include <Grove_LED_Bar.h>
void setup()
{
Serial.begin(9600);
// nothing to initialize
bar.begin();
}
void loop()
{
sensorValue = analogRead(sensorPin);
leds = sensorValue/100;
Serial.println(leds);
bar.setLevel(leds);
delay(100);
/*
// Walk through the levels
for (int i = 0; i <= 10; i++)
{
bar.setLevel(i);
delay(100);
}
*/
}