{"id":1856,"date":"2019-02-02T13:00:27","date_gmt":"2019-02-02T13:00:27","guid":{"rendered":"http:\/\/chewett.co.uk\/blog\/?p=1856"},"modified":"2019-02-02T11:14:29","modified_gmt":"2019-02-02T11:14:29","slug":"using-the-sw-18010p-motion-vibration-sensor-with-a-wemos-d1-mini-esp8266","status":"publish","type":"post","link":"https:\/\/chewett.co.uk\/blog\/1856\/using-the-sw-18010p-motion-vibration-sensor-with-a-wemos-d1-mini-esp8266\/","title":{"rendered":"Using the SW-18010P 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=\"1860\" data-permalink=\"https:\/\/chewett.co.uk\/blog\/1856\/using-the-sw-18010p-motion-vibration-sensor-with-a-wemos-d1-mini-esp8266\/wemos_sw18010p_motion_vibration_sensor\/\" data-orig-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/12\/wemos_sw18010p_motion_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_sw18010p_motion_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_sw18010p_motion_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_sw18010p_motion_vibration_sensor.jpg?fit=678%2C254&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/12\/wemos_sw18010p_motion_vibration_sensor.jpg?resize=678%2C254\" alt=\"\" class=\"wp-image-1860\" srcset=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/12\/wemos_sw18010p_motion_vibration_sensor.jpg?w=800&amp;ssl=1 800w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/12\/wemos_sw18010p_motion_vibration_sensor.jpg?resize=300%2C113&amp;ssl=1 300w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/12\/wemos_sw18010p_motion_vibration_sensor.jpg?resize=768%2C288&amp;ssl=1 768w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/12\/wemos_sw18010p_motion_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-18010P 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-18010P 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=\"823\" data-permalink=\"https:\/\/chewett.co.uk\/blog\/721\/sw-18010p-motion-vibration-sensor-review-code-examples\/vibration_sensor_post_image\/\" data-orig-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/10\/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=\"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\/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\/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\/vibration_sensor_post_image.jpg?resize=302%2C302\" alt=\"\" class=\"wp-image-823\" width=\"302\" height=\"302\" srcset=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/10\/vibration_sensor_post_image.jpg?w=800&amp;ssl=1 800w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/10\/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\/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\/vibration_sensor_post_image.jpg?resize=50%2C50&amp;ssl=1 50w\" sizes=\"auto, (max-width: 302px) 100vw, 302px\" \/><\/figure><\/div>\n\n\n\n<p>This motion sensor works by encasing a small spring inside a metal casing. Whenever the sensor moves the spring makes contact with the metal casing and changes resistance.<\/p>\n\n\n\n<p>This change in resistance is measured and output as a analogue signal in the sensor.<\/p>\n\n\n\n<p>In addition to the analogue output, the sensor can be configured to output a digital signal when a threshold value is reached.<\/p>\n\n\n\n<p>Since the circuit is relatively simple it will draw little power making it ideal for IoT projects running on batteries.<\/p>\n\n\n\n<p>The sensors pins, left to right are analogue out (AO), digital out (DO), ground (GND) and input voltage (VCC). The analogue&nbsp;out will give the raw data from the sensor module. <\/p>\n\n\n\n<p>When motion is detected above the threshold, digital out will be LOW. This level can be changed by changing the value of the onboard potentiometer.<\/p>\n\n\n\n<p>The analogue out pin gives a relative value for the level of vibration. This value is 0 when there is a lot of vibration and 1023 when no motion is detected.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"mce_4\">Important differences compared with using SW-18010P Motion Vibration sensor on an Arduino<\/h2>\n\n\n\n<p> If you are using the digital output you need to bear in mind that for the WeMos chips, the standard pin numbers do not refer to the pin numbers on the WeMos. For example, instead of using\u00a0<code>1<\/code>\u00a0to refer to digital pin\u00a0<code>1<\/code>, you need to use the constant\u00a0<code>D1<\/code>.<\/p>\n\n\n\n<p>I go into more details for this in my blog post\u00a0<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-18010P Motion Vibration sensor properly I recommend having a read.<\/p>\n\n\n\n<p>In addition to this, it is important to only wire the sensor&#8217;s VCC pin up to 3.3 volts. This is because the analogue and digital pins are only rated for 3.3 volts. Wiring it up to the 5 volt pin may damage the WeMos microcontroller.<\/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=\"1971\" data-permalink=\"https:\/\/chewett.co.uk\/blog\/1856\/using-the-sw-18010p-motion-vibration-sensor-with-a-wemos-d1-mini-esp8266\/vibration_sw18010p\/\" data-orig-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/01\/vibration_sw18010P.jpg?fit=732%2C810&amp;ssl=1\" data-orig-size=\"732,810\" 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=\"vibration_sw18010P\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/01\/vibration_sw18010P.jpg?fit=271%2C300&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/01\/vibration_sw18010P.jpg?fit=678%2C750&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/01\/vibration_sw18010P.jpg?resize=284%2C313\" alt=\"\" class=\"wp-image-1971\" width=\"284\" height=\"313\" srcset=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/01\/vibration_sw18010P.jpg?w=732&amp;ssl=1 732w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/01\/vibration_sw18010P.jpg?resize=271%2C300&amp;ssl=1 271w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/01\/vibration_sw18010P.jpg?resize=45%2C50&amp;ssl=1 45w\" sizes=\"auto, (max-width: 284px) 100vw, 284px\" \/><\/figure><\/div>\n\n\n\n<p>Here the leftmost pin, the analogue connection, is connected to the single analogue pin on the WeMos.<\/p>\n\n\n\n<p>The VCC pin is connected to the 3.3 volts on the WeMos, and GND to the ground pins.<\/p>\n\n\n\n<p>As noted above, it is important to ensure that the VCC pin is only connected to the 3.3 volt pin on the WeMos.<\/p>\n\n\n\n<p>This is because the analogue pin is only rated for 3.3 volts, connecting it to the 5 volt line may damage the WeMos.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Programming the WeMos to use the vibration sensor<\/h2>\n\n\n\n<p>I am going to use the analogue pin to record the level of vibration and print it on the serial line.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\n#define VIBRATION_ANALOGUE_PORT 0\nint motionSensorval = 0;\n\nvoid setup() {\n  Serial.begin(115200);\n}\n\nvoid loop() {\n  motionSensorval = analogRead(VIBRATION_ANALOGUE_PORT);\n  Serial.print(&quot;value: &quot;);\n  Serial.println(motionSensorval);\n  delay(10);\n}\n<\/pre><\/div>\n\n\n<p>Since the WeMos D1 mini only has one analogue pin we have to connect the sensor to analogue pin 0.<\/p>\n\n\n\n<p>Inside the loop method, the analogue pin is read and printed out to the serial connection. At the end of the loop we delay the code by 10 milliseconds before it will loop and read the next value.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Summary<\/h2>\n\n\n\n<p>The SW-18010P Motion Vibration sensor is a nice small sensor which can be configured to use either a digital or analogue pin. This is a very useful to use with the WeMos as there is only one analogue pin.<\/p>\n\n\n\n<p> No ESP8266 specific libraries are required as this only uses the single analogue or digital pin. However it is important to ensure you connect the VCC pin to the 3.3 volts line. This is because\u00a0this is the maximum voltage accepted by the analogue and digital pins.<\/p>\n\n\n\n<p>For a full review of the SW-18010P Motion Vibration sensor <a href=\"https:\/\/chewett.co.uk\/blog\/721\/sw-18010p-motion-vibration-sensor-review-code-examples\/\">have 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-18010P Motion Vibration sensor with a WeMos D1 Mini (ESP8266) using the Arduino IDE.<\/p>\n","protected":false},"author":1,"featured_media":1984,"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 #SW-18010P 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,131,151,209,237],"class_list":["post-1856","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-electronics","tag-arduino","tag-arduino-sensor","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\/2019\/02\/sw18010p_vibration_sensor_wemos.jpg?fit=800%2C800&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/p2toWX-tW","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":1849,"url":"https:\/\/chewett.co.uk\/blog\/1849\/using-the-sw-420-motion-vibration-sensor-with-a-wemos-d1-mini-esp8266\/","url_meta":{"origin":1856,"position":0},"title":"Using the SW-420 Motion Vibration Sensor with a WeMos D1 Mini (ESP8266)","author":"Chewett","date":"December 22, 2018","format":false,"excerpt":"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. Summary of the SW-420 Motion Vibration Sensor This sensor mounts a motion detection component with a small micro-controller and a potentiometer. This has 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\/12\/sw420_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\/2018\/12\/sw420_vibration_sensor_wemos.jpg?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/12\/sw420_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\/2018\/12\/sw420_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":1856,"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":1412,"url":"https:\/\/chewett.co.uk\/blog\/1412\/using-the-ds18b20-temperature-sensor-with-a-wemos-d1-mini-esp8266\/","url_meta":{"origin":1856,"position":2},"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":1405,"url":"https:\/\/chewett.co.uk\/blog\/1405\/using-the-dht11-temperature-sensor-with-a-wemos-d1-mini-esp8266\/","url_meta":{"origin":1856,"position":3},"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":1476,"url":"https:\/\/chewett.co.uk\/blog\/1476\/using-the-dht22-temperature-sensor-with-a-wemos-d1-mini-esp8266\/","url_meta":{"origin":1856,"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":1856,"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\/1856","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=1856"}],"version-history":[{"count":7,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts\/1856\/revisions"}],"predecessor-version":[{"id":1983,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts\/1856\/revisions\/1983"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/media\/1984"}],"wp:attachment":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=1856"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=1856"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=1856"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}