|
setBrightness()
|
||||
|
Description
Parameters v – is a number between 0 and 4 (where 0 is dim and 4 is bright) Returns none Example Blog // Light Read if (Sensor.available()) { int Light; Light = Sensor.read(); stroke(255); text(Light, 295, 230); } // Change screen brightness based on light if (Sensor.available()) { int Light; Light = Sensor.read(); if (Light < 500) { setBrightness(4); } else { if (Light > 500) { setBrightness(0); } } }
|
||||



