View Single Post
Old 05-26-2018, 11:27 AM   #3
davepl
Registered User
 
davepl's Avatar
 
Join Date: Aug 2006
Location: Redmond, WA
Posts: 6,332
Re: Any electronics nerds interested in Arduino/Atmel?

Cool! Maybe if I start with some real basics, I'll be able to follow along and others will benefit from my noob-level questioning!

Perhaps the most simple: control ON/OFF of a 12V relay. I understand I cannot drive the relay coil magnet directly, but this guy seems to do it. Is there support circuitry on the UNO that's being used, or how does he do it?

https://www.google.com/search?q=cont...TF-8#kpvalbx=1

Once I know how to do ON/OFF, I'll ask about power transistors. But let's start with ON/OFF!

int in1 = 7;
void setup() {
pinMode(in1, OUTPUT);
digitalWrite(in1, HIGH);
}
void loop() {
digitalWrite(in1, LOW);
delay(3000);
digitalWrite(in1, HIGH);
delay(3000);
}
__________________
1970 GMC Sierra Grande Custom Camper - Built, not Bought
1969 Pontiac 2+2 427/390 4-speed Coupe
1969 Pontiac 2+2 427/390 4-speed Convertible
davepl is offline   Reply With Quote