125Views4Replies

Author Options:

how to code on Arduino Uno to switch on/off 12v 2pin fan? Answered

i have connected red from fan to NO relay contact, red from 12v psu to C(common) contact.The black from the fan goes direct to black-12v of psu.

after connecting it how to code on arduino?

4 Replies

user
steveastroukBest Answer (author)2015-10-02

Define an IO pin as an output, send a true or false argument to the pin.

Select as Best AnswerUndo Best Answer

user
steveastrouk (author)2015-10-02

So you are a computer science student who can't program either?

Select as Best AnswerUndo Best Answer

user
iceng (author)2015-10-02

First you might consider going back to your previous questions and assigning the Best_Answer to whoever you believe answered you best.

Select as Best AnswerUndo Best Answer

user
Downunder35m (author)2015-10-02

I am a simple guy and would just use a switch, for more there are the Arduino pages with their code references.
If you fail to program a simple on-off command you should start with the basics and read up on some Arduino tutorials.

Select as Best AnswerUndo Best Answer