---
title: "W5100S-EVB-Pico with IR Sensor"
url: "https://maker.wiznet.io/matthew/projects/w5100s-evb-pico-with-ir-sensor/"
markdown_url: "https://maker.wiznet.io/matthew/projects/w5100s-evb-pico-with-ir-sensor/md"
type: "UCC: User Created Content"
author: "matthew"
author_url: "https://maker.wiznet.io/matthew/"
original_author: "Matthew"
published: "2023-03-21"
language: "en"
tags: ["Arduino"]
hardware: ["WIZnet W5100S-EVB-Pico"]
likes: 1
views: 254
comments: 1
source: "WIZnet Makers (https://maker.wiznet.io/)"
---

# W5100S-EVB-Pico with IR Sensor

> In this project, I will introduce how to control an IR sensor using the W5100S-EVB-Pico.

Original author: Matthew

## Components

- **WIZnet W5100S-EVB-Pico** x 1 ([docs](https://docs.wiznet.io/Product/Chip/Ethernet/W5100S/w5100s-evb-pico))
- Software: **Arduino IDE** ([docs](https://www.arduino.cc/en/software))

## Article

In this project, we will introduce how to control an IR sensor using the W5100S-EVB-Pico.

Supplies needed:

- W5100S-EVB-Pico

- IR Sensor Module

- Jumper wires

- An LED

- Resistor

The IR sensor module is an infrared sensor that detects and outputs human movement. You can use it to control the LEDs.

Below is the schematic for this project.

![](https://hackster.imgix.net/uploads/attachments/994017/uploads2ftmp2f4d7ccfd4-30b8-4393-8761-7d0fe2a131122fimg_20190920_034522_wfucGPm1rX.jpg?auto=compress%2Cformat&w=740&h=555&fit=max)

The IR sensor module is connected to pin D2 of the W5100S-EVB-Pico, and the LED is connected to pin D8.

Below is the source code for this project.

```cpp
void setup(){
	pinMode(2, INPUT);
	pinMode(8, OUTPUT);
	Serial.begin(9600);
}

void loop(){
	if(digitalRead(2) == HIGH){
		digitalWrite(8, HIGH);
		Serial.println("IR Sensor detected motion!");
		delay(1000);
	}
	else{
		digitalWrite(8, LOW);
	}
}
```

The above code does not use the Ethernet module, but directly processes the output signal of the IR sensor module to control the LED. When the output signal of the IR Sensor module is HIGH, it turns on the LED and outputs the message "IR Sensor detected motion!" to the Serial monitor. If the output signal is LOW, the LED is turned off.

Through this project, you can learn how to control an IR sensor using the W5100S-EVB-Pico.

---

Source: https://maker.wiznet.io/matthew/projects/w5100s-evb-pico-with-ir-sensor/
