user48430: I try to use this relay with a Arduino Mega. I connected with jumper cables

5V pin to DC+, 
GND to DC- and
Digital Pin 13 (because its a lucky number) to IN.

The power LED from the relay is lighting green. 
I run this code, which should trigger the relay every 3s for 3s: 
int pinOut = 13;

void setup() {
  pinMode(10, OUTPUT);
}

void loop() {             
  digitalWrite(pinOut, LOW);
  delay(3000);

  digitalWrite(pinOut, HIGH);
  delay(3000);            
}

When initializing the sketch, the red light (from the relay) is flashing and the relay is clicking. But afterwards nothing happens. 
With my multimeter I check the currents: 

5V to GND = ~5V
Pin13 to GND, when not connected to relay = ~4.7V
Pin13 to GND, when connected to relay = ~1.2V

The relay needs 5V and 5mA triggering current. I don't think the Arduino is not suited, since they promote the relay Arduino. 
Any ideas? Do I need some kind of resistor? Or is the USB port from the laptop not sufficient? I used two different Arduino Mega's with two different relays. By the way i don't have a big background in electric. 

user2881: You are using pin 13, but you set pin 10 as an OUTPUT.
pinMode(10, OUTPUT);
Try changing that to 
pinMode(pinOut, OUTPUT);
PS by not setting pin 13 to OUTPUT, digitalWrite(pinOut, HIGH); enables the internal pull-up, instead of "connecting" it to 5V. The internal resistors are around 35kOhm. So pulling a bit of current through them will result in a lower voltage at the pin.

48430: <p>I try to use <a href="https://www.banggood.com/2Pcs-5V-1-Channel-Level-Trigger-Optocoupler-Relay-Module-For-Arduino-p-1366337.html?cur_warehouse=CN" rel="nofollow noreferrer">this relay</a> with a Arduino Mega. I connected with jumper cables</p>

<ul>
<li>5V pin to DC+, </li>
<li>GND to DC- and</li>
<li>Digital Pin 13 (because its a lucky number) to IN.</li>
</ul>

<p>The power LED from the relay is lighting green. </p>

<p>I run this code, which should trigger the relay every 3s for 3s: </p>

<pre><code>int pinOut = 13;

void setup() {
  pinMode(10, OUTPUT);
}

void loop() {             
  digitalWrite(pinOut, LOW);
  delay(3000);

  digitalWrite(pinOut, HIGH);
  delay(3000);            
}
</code></pre>

<p>When initializing the sketch, the red light (from the relay) is flashing and the relay is clicking. But afterwards nothing happens. </p>

<p>With my multimeter I check the currents: </p>

<ul>
<li>5V to GND = ~5V</li>
<li>Pin13 to GND, when not connected to relay = ~4.7V</li>
<li>Pin13 to GND, when connected to relay = ~1.2V</li>
</ul>

<p>The relay needs 5V and 5mA triggering current. I don't think the Arduino is not suited, since they promote the relay Arduino. </p>

<p>Any ideas? Do I need some kind of resistor? Or is the USB port from the laptop not sufficient? I used two different Arduino Mega's with two different relays. By the way i don't have a big background in electric. </p>
 2881: <p>You are using pin 13, but you set pin 10 as an OUTPUT.</p>

<p><code>pinMode(10, OUTPUT);</code></p>

<p>Try changing that to </p>

<p><code>pinMode(pinOut, OUTPUT);</code></p>

<p>PS by not setting pin 13 to OUTPUT, <code>digitalWrite(pinOut, HIGH);</code> enables the internal pull-up, instead of "connecting" it to 5V. The internal resistors are around 35kOhm. So pulling a bit of current through them will result in a lower voltage at the pin.</p>
