Controlling fan speed

Can we use the code we already used to control the brightness of the light for controlling fan speed.?

Offcource, yes. You can use.

Hello ,

I am trying to control the speed of motor using the PWM concept ( LED brightness code ) !

Unfortunately :disappointed: , I am not getting the desired output ! Please look into the following and help me to resolve the issue ! The solution will be of great importance to all the users as the speed control of DC motor is implemented in most of the projects ! Hence, help in this regard will be of utmost importance.
! :slight_smile:



>  <!doctype html> 
> <html>
> <head> <title>Himanshu</title> </head> <body> 
> <center>
> <h4> Generation and Utilisation of Electrical Energy </h4>
> <h5> EEE-306 </h5>
> <a href='/analogWrite?pin=4&value=0'><button>MOTOR at PWM value 0 </button>
> <br><br>    <a href='/analogWrite?pin=4&value=10'><button>MOTOR at PWM value 10 </button>
> <br><br>  <a href='/analogWrite?pin=4&value=100'><button>MOTOR at PWM value 100</button>
> <br><br>  <a href='/analogWrite?pin=4&value=200'><button>MOTOR at PWM value 200</button> 
> </center> 
> </body> 
> </html>

I am extremely sorry for posting the image of the connections via a circuit diagram ! I believe that circuit diagram will be more easy to understand rather than posting the image of the hardware setup!

Hoping for the reply at the earliest !:relaxed: