Histograma com o sensor Infrared
Aspeto
Histograma de Luminosidade
// 123456789012345678901234567890123456789012345678901234567890 String barra = "************************************************************"; int q[11]; void setup() {
Serial.begin(9600); Serial.println("Histograma Luminosidades:"); for( int i=0; i<11; i++ ) q[i]; for( int i=0; i<50; i++ ) { q[analogRead(A1)/100]++; delay(50); } for( int i=0; i<11; i++ ) { Serial.print(i); Serial.print("\t"); int x; //x = sin(3.1416*i/10)*10+13; x = q[i]; Serial.println(barra.substring(1,x)); }
}
void loop() { }