Open raashidmuhammed opened 7 months ago
However, to control the brightness of LEDs by switching that voltage on and off, and controlling the LEDs. This technique is called Pulse-Width Modulation (PWM).
Instead of buttons, try to read commands from serial port. "increase\n" command should increase the duty cycle by 100. "decrease\n" command should decrease the duty cycle by 100. Test by giving commands via minicom.
PWM Test using LED in microbit is completed
Light glowing in low
Light glowing in High
Block code for PWM
Video For PWM Test
https://github.com/feostech/vehicle-alcohol-detection/assets/153628643/b4251802-4054-4382-aa42-a3178d4fbfa1