The function is used to write an analog value between 0 - 255 a PWM pin. analogWrite() can only
be used for PWM pins. The new mapping data in the previous statement can be output to ledPin
to lighten/dim the LED.
Demo Effect and Serial Print Result:
The LED module will change its intensity according to the light intensity of the surrounding. The
darker the surrounding, the lighter it gets.
Breakout Guide
Use Grove Cable to connect the Grove LED to Seeeduino Lotus’s digital signal interface
D4,connect the Grove Light Sensor to Seeeduino Lotus’s analog signal interface A1.
34
Grove Beginner Kit For Arduino
®
Содержание Grove Beginner Kit
Страница 1: ...Grove Beginner Kit For Arduino User Manual ...
Страница 63: ...62 Grove Beginner Kit For Arduino ...