The following program can be used control the brightness of LED using a potentiometer. The program reads analog input and changes the PWM value on the basis of it.

Dependencies:   mbed

Revision:
0:2a78fd35d2ed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sun Jul 15 22:03:16 2018 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/a7c7b631e539
\ No newline at end of file