I have a wemos D1 and an 2 pin fan.
I would like to switch on or off the fan with the Wemos d1.
I have a BD139 transistor. (Is it a good component for that ?)
I don't understand anything in electronic.
Can someone explain me how to wire the whole stuff to make it work ?
@hammy, By the sounds of it, the fan is either 12VDC or 5VDC, or else @davidmarli would have said plug or something of the sort.
@davidmarli, give a description of your fan and that would give everyone something to work with in helping you.
If you want to be able to switch the fan on and off via your smartphone, you could try Blynk. That is my go to for smartphone controlled projects as I have an iPhone with only works with Blynk (I have yet to find a similar app).
Hello
Post your sketch, well formated, with comments and in so called code tags "</>" and schematic to see how we can help.
Have a nice day and enjoy coding in C++.
The fan is a 5v fan. I just want to use it to cool a dimmer.
To switch it on or off I already have the sketch (in visual studio code)
Yesterday I found a wiring diagram which is ok :
The BD139 has 3 pins : E C and B
I put a 1k resistor between B and D6 pin of wemos
C goes to GND of FAN and E to GND (or reciprocal, don't have my wiring in front of me).
Now when I put D6 high the fan turns, when it's LOW the fan stops.