{"id":1849,"date":"2018-12-22T13:00:05","date_gmt":"2018-12-22T13:00:05","guid":{"rendered":"http:\/\/chewett.co.uk\/blog\/?p=1849"},"modified":"2018-12-23T23:29:04","modified_gmt":"2018-12-23T23:29:04","slug":"using-the-sw-420-motion-vibration-sensor-with-a-wemos-d1-mini-esp8266","status":"publish","type":"post","link":"https:\/\/chewett.co.uk\/blog\/1849\/using-the-sw-420-motion-vibration-sensor-with-a-wemos-d1-mini-esp8266\/","title":{"rendered":"Using the SW-420 Motion Vibration Sensor with a WeMos D1 Mini (ESP8266)"},"content":{"rendered":"\n<figure class=\"wp-block-image\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"678\" height=\"254\" data-attachment-id=\"1859\" data-permalink=\"https:\/\/chewett.co.uk\/blog\/1856\/using-the-sw-18010p-motion-vibration-sensor-with-a-wemos-d1-mini-esp8266\/wemos_sw420_vibration_sensor\/\" data-orig-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/12\/wemos_sw420_vibration_sensor.jpg?fit=800%2C300&amp;ssl=1\" data-orig-size=\"800,300\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"wemos_sw420_vibration_sensor\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/12\/wemos_sw420_vibration_sensor.jpg?fit=300%2C113&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/12\/wemos_sw420_vibration_sensor.jpg?fit=678%2C254&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/12\/wemos_sw420_vibration_sensor.jpg?resize=678%2C254\" alt=\"\" class=\"wp-image-1859\" srcset=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/12\/wemos_sw420_vibration_sensor.jpg?w=800&amp;ssl=1 800w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/12\/wemos_sw420_vibration_sensor.jpg?resize=300%2C113&amp;ssl=1 300w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/12\/wemos_sw420_vibration_sensor.jpg?resize=768%2C288&amp;ssl=1 768w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/12\/wemos_sw420_vibration_sensor.jpg?resize=50%2C19&amp;ssl=1 50w\" sizes=\"auto, (max-width: 678px) 100vw, 678px\" \/><\/figure>\n\n\n\n<p>In this blog post I talk about how you can use a SW-420 Motion Vibration sensor with a WeMos D1 Mini (ESP8266) using the Arduino IDE.<\/p>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\">Summary of the SW-420 Motion Vibration Sensor<\/h2>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"alignleft is-resized\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"787\" data-permalink=\"https:\/\/chewett.co.uk\/blog\/724\/sw-420-motion-vibration-sensor-review-code-examples\/sw420_vibration_sensor_post_image\/\" data-orig-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/10\/sw420_vibration_sensor_post_image.jpg?fit=800%2C800&amp;ssl=1\" data-orig-size=\"800,800\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"sw420_vibration_sensor_post_image\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/10\/sw420_vibration_sensor_post_image.jpg?fit=300%2C300&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/10\/sw420_vibration_sensor_post_image.jpg?fit=678%2C678&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/10\/sw420_vibration_sensor_post_image.jpg?resize=371%2C371\" alt=\"\" class=\"wp-image-787\" width=\"371\" height=\"371\" srcset=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/10\/sw420_vibration_sensor_post_image.jpg?w=800&amp;ssl=1 800w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/10\/sw420_vibration_sensor_post_image.jpg?resize=300%2C300&amp;ssl=1 300w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/10\/sw420_vibration_sensor_post_image.jpg?resize=768%2C768&amp;ssl=1 768w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/10\/sw420_vibration_sensor_post_image.jpg?resize=50%2C50&amp;ssl=1 50w\" sizes=\"auto, (max-width: 371px) 100vw, 371px\" \/><\/figure><\/div>\n\n\n\n<p>This sensor mounts a motion detection component with a small micro-controller and a potentiometer. This has a single output pin which is high when the motion level is reached.<\/p>\n\n\n\n<p>The potentiometer allows changing of the amount of motion required to trigger the digital out becoming high.<\/p>\n\n\n\n<p>The single input combined with the easy to change motion threshold makes this sensor simple to use and implement in projects.<\/p>\n\n\n\n<p>The VCC accepts between 3.3 and 5 volts which makes it ideal for use by the WeMos running at 3.3 volts.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Important differences compared with using the SW-420 Motion Vibration Sensor on an Arduino<\/h2>\n\n\n\n<p>There is one major difference to bear in mind when using the SW-420 Motion Vibration Sensor on a WeMos D1 Mini (ESP8266) or similar chipset.<\/p>\n\n\n\n<p>When using the Arduino IDE with the WeMos chips, the standard pin numbers do not refer to the pin numbers on the WeMos. For example, instead of using&nbsp;<code>1<\/code>&nbsp;to refer to digital pin&nbsp;<code>1<\/code>, you need to use the constant&nbsp;<code>D1<\/code>.<\/p>\n\n\n\n<p>I go into more details for this in my blog post&nbsp;<a href=\"https:\/\/chewett.co.uk\/blog\/1066\/pin-numbering-for-wemos-d1-mini-esp8266\/\">Pin numbering for WeMos D1 Mini (ESP8266)<\/a>. If you haven\u2019t read this and are having trouble connecting your SW-420 Motion Vibration sensor properly I recommend having a read.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Wiring it up to a WeMos D1 Mini<\/h2>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"alignleft is-resized\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1850\" data-permalink=\"https:\/\/chewett.co.uk\/blog\/1849\/using-the-sw-420-motion-vibration-sensor-with-a-wemos-d1-mini-esp8266\/wemos_d1_mini_sw420_vibration_sensor_bb\/\" data-orig-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/12\/wemos_d1_mini_sw420_vibration_sensor_bb.jpg?fit=455%2C984&amp;ssl=1\" data-orig-size=\"455,984\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"wemos_d1_mini_sw420_vibration_sensor_bb\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/12\/wemos_d1_mini_sw420_vibration_sensor_bb.jpg?fit=139%2C300&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/12\/wemos_d1_mini_sw420_vibration_sensor_bb.jpg?fit=455%2C984&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/12\/wemos_d1_mini_sw420_vibration_sensor_bb.jpg?resize=152%2C329\" alt=\"\" class=\"wp-image-1850\" width=\"152\" height=\"329\" srcset=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/12\/wemos_d1_mini_sw420_vibration_sensor_bb.jpg?w=455&amp;ssl=1 455w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/12\/wemos_d1_mini_sw420_vibration_sensor_bb.jpg?resize=139%2C300&amp;ssl=1 139w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/12\/wemos_d1_mini_sw420_vibration_sensor_bb.jpg?resize=23%2C50&amp;ssl=1 23w\" sizes=\"auto, (max-width: 152px) 100vw, 152px\" \/><\/figure><\/div>\n\n\n\n<p>Here I am connecting the SW-420 motion vibration sensor to a WeMos D1 mini.<\/p>\n\n\n\n<p>The pins on the SW-420 motion vibration sensor, from left to right, are Digital Out, GND, and VCC<\/p>\n\n\n\n<p>It is important to note that the WeMos\u2019s digital pins can only accept up to 3.3 volts maximum on their inputs. This means that the SW-420 motion vibration sensors VCC pin must be connected to the 3.3 volts and not the 5 volt line like when using the Arduino.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Programming the WeMos to use the SW-420 motion vibration sensor<\/h2>\n\n\n\n<p>The vibration sensor is triggered when the configured motion (set by the potentiometer) is exceeded. When this occurs the digital pin is set to HIGH representing motion being detected.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\n#define VIBRATION_SENSOR_PIN D2\n\nint motion_detected = LOW;\n\nvoid setup() {\n  Serial.begin(115200);\n}\n\nvoid loop() {\n  motion_detected = digitalRead(VIBRATION_SENSOR_PIN);\n  Serial.println(motion_detected);\n  delay(100);\n}\n<\/pre><\/div>\n\n\n<p>Since we only need to read the digital input all the setup does is configure the serial connection.<\/p>\n\n\n\n<p>In the loop we continually read the value of the vibration sensor and print it out. This piece of code can be used to configure the potentiometer so that the sensor triggers at the motion level required.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Summary<\/h2>\n\n\n\n<p>The SW-420 motion vibration sensor is a simple sensor that uses a single data pin to detect motion. In addition to this, the onboard potentiometer provides a simple way to adjust the level of motion needed to trigger the digital pin.<\/p>\n\n\n\n<p>No ESP8266 specific libraries are required as this only uses the single digital pin. However it is important to ensure you connect the VCC pin to the 3.3 volts line. This is because&nbsp;this is the maximum voltage accepted by the digital pins.<\/p>\n\n\n\n<p>For a full review of the SW-420 motion vibration sensor have&nbsp;<a href=\"https:\/\/chewett.co.uk\/blog\/724\/sw-420-motion-vibration-sensor-review-code-examples\/\">a read of my previous post<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this blog post I talk about how you can use a SW-420 Motion Vibration sensor with a WeMos D1 Mini (ESP8266) using the Arduino IDE.<\/p>\n","protected":false},"author":1,"featured_media":1868,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"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":"","jetpack_publicize_message":"Today I have written about using the the #SW-420 Motion Vibration #Sensor with a #WeMos D1 Mini (#ESP8266) and the #Arduino IDE","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[97],"tags":[132,211,210,151,209,237],"class_list":["post-1849","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-electronics","tag-arduino","tag-arduino-ide","tag-esp8266","tag-vibration-sensor","tag-wemos","tag-wemos-d1-mini"],"wppr_data":{"cwp_meta_box_check":"No"},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/12\/sw420_vibration_sensor_wemos.jpg?fit=800%2C800&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/p2toWX-tP","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":1856,"url":"https:\/\/chewett.co.uk\/blog\/1856\/using-the-sw-18010p-motion-vibration-sensor-with-a-wemos-d1-mini-esp8266\/","url_meta":{"origin":1849,"position":0},"title":"Using the SW-18010P Motion Vibration Sensor with a WeMos D1 Mini (ESP8266)","author":"Chewett","date":"February 2, 2019","format":false,"excerpt":"In this blog post I talk about how you can use a SW-18010P Motion Vibration sensor with a WeMos D1 Mini (ESP8266) using the Arduino IDE. Summary of the SW-18010P Motion Vibration sensor This motion sensor works by encasing a small spring inside a metal casing. Whenever the sensor moves\u2026","rel":"","context":"In &quot;Electronics&quot;","block_context":{"text":"Electronics","link":"https:\/\/chewett.co.uk\/blog\/category\/electronics\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/02\/sw18010p_vibration_sensor_wemos.jpg?fit=800%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/02\/sw18010p_vibration_sensor_wemos.jpg?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/02\/sw18010p_vibration_sensor_wemos.jpg?fit=800%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/02\/sw18010p_vibration_sensor_wemos.jpg?fit=800%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":1854,"url":"https:\/\/chewett.co.uk\/blog\/1854\/using-the-801s-wide-range-vibration-detection-sensor-with-a-wemos-d1-mini-esp8266\/","url_meta":{"origin":1849,"position":1},"title":"Using the 801S Wide Range Vibration Detection Sensor with a WeMos D1 Mini (ESP8266)","author":"Chewett","date":"March 9, 2019","format":false,"excerpt":"In this blog post I talk about how you can use a 801S Wide Range Vibration Detection sensor with a WeMos D1 Mini (ESP8266) using the Arduino IDE. Summary of the\u00a0801S Wide Range Vibration Detection sensor This vibration sensor works by the sensor changing resistance as motion is detected. This\u2026","rel":"","context":"In &quot;Electronics&quot;","block_context":{"text":"Electronics","link":"https:\/\/chewett.co.uk\/blog\/category\/electronics\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/03\/801s_vibration_sensor_wemos.jpg?fit=800%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/03\/801s_vibration_sensor_wemos.jpg?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/03\/801s_vibration_sensor_wemos.jpg?fit=800%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/03\/801s_vibration_sensor_wemos.jpg?fit=800%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":1405,"url":"https:\/\/chewett.co.uk\/blog\/1405\/using-the-dht11-temperature-sensor-with-a-wemos-d1-mini-esp8266\/","url_meta":{"origin":1849,"position":2},"title":"Using the DHT11 Temperature Sensor with a WeMos D1 Mini (ESP8266)","author":"Chewett","date":"August 18, 2018","format":false,"excerpt":"In this blog post I talk about the additional steps needed to use the DHT11 temperature sensor with a WeMos D1 Mini (ESP8266) with the Arduino IDE. Differences from running a DHT11 on an Arduino There are two major differences to bear in mind when using the DHT11 on a\u2026","rel":"","context":"In &quot;Electronics&quot;","block_context":{"text":"Electronics","link":"https:\/\/chewett.co.uk\/blog\/category\/electronics\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/08\/dht11_on_wemos_d1_mini.jpg?fit=800%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/08\/dht11_on_wemos_d1_mini.jpg?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/08\/dht11_on_wemos_d1_mini.jpg?fit=800%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/08\/dht11_on_wemos_d1_mini.jpg?fit=800%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":1412,"url":"https:\/\/chewett.co.uk\/blog\/1412\/using-the-ds18b20-temperature-sensor-with-a-wemos-d1-mini-esp8266\/","url_meta":{"origin":1849,"position":3},"title":"Using the DS18B20 Temperature Sensor with a WeMos D1 Mini (ESP8266)","author":"Chewett","date":"November 21, 2018","format":false,"excerpt":"In this blog post I talk about the additional steps needed to use the DS18B20 onewire temperature sensor with a WeMos D1 Mini (ESP8266) using the Arduino IDE. Important differences compared to using the DS18B20 on an Arduino There is one major difference to bear in mind when using the\u2026","rel":"","context":"In &quot;Electronics&quot;","block_context":{"text":"Electronics","link":"https:\/\/chewett.co.uk\/blog\/category\/electronics\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/11\/wd18b20_on_wemos_d1_mini.jpg?fit=800%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/11\/wd18b20_on_wemos_d1_mini.jpg?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/11\/wd18b20_on_wemos_d1_mini.jpg?fit=800%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/11\/wd18b20_on_wemos_d1_mini.jpg?fit=800%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":1476,"url":"https:\/\/chewett.co.uk\/blog\/1476\/using-the-dht22-temperature-sensor-with-a-wemos-d1-mini-esp8266\/","url_meta":{"origin":1849,"position":4},"title":"Using the DHT22 Temperature Sensor with a WeMos D1 Mini (ESP8266)","author":"Chewett","date":"September 22, 2018","format":false,"excerpt":"In this blog post I talk about the additional steps needed to use the DHT22 temperature sensor with a WeMos D1 Mini (ESP8266) with the Arduino IDE. Differences from running a DHT22 on an Arduino There are two major differences to bear in mind when using the DHT22 on a\u2026","rel":"","context":"In &quot;Electronics&quot;","block_context":{"text":"Electronics","link":"https:\/\/chewett.co.uk\/blog\/category\/electronics\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/09\/dht22_on_wemos_d1_mini.jpg?fit=800%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/09\/dht22_on_wemos_d1_mini.jpg?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/09\/dht22_on_wemos_d1_mini.jpg?fit=800%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/09\/dht22_on_wemos_d1_mini.jpg?fit=800%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":1879,"url":"https:\/\/chewett.co.uk\/blog\/1879\/using-the-ttp223b-capacitive-touch-sensor-with-a-wemos-d1-mini-esp8266\/","url_meta":{"origin":1849,"position":5},"title":"Using the TTP223B Capacitive Touch Sensor with a WeMos D1 Mini (ESP8266)","author":"Chewett","date":"January 5, 2019","format":false,"excerpt":"In this blog post I talk about how you can use the TTP223B Capacitive Touch sensor with a WeMos D1 Mini (ESP8266) using the Arduino IDE. Summary of the TTP223B Capacitive Touch Sensor The TTP223B capacitive touch sensor works as a standard button. The main difference being that it requires\u2026","rel":"","context":"In &quot;Electronics&quot;","block_context":{"text":"Electronics","link":"https:\/\/chewett.co.uk\/blog\/category\/electronics\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/01\/ttp223b_capacitive_sensor_wemos.jpg?fit=800%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/01\/ttp223b_capacitive_sensor_wemos.jpg?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/01\/ttp223b_capacitive_sensor_wemos.jpg?fit=800%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/01\/ttp223b_capacitive_sensor_wemos.jpg?fit=800%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts\/1849","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=1849"}],"version-history":[{"count":8,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts\/1849\/revisions"}],"predecessor-version":[{"id":1884,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts\/1849\/revisions\/1884"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/media\/1868"}],"wp:attachment":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=1849"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=1849"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=1849"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}