• Home
  • pcDuino
  • WiKi
  • Store
  • Distributors
  • Home
  • pcDuino
  • WiKi
  • Store
  • Distributors
HomepcDuinoArduino-ish ProgramGPIOTutorial of Linker Module – Relay
Previous Next

Tutorial of Linker Module – Relay

Posted by: admin , February 19, 2014

[vc_row][vc_column][vc_column_text]There are two types of relay,one is electromagnetic Relay, and this is actually the one for Linker Replay. The other one is solid state Relay (Linker SSR is of this type).  The driving capability of these two types are different.

Linker Ralay[/vc_column_text][vc_tour][vc_tab title=”Parts List” tab_id=”1392710771-1-26″][vc_column_text]

  1. 1 x Linker Button Module
  2. 1 x Linker Relay Module
  3. 1 x Linker LED to simulate the device
  4. Several male to female jumper wires
  5. Several female to female jumper wires
  6. 1 x pcDuino v2

t图片2[/vc_column_text][/vc_tab][vc_tab title=”Wire Diagram” tab_id=”1392710771-2-65″][vc_column_text]wifi0s0-12560745381390116546151

  1. GND of Linker Button -> Pin GPIO 0 of pcDuino
  2. VCC of Linker Button -> Pin GPIO 1 of pcDuino
  3. SIG of Linker Button -> Pin GPIO 2 of pcDuino
  4. GND of Linker Relay -> Pin GND of pcDuino
  5. VCC of Linker Relay -> Pin 5V of pcDuino
  6. SIG of Linker Relay -> Pin GPIO 9 of pcDuino
  7. GND of Linker LED -> Pin GND of pcDuino
  8. SIG of Linker LED -> COM port of Linker Relay
  9. NO of Linker Relay -> PIn GPIO 13 of pcDuino

[/vc_column_text][/vc_tab][vc_tab title=”Run test” tab_id=”1392711006081-2-5″][vc_gallery type=”flexslider_fade” interval=”3″ images=”2965,2967″ onclick=”link_image” custom_links_target=”_self”][/vc_tab][vc_tab title=”Sample Code” tab_id=”1392711008723-3-9″][vc_column_text]

int S_pin=9;
int butten_pin=2;
void setup() {
// put your setup code here, to run once:
pinMode(S_pin,OUTPUT);
pinMode(butten_pin,INPUT);

pinMode(0,OUTPUT);
digitalWrite(0,LOW);//Use GPIO pin 0 foot as GND

pinMode(1,OUTPUT);
digitalWrite(1,HIGH);//Use GPIO  pin 1 foot as VCC

pinMode(13,OUTPUT);
digitalWrite(13,HIGH);//Use GPIO pin 13 foot as VCC

}

void loop() {
// put your main code here, to run repeatedly:
digitalWrite(S_pin,digitalRead(butten_pin));
}

//When press the button, hearing  the sound of the relay  stiring  up, led will light

[/vc_column_text][/vc_tab][/vc_tour][/vc_column][/vc_row]

Tags: GPIO

Share!
Tweet

admin

About the author

Leave a Reply Cancel reply

You must be logged in to post a comment.

Category

  • Home
  • pcDuino
  • WiKi
  • Store
  • Distributors