/*
ปรับความสว่าง LED ด้วยการหมุน dimmer (potentiometer)
เมื่อ potentiometer มีค่า 0 ให้ LED สว่าง 0
เมื่อ potentiometer มีค่า 4095 ให้ LED สว่าง 255
ระหว่างตรงกลาง ใช้บัญญัติไตรยางค์
Hint
- คูณก่อนแล้วค่อยหาร
- อย่าใช้ทศนิยม โจทย์ข้อนี้แก้ได้โดยไม่ต้องใช้ทศนิยม
*/
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
}
void loop() {
// put your main code here, to run repeatedly:
delay(10); // this speeds up the simulation
}