{"id":133753,"date":"2023-12-12T04:59:18","date_gmt":"2023-12-12T04:59:18","guid":{"rendered":"https:\/\/randomnerdtutorials.com\/?p=133753"},"modified":"2023-12-15T11:37:47","modified_gmt":"2023-12-15T11:37:47","slug":"micropython-rcwl-0516-esp32-esp8266","status":"publish","type":"post","link":"https:\/\/randomnerdtutorials.com\/micropython-rcwl-0516-esp32-esp8266\/","title":{"rendered":"MicroPython: RCWL-0516 Microwave Radar Sensor &#8211; Detect Motion with ESP32\/ESP8266"},"content":{"rendered":"\n<p>This guide shows how to use the RCWL-0516 Microwave Radar Proximity sensor with the ESP32 and ESP8266 using MicroPython to detect motion. You&#8217;ll learn how to wire the sensor to the boards and how to program them using MicroPython firmware. The RCWL-0516 is a great alternative to the popular PIR motion sensor.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" fetchpriority=\"high\" decoding=\"async\" width=\"1200\" height=\"675\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2023\/07\/RCWL-0516-ESP32-ESP8266-Micropython.jpg?resize=1200%2C675&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"MicroPython RCWL-0516 Microwave Radar Sensor Detect Motion with ESP32 and ESP8266 NodeMCU\" class=\"wp-image-133756\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2023\/07\/RCWL-0516-ESP32-ESP8266-Micropython.jpg?w=1280&amp;quality=100&amp;strip=all&amp;ssl=1 1280w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2023\/07\/RCWL-0516-ESP32-ESP8266-Micropython.jpg?resize=300%2C169&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2023\/07\/RCWL-0516-ESP32-ESP8266-Micropython.jpg?resize=1024%2C576&amp;quality=100&amp;strip=all&amp;ssl=1 1024w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2023\/07\/RCWL-0516-ESP32-ESP8266-Micropython.jpg?resize=768%2C432&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/figure><\/div>\n\n\n<p>We have similar tutorials using Arduino IDE:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/randomnerdtutorials.com\/esp32-rcwl-0516-arduino\/\">ESP32 with RCWL-0516 Microwave Radar Proximity Sensor (Arduino IDE)<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/randomnerdtutorials.com\/esp8266-nodemcu-rcwl-0516-arduino\/\">ESP8266 NodeMCU with RCWL-0516 Microwave Radar Proximity Sensor (Arduino IDE)<\/a><\/li>\n<\/ul>\n\n\n\n<p><strong>Table of Contents:<\/strong><\/p>\n\n\n\n<p>Throughout this tutorial, we\u2019ll cover the following contents:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"#RCWL-0516-Microwave-Radar-Intro\" title=\"\">Introducing the RCWL-0516 Microwave Radar Proximity Sensor<\/a><\/li>\n\n\n\n<li><a href=\"#RCWL-0516-Microwave-Radar-pinout\" title=\"\">RCWL-0516 Microwave Radar Proximity Sensor Pinout<\/a><\/li>\n\n\n\n<li><a href=\"#Microwave-Radar-Proximity-Sensor-vs-PIR-Motion-Sensor\" title=\"\">Microwave Radar Proximity Sensor vs PIR Motion Sensor<\/a><\/li>\n\n\n\n<li><a href=\"#rcwl-0516-ESP32-ESP8266-wiring\" title=\"\">Wiring the RCWL-0516 sensor to the ESP32\/ESP8266<\/a><\/li>\n\n\n\n<li><a href=\"#rcwl-0516-micropython-script\" title=\"\">RCWL-0516 with ESP32 and ESP8266 MicroPython Code<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<p>To follow this tutorial you need MicroPython firmware installed in your ESP32 or ESP8266 boards. You also need an IDE to write and upload the code to your board. We suggest using Thonny IDE or uPyCraft IDE:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Thonny IDE:\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/randomnerdtutorials.com\/getting-started-thonny-micropython-python-ide-esp32-esp8266\/\">Installing and getting started with Thonny IDE<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/randomnerdtutorials.com\/flashing-micropython-firmware-esptool-py-esp32-esp8266\/\">Flashing MicroPython Firmware with esptool.py<\/a><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>uPyCraft IDE:\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/randomnerdtutorials.com\/getting-started-micropython-esp32-esp8266\/\">Getting Started with uPyCraft IDE<\/a><\/li>\n\n\n\n<li>Install uPyCraft IDE (<a href=\"https:\/\/randomnerdtutorials.com\/install-upycraft-ide-windows-pc-instructions\/\">Windows<\/a>,&nbsp;<a href=\"https:\/\/randomnerdtutorials.com\/install-upycraft-ide-mac-os-x-instructions\/\">Mac OS X<\/a>,&nbsp;<a href=\"https:\/\/randomnerdtutorials.com\/install-upycraft-ide-linux-ubuntu-instructions\/\">Linux<\/a>)<\/li>\n\n\n\n<li><a href=\"https:\/\/randomnerdtutorials.com\/flash-upload-micropython-firmware-esp32-esp8266\/\">Flash\/Upload MicroPython Firmware to ESP32 and ESP8266<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p class=\"rntbox rntclblue\">Learn more about MicroPython:&nbsp;<a href=\"https:\/\/randomnerdtutorials.com\/micropython-programming-with-esp32-and-esp8266\/\">MicroPython Programming with ESP32 and ESP8266<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"RCWL-0516-Microwave-Radar-Intro\">Introducing the RCWL-0516 Microwave Radar Proximity Sensor<\/h2>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"750\" height=\"422\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2023\/07\/RCWL-0516-sensor.jpg?resize=750%2C422&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Introducing the RCWL-0516 Microwave Radar Proximity Sensor\" class=\"wp-image-133633\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2023\/07\/RCWL-0516-sensor.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2023\/07\/RCWL-0516-sensor.jpg?resize=300%2C169&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<p>The RCWL-0516 is a small, inexpensive sensor that uses microwave radar to detect the presence of moving objects. The sensor works by emitting a beam of microwaves and then detecting the Doppler shift in the reflected waves as objects move past.<\/p>\n\n\n\n<p>Usually, these sensors are sold as a pack of five and don&#8217;t come with header pins. So, you may need to get header pins separately and then solder them yourself.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"750\" height=\"422\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2023\/07\/RCWL-0516-sensors.jpg?resize=750%2C422&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"RCWL-0516 Microwave Radar Proximity Sensors\" class=\"wp-image-133634\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2023\/07\/RCWL-0516-sensors.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2023\/07\/RCWL-0516-sensors.jpg?resize=300%2C169&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<h3 class=\"wp-block-heading\">Where to Buy?<\/h3>\n\n\n\n<p>You can check the following link on Maker Advisor and compare the price in different stores.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/makeradvisor.com\/tools\/rcwl-0516-microwave-radar\/\" target=\"_blank\" rel=\"noopener\" title=\"\">RCWL-0516 Microwave Radar Proximity Sensor<\/a><\/li>\n<\/ul>\n\n\n<p>You can use the preceding links or go directly to <a href=\"https:\/\/makeradvisor.com\/tools\/?utm_source=rnt&utm_medium=post&utm_campaign=post\" target=\"_blank\">MakerAdvisor.com\/tools<\/a> to find all the parts for your projects at the best price!<\/p><p style=\"text-align:center;\"><a href=\"https:\/\/makeradvisor.com\/tools\/?utm_source=rnt&utm_medium=post&utm_campaign=post\" target=\"_blank\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/10\/header-200.png?w=1200&#038;quality=100&#038;strip=all&#038;ssl=1\"><\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How does it work?<\/h3>\n\n\n\n<p>The RCWL-0516 sensor has a built-in oscillator that generates a microwave signal at a frequency of 3.18 GHz. The sensor then sends out this signal in a 360-degree pattern.<\/p>\n\n\n\n<p>When an object moves within the sensor&#8217;s range, the reflected waves are picked up by the sensor&#8217;s receiver. The receiver then measures the frequency of the reflected waves and compares it to the frequency of the original signal. If the frequency of the reflected waves has changed, the sensor knows that an object has moved.<\/p>\n\n\n\n<p>The RCWL-0516 sensor has a single output pin that goes HIGH when it detects movement. It outputs LOW when no motion is detected.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">RCWL-0516 Sensor Features<\/h3>\n\n\n\n<p>The RCWL-0516 has a detection range of up to 7 meters and can detect objects moving at speeds of up to 2 meters per second. It also has a built-in adjustable delay time, which can be used to prevent the sensor from triggering repeatedly on the same object.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"422\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2023\/07\/RCWL-0516-sensor-breadboard.jpg?resize=750%2C422&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"RCWL-0516 Sensor Features\" class=\"wp-image-133632\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2023\/07\/RCWL-0516-sensor-breadboard.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2023\/07\/RCWL-0516-sensor-breadboard.jpg?resize=300%2C169&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<p>Note: even though it mentions a detection range of up to 7 meters, I couldn&#8217;t get those results with my setup. However, I got very good feedback from some of our readers about this sensor.<\/p>\n\n\n\n<p>Here&#8217;s a summary of some of the key features of the RCWL-0516 sensor:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Uses microwave radar to detect moving objects<\/li>\n\n\n\n<li>Detection range of up to 7 meters<\/li>\n\n\n\n<li>Can detect objects moving at speeds of up to 2 meters per second<\/li>\n\n\n\n<li>Built-in adjustable delay time<\/li>\n\n\n\n<li>Low power consumption<\/li>\n\n\n\n<li>Inexpensive<\/li>\n<\/ul>\n\n\n\n<p><strong>RCWL-0516 sensor specifications<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Supply voltage<\/strong>: 4\u201328 VDC<\/li>\n\n\n\n<li><strong>Operating frequency<\/strong>: 3.18 GHz<\/li>\n\n\n\n<li><strong>Sensing distance<\/strong>: 5\u20137 m<\/li>\n\n\n\n<li><strong>Output level<\/strong>: 3.4V High &lt;0.7 Low<\/li>\n\n\n\n<li><strong>Output drive<\/strong>: 100mA<\/li>\n\n\n\n<li><strong>Output timing<\/strong>: 2 second retrigger with motion<\/li>\n<\/ul>\n\n\n\n<p>You can get more information about the sensor on the following GitHub page:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/github.com\/jdesbonnet\/RCWL-0516\" target=\"_blank\" rel=\"noopener\" title=\"\">RCWL-0516 Github page<\/a><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Optional Light Depend Resistor (LDR) Sensor<\/h3>\n\n\n\n<p>The sensor comes with the option to solder a light-depend resistor (light sensor) if you want your sensor to operate just in dark conditions, for example. You can get the output of the LDR sensor on the LDR pin. Alternatively, you can also connect the LDR to the CDS pin.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"422\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2023\/07\/RCWL-0516-sensor-LDR-sensor.jpg?resize=750%2C422&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"RCWL-0516 Sensor and Optional LDR\" class=\"wp-image-133654\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2023\/07\/RCWL-0516-sensor-LDR-sensor.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2023\/07\/RCWL-0516-sensor-LDR-sensor.jpg?resize=300%2C169&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<p>When the output of the LDR is bigger than 0.7V, the OUT pin will output a HIGH signal when motion is detected. If motion is detected but the output of the LDR is smaller than 0.7V, the output will be LOW. This means that when attaching an LDR, the sensor will only sense motion when it&#8217;s dark.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"422\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2023\/07\/RCWL-0516-microwave-radar-with-LDR.jpg?resize=750%2C422&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"RCWL-0516 Microwave radar sensor with LDR\" class=\"wp-image-133690\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2023\/07\/RCWL-0516-microwave-radar-with-LDR.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2023\/07\/RCWL-0516-microwave-radar-with-LDR.jpg?resize=300%2C169&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<p>You can adjust the sensitivity of the LDR, by connecting a resistor on the R-CDS pads (see the following section), or by adding a pull-up resistor externally in parallel with the CDS pin.<\/p>\n\n\n\n<p>In my case, I added a pull-up 22KOhm resistor to the LDR pin so that it could detect motion when there is low light. Without the resistor, not even in very dark conditions I had a positive output. You might need to try with different resistance values to see which one works best for your scenario.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Adjustment components<\/h3>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"422\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2023\/07\/RCWL-0516-optional-components.jpg?resize=750%2C422&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"RCWL-0516 Microwave radar sensor back of the sensor\" class=\"wp-image-133655\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2023\/07\/RCWL-0516-optional-components.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2023\/07\/RCWL-0516-optional-components.jpg?resize=300%2C169&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<p>At the back of the sensor, there are three pads for additional SMD components (0805 dimensions):<\/p>\n\n\n\n<p>The following information was taken from this <a href=\"https:\/\/github.com\/jdesbonnet\/RCWL-0516\" target=\"_blank\" rel=\"noopener\" title=\"\">GitHub page<\/a>.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>C-TM<\/strong>: Regulate the repeat trigger time. The default (unpopulated) time is 2s. An SMD capacitor to extend the repeat trigger time. Pin 3 of the IC emits a frequency (f), and the trigger time in seconds is given by (1\/f) * 32678.<\/li>\n\n\n\n<li><strong>R-GN<\/strong>: The default detection range is 7m, adding a 1M resistor reduces it to 5m.<\/li>\n\n\n\n<li><strong>R-CDS<\/strong>: Resistor in parallel with the 1M pullup. Without R-CDS, the lowest resistance of the LDR (i.e. highest light level) where the output is enabled is ~269k\u03a9 (=0.7V). Adding resistance here decreases the LDR resistance of the enable\/disable threshold. If the LDR resistance at the desired light level threshold is &lt;269k then you could add an external resistor in series with the LDR.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"RCWL-0516-Microwave-Radar-pinout\">RCWL-0516 Microwave Radar Proximity Sensor Pinout<\/h2>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"422\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2023\/07\/RCWL-0516-sensor.jpg?resize=750%2C422&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"RCWL-0516 Microwave Radar Proximity Sensor Pinout\" class=\"wp-image-133633\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2023\/07\/RCWL-0516-sensor.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2023\/07\/RCWL-0516-sensor.jpg?resize=300%2C169&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<p><br>The RCWL-0516 microwave radar proximity sensor has five pins:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>3V3<\/strong>: this is the output from the voltage regulator (not the power pin)<\/li>\n\n\n\n<li><strong>VIN:<\/strong>&nbsp;this is the power input pin. The sensor can be powered by a voltage range of 4-28V.<\/li>\n\n\n\n<li><strong>GND:<\/strong>&nbsp;this is the ground pin.<\/li>\n\n\n\n<li><strong>OUT:<\/strong>&nbsp;this is the output pin. The output pin goes HIGH when the sensor detects movement and remains LOW when it doesn&#8217;t.<\/li>\n\n\n\n<li><strong>CDS:<\/strong>&nbsp;This pin is used to connect a light-dependent resistor (LDR). The LDR can be used to disable the sensor in bright light conditions.<\/li>\n<\/ul>\n\n\n\n<p>The following table shows the pinout of the RCWL-0516 microwave radar proximity sensor:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>3V3<\/strong><\/td><td>3.3V power output (not to power the sensor)<\/td><\/tr><tr><td><strong>GND<\/strong><\/td><td>ground pin<\/td><\/tr><tr><td><strong>OUT<\/strong><\/td><td>output pin (goes HIGH when motion is detected)<\/td><\/tr><tr><td><strong>VIN<\/strong><\/td><td>input voltage to power the sensor (4V to 28V)<\/td><\/tr><tr><td><strong>CDS<\/strong><\/td><td>Light-dependent resistor output<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Microwave-Radar-Proximity-Sensor-vs-PIR-Motion-Sensor\">Microwave Radar Proximity Sensor vs PIR Motion Sensor<\/h2>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"422\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2023\/07\/RCWL-0516-microwave-radar-vs-PIR-motion-sensor.jpg?resize=750%2C422&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Microwave Radar Proximity Sensor vs PIR Motion Sensor\" class=\"wp-image-133691\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2023\/07\/RCWL-0516-microwave-radar-vs-PIR-motion-sensor.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2023\/07\/RCWL-0516-microwave-radar-vs-PIR-motion-sensor.jpg?resize=300%2C169&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<p>The microwave radar proximity sensor is many times used as an alternative to the PIR motion sensor, depending on the project application. The following table compares both sensors:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><\/td><td>RCWL-0516 Microwave Radar<\/td><td>PIR Motion Sensor<\/td><\/tr><tr><td><strong>How it works?<\/strong><\/td><td>Active Sensor (emits microwave signals and detects reflections).<\/td><td>Passive Sensor (detects infrared radiation emitted by objects).<\/td><\/tr><tr><td><strong>Detection Range<\/strong><\/td><td>Longer range, typically up to 7+ meters.<\/td><td>Shorter range, typically a few meters, depending on the model.<\/td><\/tr><tr><td><strong>Sensing Through Obstacles<\/strong><\/td><td>Can sense through non-metallic materials.<\/td><td>Obstructed by certain materials (e.g., glass)<\/td><\/tr><tr><td><strong>Sensitivity to Motion<\/strong><\/td><td>Highly sensitive, may give false positives.<\/td><td>Not so sensitive, may miss subtle movements. Only detects living things that emit heat.<\/td><\/tr><tr><td><strong>Coverage Area<\/strong><\/td><td>Broad coverage with wide radar pattern.<\/td><td>Narrow field of view.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"rcwl-0516-ESP32-ESP8266-wiring\">Connecting the RCWL-0516 Microwave Radar Proximity Sensor to the ESP32 and ESP8266<\/h2>\n\n\n\n<p>Follow the next table or schematic diagram to wire the RCWL-0516 microwave radar proximity sensor to the ESP32\/ESP8266 (in this example, we won&#8217;t use the LDR):<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>RCWL-0516 Sensor<\/strong><\/td><td><strong>ESP32\/ESP8266<\/strong><\/td><\/tr><tr><td>3V3<\/td><td>don&#8217;t connect<\/td><\/tr><tr><td>GND<\/td><td><span class=\"rnthl rntcblack\">GND<\/span><\/td><\/tr><tr><td>OUT<\/td><td><span class=\"rnthl rntcblue\">GPIO12<\/span> (or any other GPIO of your choice)<\/td><\/tr><tr><td>VIN<\/td><td><span class=\"rnthl rntcred\">VIN<\/span> (or a voltage between 4 and 28V)<\/td><\/tr><tr><td>CDS<\/td><td>don&#8217;t connect<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">ESP32 with RCWL-0516 &#8211; Schematic Diagram<\/h3>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"840\" height=\"640\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2023\/07\/RCWL-0516-ESP32.png?resize=840%2C640&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"ESP32 with RCWL-0516 Wiring Schematic Diagram\" class=\"wp-image-133779\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2023\/07\/RCWL-0516-ESP32.png?w=840&amp;quality=100&amp;strip=all&amp;ssl=1 840w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2023\/07\/RCWL-0516-ESP32.png?resize=300%2C229&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2023\/07\/RCWL-0516-ESP32.png?resize=768%2C585&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 840px) 100vw, 840px\" \/><\/figure><\/div>\n\n\n<h3 class=\"wp-block-heading\">ESP8266 NodeMCU with RCWL-0516 &#8211; Schematic Diagram<\/h3>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"837\" height=\"572\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2023\/07\/RCWL-0516-ESP8266_bb.png?resize=837%2C572&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"ESP8266 NodeMCU with RCWL-0516 Wiring Schematic Diagram\" class=\"wp-image-133709\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2023\/07\/RCWL-0516-ESP8266_bb.png?w=837&amp;quality=100&amp;strip=all&amp;ssl=1 837w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2023\/07\/RCWL-0516-ESP8266_bb.png?resize=300%2C205&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2023\/07\/RCWL-0516-ESP8266_bb.png?resize=768%2C525&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 837px) 100vw, 837px\" \/><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"rcwl-0516-micropython-script\">MicroPython Script &#8211; RCWL-0516<\/h2>\n\n\n\n<p>Using the MicroPython IDE of your choice, copy the following code to the main.py file. This script reads the output of the sensor and lights up an LED and prints in the MicroPython Shell when motion is detected. The sensor outputs a HIGH signal when it detects motion and a LOW signal when idle.<\/p>\n\n\n<pre style=\"max-height: 40em; margin-bottom: 20px;\"><code class=\"language-python\"># Complete project details: https:\/\/RandomNerdTutorials.com\/micropython-rcwl-0516-esp32-esp8266\/\n\nfrom machine import Pin\nimport time\n\n# Pin numbers for LED and sensor\nled_pin = 2\nsensor_pin = 12\n\n# Set the LED pin as an output and the sensor pin as an input\nled = Pin(led_pin, Pin.OUT)\nsensor = Pin(sensor_pin, Pin.IN)\n\n# Initialize state variables\nstate = 0\nval = 0\n\nwhile True:\n    val = sensor.value()  # read sensor value\n\n    if val == 1:  # check if the sensor is HIGH\n        led.on()  # turn LED ON\n\n        if state == 0:\n            print(&quot;Motion detected!&quot;)\n            state = 1  # update variable state to HIGH\n    else:\n        led.off()  # turn LED OFF\n\n        if state == 1:\n            print(&quot;Motion stopped!&quot;)\n            state = 0  # update variable state to LOW\n\n    # Add a small delay to avoid constant checking of the sensor\n    time.sleep(0.1)\n<\/code><\/pre>\n\t<p style=\"text-align:center\"><a class=\"rntwhite\" href=\"https:\/\/github.com\/RuiSantosdotme\/Random-Nerd-Tutorials\/raw\/master\/Projects\/ESP-MicroPython\/esp_rcwl_0516_main.py\" target=\"_blank\">View raw code<\/a><\/p>\n\n\n\n<p>Alternatively, you may also use interrupts to detect the state of the sensor. You can use the same code we use in the following tutorial (just make sure you adjust the GPIOs accordingly): <a href=\"https:\/\/randomnerdtutorials.com\/micropython-interrupts-esp32-esp8266\/\">MicroPython: Interrupts with ESP32 and ESP8266<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How the code works<\/h2>\n\n\n\n<p>Start by importing the required modules: <span class=\"rnthl rntliteral\">machine<\/span> module is used to interact with hardware components, and we are importing <span class=\"rnthl rntliteral\">Pin<\/span> from it to control GPIO pins. The <span class=\"rnthl rntliteral\">time<\/span> module is used to introduce delays and control the timing of the program.<\/p>\n\n\n\n<pre class=\"wp-block-code language-python\"><code># Import required libraries\nfrom machine import Pin\nimport time<\/code><\/pre>\n\n\n\n<p>Next, define the pins for the LED and for the output pin of the sensor. To simplify we&#8217;re using the ESP32 and ESP8266 built-in LEDs that are connected to GPIO2 in both cases (it may change depending on the board model you&#8217;re using). Alternatively, you can connect a physical LED to any other GPIO, just change the code accordingly.<\/p>\n\n\n\n<pre class=\"wp-block-code language-python\"><code># Pin numbers for LED and sensor\nled_pin = 2\nsensor_pin = 12<\/code><\/pre>\n\n\n\n<p>Next, create two <span class=\"rnthl rntliteral\">Pin<\/span> objects, one to refer to the LED (<span class=\"rnthl rntliteral\">led<\/span>) and another to refer to the microwave radar sensor (<span class=\"rnthl rntliteral\">sensor<\/span>). The LED is defined as an output using <span class=\"rnthl rntliteral\">Pin.OUT<\/span> and the sensor as an input using <span class=\"rnthl rntliteral\">Pin.IN<\/span>.<\/p>\n\n\n\n<pre class=\"wp-block-code language-python\"><code># Set the LED pin as an output and the sensor pin as an input\nled = Pin(led_pin, Pin.OUT)\nsensor = Pin(sensor_pin, Pin.IN)<\/code><\/pre>\n\n\n\n<p>Then, create some variables to keep track of the state of the sensor. Basically, <span class=\"rnthl rntliteral\">val<\/span> is used to temporarily store the real-time output value of the sensor, while <span class=\"rnthl rntliteral\">state<\/span> is used to keep track of whether motion has been detected or not over time.<\/p>\n\n\n\n<pre class=\"wp-block-code language-python\"><code># Initialize state variables\nstate = 0\nval = 0<\/code><\/pre>\n\n\n\n<p>The program enters an infinite loop (<span class=\"rnthl rntliteral\">while True<\/span>), meaning it will run indefinitely, repeatedly checking for motion.<\/p>\n\n\n\n<pre class=\"wp-block-code language-python\"><code>while True:<\/code><\/pre>\n\n\n\n<p>We start by reading the value of the motion sensor using <span class=\"rnthl rntliteral\">sensor.value()<\/span>. The method returns <span class=\"rnthl rntliteral\">0<\/span> if no motion is detected and <span class=\"rnthl rntliteral\">1<\/span> if motion is detected. The result is stored in the <span class=\"rnthl rntliteral\">val<\/span> variable.<\/p>\n\n\n\n<pre class=\"wp-block-code language-python\"><code>val = sensor.value()  # read sensor value<\/code><\/pre>\n\n\n\n<p>If the sensor&#8217;s output is <span class=\"rnthl rntliteral\">1<\/span> (motion detected), we turn on the LED. <\/p>\n\n\n\n<pre class=\"wp-block-code language-python\"><code>if val == 1:  # check if the sensor is HIGH\n    led.on()  # turn LED ON<\/code><\/pre>\n\n\n\n<p><strong>Note<\/strong>: the ESP8266 built-in LED works with inverted logic, so you need to write <span class=\"rnthl rntliteral\">.off()<\/span> to turn it on and <span class=\"rnthl rntliteral\">.on()<\/span> to turn it off. If you&#8217;re using a regular LED connected to that GPIO, it works with the &#8220;regular&#8221; logic.<\/p>\n\n\n\n<p>Then, we check if the previous status was <span class=\"rnthl rntliteral\">0<\/span>. If so, it means the <span class=\"rnthl rntliteral\">state<\/span> has changed and that motion has been detected. We print a message in the shell and change the <span class=\"rnthl rntliteral\">state<\/span> variable to <span class=\"rnthl rntliteral\">1<\/span>.<\/p>\n\n\n\n<pre class=\"wp-block-code language-python\"><code>if state == 0:\n    print(\"Motion detected!\")\n    state = 1  # update variable state to HIGH<\/code><\/pre>\n\n\n\n<p>If the sensor&#8217;s output is <span class=\"rnthl rntliteral\">0<\/span> (no motion detected), we turn the LED off.<\/p>\n\n\n\n<pre class=\"wp-block-code language-python\"><code>else:\n    led.off()  # turn LED OFF<\/code><\/pre>\n\n\n\n<p>If the previous state was <span class=\"rnthl rntliteral\">1<\/span> and, if now the current value of the sensor is <span class=\"rnthl rntliteral\">0<\/span>,  it means motion has stopped, and we can set the state variable to <span class=\"rnthl rntliteral\">0<\/span>.<\/p>\n\n\n\n<pre class=\"wp-block-code language-python\"><code>if state == 1:\n    print(\"Motion stopped!\")\n    state = 0  # update variable state to LOW<\/code><\/pre>\n\n\n\n<p>The code will continue to loop indefinitely, repeatedly checking for motion and updating the LED status and the messages on the MicroPython shell accordingly.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Demonstration<\/h2>\n\n\n\n<p>Save the code to your board using <a href=\"https:\/\/randomnerdtutorials.com\/getting-started-thonny-micropython-python-ide-esp32-esp8266\/\" title=\"\">Thonny IDE<\/a> or any other <a href=\"https:\/\/randomnerdtutorials.com\/micropython-ides-esp32-esp8266\/\" title=\"\">MicroPython IDE<\/a> of your choice. We&#8217;re using Thonny IDE.<\/p>\n\n\n\n<p><strong>1)<\/strong> Copy the code provided to a new file on Thonny IDE.<\/p>\n\n\n\n<p><strong>2)<\/strong> Upload the code to your board. If you&#8217;re using Thonny IDE, go to <strong>File <\/strong>&gt; <strong>Save as&#8230;<\/strong> and then select <strong>MicroPython <\/strong>device.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"220\" height=\"202\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/01\/save-micropython-device-thonny-ide.png?resize=220%2C202&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Thonny IDE Save to MicroPython Device\" class=\"wp-image-109022\"\/><\/figure><\/div>\n\n\n<p><strong>3)<\/strong> Save your file as<em><strong> main.py<\/strong><\/em> so that it runs automatically when the ESP32\/ESP8266 starts\/resets. There should be a file called <span class=\"rnthl rntliteral\">boot.py<\/span>. That file is created by default when you burn MicroPython firmware.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"553\" height=\"409\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/01\/save-main-py-thonny-device.png?resize=553%2C409&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Save Script to MicroPython device ESP32 ESP8266\" class=\"wp-image-109023\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/01\/save-main-py-thonny-device.png?w=553&amp;quality=100&amp;strip=all&amp;ssl=1 553w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/01\/save-main-py-thonny-device.png?resize=300%2C222&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 553px) 100vw, 553px\" \/><\/figure><\/div>\n\n\n<p><strong>4)<\/strong>&nbsp;Finally, click&nbsp;<strong>Ok&nbsp;<\/strong>to proceed.<\/p>\n\n\n\n<p><strong>5)<\/strong>&nbsp;Now, press the on-board RST\/EN button so that the board restarts and starts running the code or press the green <strong>Run <\/strong>button on the IDE.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"422\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2023\/07\/ESP32-RCWL-0516.jpg?resize=750%2C422&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"ESP32 ESP8266 NodeMCU RCWL-0516 demonstration motion detection\" class=\"wp-image-133692\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2023\/07\/ESP32-RCWL-0516.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2023\/07\/ESP32-RCWL-0516.jpg?resize=300%2C169&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<p>Wave your hand in front of the motion sensor. You should get a &#8220;Motion detected!&#8221; message followed by a &#8220;Motion stopped!&#8221; message after two seconds. Additionally, the on-board LED will light up when motion is detected.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2023\/07\/testing-microwave-radar-sensor-rcwl-0516-micropython.png?quality=100&#038;strip=all&#038;ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"661\" height=\"255\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2023\/07\/testing-microwave-radar-sensor-rcwl-0516-micropython.png?resize=661%2C255&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Testing microwave radar sensor micropython\" class=\"wp-image-133784\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2023\/07\/testing-microwave-radar-sensor-rcwl-0516-micropython.png?w=661&amp;quality=100&amp;strip=all&amp;ssl=1 661w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2023\/07\/testing-microwave-radar-sensor-rcwl-0516-micropython.png?resize=300%2C116&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 661px) 100vw, 661px\" \/><\/a><\/figure><\/div>\n\n\n<p>If you have an LDR attached, you&#8217;ll need to decrease the luminosity to get positive results.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2023\/07\/RCWL-0516-sensor-triggered-ESP32.jpg?quality=100&#038;strip=all&#038;ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"422\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2023\/07\/RCWL-0516-sensor-triggered-ESP32.jpg?resize=750%2C422&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" class=\"wp-image-133693\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2023\/07\/RCWL-0516-sensor-triggered-ESP32.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2023\/07\/RCWL-0516-sensor-triggered-ESP32.jpg?resize=300%2C169&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/a><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\">Wrapping Up<\/h2>\n\n\n\n<p>In this tutorial, you learned how to use the RCWL-0516 microwave radar proximity sensor to detect motion in your surroundings with the ESP32 and ESP8266 programmed with MicroPython. The RCWL-0516 might be a good alternative to the PIR motion sensor depending on your project requirements.<\/p>\n\n\n\n<p>We hope you found this tutorial useful. If you want to try a PIR motion sensor instead, read this tutorial: <a href=\"#https:\/\/randomnerdtutorials.com\/micropython-interrupts-esp32-esp8266\/\" title=\"\">ESP32 and ESP8266 with PIR Motion Sensor using MicroPython<\/a>.<\/p>\n\n\n\n<p>We have tutorials for more than different 20 sensors and modules with the ESP32 and ESP8266. Check out the following link:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/randomnerdtutorials.com\/esp32-guides-sensors-modules\/\">ESP32: 25 Free Guides for Sensors and Modules<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/randomnerdtutorials.com\/esp8266-nodemcu-guides-sensors-modules\/\">ESP8266 NodeMCU: 20 Free Guides for Sensors and Modules<\/a><\/li>\n<\/ul>\n\n\n\n<p>Do you want to learn more about MicroPython with the ESP32 and ESP8266? Check out our Resources:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/randomnerdtutorials.com\/micropython-programming-with-esp32-and-esp8266\/\" title=\"\">MicroPython Programming with ESP32 and ESP8266 eBook<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/randomnerdtutorials.com\/projects-esp32-esp8266-micropython\/\" title=\"\">ESP32\/ESP8266 MicroPython Projects and Tutorials<\/a><\/li>\n<\/ul>\n\n\n\n<p>Thanks for reading.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This guide shows how to use the RCWL-0516 Microwave Radar Proximity sensor with the ESP32 and ESP8266 using MicroPython to detect motion. You&#8217;ll learn how to wire the sensor to &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"MicroPython: RCWL-0516 Microwave Radar Sensor &#8211; Detect Motion with ESP32\/ESP8266\" class=\"read-more button\" href=\"https:\/\/randomnerdtutorials.com\/micropython-rcwl-0516-esp32-esp8266\/#more-133753\" aria-label=\"Read more about MicroPython: RCWL-0516 Microwave Radar Sensor &#8211; Detect Motion with ESP32\/ESP8266\">CONTINUE READING \u00bb<\/a><\/p>\n","protected":false},"author":5,"featured_media":133756,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[310,309,264],"tags":[],"class_list":["post-133753","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-micropython","category-0-esp32-micropython","category-project"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2023\/07\/RCWL-0516-ESP32-ESP8266-Micropython.jpg?fit=1280%2C720&quality=100&strip=all&ssl=1","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts\/133753","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/comments?post=133753"}],"version-history":[{"count":15,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts\/133753\/revisions"}],"predecessor-version":[{"id":144462,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts\/133753\/revisions\/144462"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/media\/133756"}],"wp:attachment":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/media?parent=133753"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/categories?post=133753"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/tags?post=133753"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}