Hardware 21
Hardware
The program is a lot longer, but it gives nicely formatted data to the serial monitor.
And nally, this is what your musical instrument might look like (Lesson 3, Figure 6):
Lesson 3, Figure 6
Serial.print(readValue);//outputthereadvalue
Serial.print(“\t”);//putatabbetweenthevaluestomakeit
easiertoread
Serial.print(writtenValue);//outputthewrittenvalue
Serial.print(“\n”);//Writeanewline
analogWrite(3,writtenValue);//writetotheled
delay(100);//delayabit
}