{"id":1601,"date":"2020-06-13T13:00:00","date_gmt":"2020-06-13T12:00:00","guid":{"rendered":"http:\/\/chewett.co.uk\/blog\/?p=1601"},"modified":"2020-06-13T12:14:55","modified_gmt":"2020-06-13T11:14:55","slug":"gy-521-mpu6050-3-axis-accelerometer-gyroscope-module-review-and-code","status":"publish","type":"post","link":"https:\/\/chewett.co.uk\/blog\/1601\/gy-521-mpu6050-3-axis-accelerometer-gyroscope-module-review-and-code\/","title":{"rendered":"GY-521 MPU6050 3 Axis Accelerometer Gyroscope Module Review and Code"},"content":{"rendered":"\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"678\" height=\"254\" data-attachment-id=\"1611\" data-permalink=\"https:\/\/chewett.co.uk\/blog\/1601\/gy-521-mpu6050-3-axis-accelerometer-gyroscope-module-review-and-code\/gy_521_mpu6050_acceleratometer\/\" data-orig-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/gy_521_mpu6050_acceleratometer.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=\"gy_521_mpu6050_acceleratometer\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/gy_521_mpu6050_acceleratometer.jpg?fit=300%2C113&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/gy_521_mpu6050_acceleratometer.jpg?fit=678%2C254&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/gy_521_mpu6050_acceleratometer.jpg?resize=678%2C254\" alt=\"\" class=\"wp-image-1611\" srcset=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/gy_521_mpu6050_acceleratometer.jpg?w=800&amp;ssl=1 800w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/gy_521_mpu6050_acceleratometer.jpg?resize=300%2C113&amp;ssl=1 300w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/gy_521_mpu6050_acceleratometer.jpg?resize=768%2C288&amp;ssl=1 768w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/gy_521_mpu6050_acceleratometer.jpg?resize=50%2C19&amp;ssl=1 50w\" sizes=\"auto, (max-width: 678px) 100vw, 678px\" \/><\/figure><\/div>\n\n\n\n<p>This post talks about using the GY-521 MPU6050 3 Axis Accelerometer Gyroscope with an Arduino.<\/p>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\">GY-521 MPU6050 3 Axis Accelerometer Gyroscope<\/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=\"1610\" data-permalink=\"https:\/\/chewett.co.uk\/blog\/1601\/gy-521-mpu6050-3-axis-accelerometer-gyroscope-module-review-and-code\/gy521_mpu6050_accelerometer_main_image\/\" data-orig-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/gy521_mpu6050_accelerometer_main_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=\"gy521_mpu6050_accelerometer_main_image\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/gy521_mpu6050_accelerometer_main_image.jpg?fit=300%2C300&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/gy521_mpu6050_accelerometer_main_image.jpg?fit=678%2C678&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/gy521_mpu6050_accelerometer_main_image.jpg?resize=402%2C402\" alt=\"\" class=\"wp-image-1610\" width=\"402\" height=\"402\" srcset=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/gy521_mpu6050_accelerometer_main_image.jpg?w=800&amp;ssl=1 800w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/gy521_mpu6050_accelerometer_main_image.jpg?resize=300%2C300&amp;ssl=1 300w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/gy521_mpu6050_accelerometer_main_image.jpg?resize=768%2C768&amp;ssl=1 768w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/gy521_mpu6050_accelerometer_main_image.jpg?resize=50%2C50&amp;ssl=1 50w\" sizes=\"auto, (max-width: 402px) 100vw, 402px\" \/><\/figure><\/div>\n\n\n\n<p>The GY-521 MPU6050 3 Axis Accelerometer Gyroscope is a relatively complex module.<\/p>\n\n\n\n<p>The gyroscope allows you to tell both the angle it is positioned in all three axis directions and the movement in each of those directions. In addition this is able to report the temperature of the die so it can be used to monitor the rough temperature.<\/p>\n\n\n\n<p>Opposite to the pins there are two mounting holes which allow you to attach it to something to be held in place.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Wiring it up to an Arduino<\/h2>\n\n\n\n<p>This sensor have 8 pins but you will typically only need to use 4 of them to connect to your Arduino.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>Pin on Sensor<\/td><td>Pin on Arduino<\/td><td>Comments<\/td><\/tr><tr><td>VCC<\/td><td>5V<\/td><td><\/td><\/tr><tr><td>GND<\/td><td>GND<\/td><td><\/td><\/tr><tr><td>SCL<\/td><td>A5 or SCL<\/td><td>For most Arduino&#8217;s the SCL pin will be A5. However you may need to confirm this.<\/td><\/tr><tr><td>SDA<\/td><td>A4 or SDA<\/td><td>For most Arduino&#8217;s the SDA pin will be A4. However you may need to confirm this.<\/td><\/tr><tr><td>XDA<\/td><td>Not connected<\/td><td>Auxiliary Serial Data (Which can be used to connect another device to the MPU6050)<\/td><\/tr><tr><td>XCL<\/td><td>Not connected<\/td><td>Auxiliary Serial Clock (Which can be used to connect another device to the MPU6050)<\/td><\/tr><tr><td>AD0<\/td><td>Not connected \/ GND \/ HIGH<\/td><td>This pin allows modifying of the I2C address which will allow you to use up to two of these on the same I2C bus.<br>If it is wired to &#8220;Logic Low&#8221; then the address of the device will be 1101000<br>If it is wired to &#8220;Logic High&#8221; then the address of the device will be 1101001<\/td><\/tr><tr><td>INT<\/td><td>Not connected<\/td><td>This pin does not need to be connected.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>To use it with an Arduino I am wiring up VCC, GND, SCL and SDA.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Programming the Arduino with the GY-521 MPU6050 3 Axis Accelerometer Gyroscope<\/h2>\n\n\n\n<p>To talk to the GY-521 MPU6050 3 Axis Accelerometer Gyroscope I am going to use the MPU6050 Light Arduino Library. This will mean that I do not need to write the specific I2C pulses to talk to the sensor.<\/p>\n\n\n\n<p>You can add this to the Arduino IDE by importing the &#8220;MPU6050_light&#8221; by rfetick which can be done using &#8220;manage library&#8221; section or by downloading it from <a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/rfetick\/MPU6050_light\" target=\"_blank\">Github<\/a>.<\/p>\n\n\n\n<p>This exposes some useful functions such as getTemp() and getAngleX\/Y\/Z() which allows you to easily access the data. Below is some example code to use the gyroscope.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\n#include &quot;Wire.h&quot;\n#include &lt;MPU6050_light.h&gt;\nMPU6050 mpu(Wire);\n\nvoid setup() {\n  Serial.begin(115200);\n  Wire.begin();\n  mpu.begin();\n  mpu.calcGyroOffsets();\n}\n\nvoid loop() {\n  mpu.update();\n  float tmp = mpu.getTemp();\n  float angle&#x5B;3] = {mpu.getAngleX(),mpu.getAngleY(),mpu.getAngleZ()};\n  float gyro&#x5B;3] = {mpu.getGyroX(), mpu.getGyroY(), mpu.getGyroZ()};\n  float accel&#x5B;3] = {mpu.getAccX(), mpu.getAccY(), mpu.getAccZ()};\n\n  Serial.print(&quot;Device Temperature: &quot;);Serial.print(tmp);Serial.println(&quot; Celsius&quot;);\n  Serial.print(&quot;Angles (degrees): x=&quot;);Serial.print(angle&#x5B;0]);\n  Serial.print(&quot;, y=&quot;);Serial.print(angle&#x5B;1]);\n  Serial.print(&quot;, z=&quot;);Serial.println(angle&#x5B;2]);\n\n  Serial.print(&quot;Gyro (degrees\/s): x=&quot;);Serial.print(gyro&#x5B;0]);\n  Serial.print(&quot;, y=&quot;);Serial.print(gyro&#x5B;1]);\n  Serial.print(&quot;, z=&quot;);Serial.println(gyro&#x5B;2]);\n\n  Serial.print(&quot;Acceleration (g aka 9.81m\/s^2): x=&quot;);Serial.print(accel&#x5B;0]);\n  Serial.print(&quot;, y=&quot;);Serial.print(accel&#x5B;1]);\n  Serial.print(&quot;, z=&quot;);Serial.println(accel&#x5B;2]);\n  Serial.println(&quot;&quot;);\n  \n  delay(100);\n  \n}\n<\/pre><\/div>\n\n\n<p>First I import the two libraries needed (Wire and MPU6050_light) so that they can be accessed and used. Once done I then set up an instance of the MPU6050 object with the Wire object.<\/p>\n\n\n\n<p>In the setup function the serial connection is set up so we can output the data. Then the wire and MPU6050 is initialised and the gyroscope offsets are calculated. This sets up the MPU6050 object so that it is ready to receive data from the chip.<\/p>\n\n\n\n<p>In the loop function we call the update function which polls the device for data and then call a variety of data functions to get the angles, gyroscope angle data, and accelerometer data. The functions available from this library are as follows.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>FUNCTION<\/th><th>DESCRIPTION<\/th><th>UNIT<\/th><\/tr><\/thead><tbody><tr><td>getAccX-Y-Z()<\/td><td>Acceleration on X, Y or Z<\/td><td>g (=9.81m\/s\u00b2)<\/td><\/tr><tr><td>getGyroX-Y-Z()<\/td><td>Angular speed en X, Y or Z<\/td><td>deg\/s<\/td><\/tr><tr><td>getAccAngleX-Y()<\/td><td>Angles computed from accelero data. Warning: noisy<\/td><td>deg<\/td><\/tr><tr><td>getAngleX-Y-Z()<\/td><td>Angles computed with complementary filter<\/td><td>deg<\/td><\/tr><tr><td>getTemp()<\/td><td>Device temperature<\/td><td>\u00b0C<\/td><\/tr><\/tbody><\/table><figcaption>Data taken from <a href=\"https:\/\/github.com\/rfetick\/MPU6050_light\" target=\"_blank\" rel=\"noreferrer noopener\">Github<\/a><\/figcaption><\/figure>\n\n\n\n<p>When I run the program it will print out the following information:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nDevice Temperature: 30.01 Celsius\nAngles (degrees): x=1.13, y=5.86, z=0.12\nGyro (degrees\/s): x=0.09, y=0.29, z=0.17\nAcceleration (g aka 9.81m\/s^2): x=-0.09, y=0.02, z=1.02\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">Final Review<\/h2>\n\n\n\n<p>This sensor combined with the MPU6050 light library is an easy to use gyroscope and accelerometer. You are able to easily get information about how fast the sensor is moving (acceleration) and also the angles at which it is being held which gives it a wide range of uses.<\/p>\n\n\n\n<p>In addition reporting the temperature of the chip can be used to see roughly the temperature around the chip.<\/p>\n\n\n\n<p>This is a relatively easy to use chip and for any project where I need to know the movement speed or direction I would consider using it.<\/p>\n\n\n\n<p><strong>Would buy again!<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This post talks about using the GY-521 MPU6050 3 Axis Accelerometer Gyroscope with an Arduino.<\/p>\n","protected":false},"author":1,"featured_media":1609,"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 the GY-521 MPU6050 3 Axis Accelerometer Gyroscope Module for #Arduino providing example #code","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":[305,131,306,152],"class_list":["post-1601","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-electronics","tag-accelerometer","tag-arduino-sensor","tag-gyroscope","tag-sensor"],"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\/10\/gy521_mpu6050_accelerometer_post_image.jpg?fit=800%2C800&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/p2toWX-pP","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":714,"url":"https:\/\/chewett.co.uk\/blog\/714\/magnetic-reed-switch-sensor-module-review-and-code-examples\/","url_meta":{"origin":1601,"position":0},"title":"Magnetic Reed Switch Sensor Module Review and code examples","author":"Chewett","date":"September 8, 2018","format":false,"excerpt":"This post reviews a\u00a0magnetic reed switch sensor module. There are many of these available on the internet and all\u00a0work similarly using a basic reed switch. Here I review and test the sensor and provide code to use it. Overview of the Magnetic Reed Switch sensor The magnetic reed switch Arduino\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\/2017\/10\/magnetic_reed_switch_sensor_post_icon.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\/2017\/10\/magnetic_reed_switch_sensor_post_icon.jpg?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/10\/magnetic_reed_switch_sensor_post_icon.jpg?fit=800%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/10\/magnetic_reed_switch_sensor_post_icon.jpg?fit=800%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":389,"url":"https:\/\/chewett.co.uk\/blog\/389\/light-intensity-sensor-module-5528-photo-resistor-arduino-review-code\/","url_meta":{"origin":1601,"position":1},"title":"Light Intensity Sensor Module 5528 Photo Resistor Arduino review and code","author":"Chewett","date":"June 10, 2017","format":false,"excerpt":"This post is a review of the \"Light Intensity Sensor Module 5528 Photo Resistor\" and includes code and images to use the sensor. There are a couple variants of this light sensor sold by different companies but all have similar components and designs.\u00a0This model is sold by\u00a0HiLetgo CN and is\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\/2017\/06\/light_sensor_1-1.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":1393,"url":"https:\/\/chewett.co.uk\/blog\/1393\/setting-up-a-16x4-liquid-crystal-display-to-show-hello-world\/","url_meta":{"origin":1601,"position":2},"title":"Setting up a 16&#215;4 Liquid Crystal Display to show Hello World","author":"Chewett","date":"October 6, 2018","format":false,"excerpt":"This post describes how to use a 16\u00d74 Liquid Crystal Display unit to display the text \u201cHello World\u201d. Overview of the 16\u00d74 Liquid Crystal Display Module In this review I am using a 16\u00d74 Liquid Crystal Display module,\u00a0this LCD has 16 character\u00a0panels per row, and four rows. Using the Arduino\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\/10\/16x4_lcd_screen_main_image.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\/10\/16x4_lcd_screen_main_image.jpg?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/16x4_lcd_screen_main_image.jpg?fit=800%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/16x4_lcd_screen_main_image.jpg?fit=800%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":1014,"url":"https:\/\/chewett.co.uk\/blog\/1014\/setting-up-a-16x2-liquid-crystal-display-to-show-hello-world\/","url_meta":{"origin":1601,"position":3},"title":"Setting up a 16&#215;2 Liquid Crystal Display to show Hello World","author":"Chewett","date":"July 28, 2018","format":false,"excerpt":"This post describes how to use a 16x2 Liquid Crystal Display unit as included in the Arduino Starter Kit\u00a0to display the text \"Hello World\". Overview of the 16x2 Liquid Crystal Display Module In this review I am using the 16x2 Liquid Crystal Display module from the Arduino Starter Kit. 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\/2018\/07\/16x2_lcd_screen_post_icon.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\/07\/16x2_lcd_screen_post_icon.jpg?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/07\/16x2_lcd_screen_post_icon.jpg?fit=800%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/07\/16x2_lcd_screen_post_icon.jpg?fit=800%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":721,"url":"https:\/\/chewett.co.uk\/blog\/721\/sw-18010p-motion-vibration-sensor-review-code-examples\/","url_meta":{"origin":1601,"position":4},"title":"SW-18010P Motion Vibration Sensor review and code examples","author":"Chewett","date":"December 6, 2017","format":false,"excerpt":"This post reviews the\u00a0SW-18010P motion vibration sensor. Here I review, test and provide code to use the sensor. Overview of the Vibration Sensor The SW-18010P vibration sensor is a small spring inside a metal casing. As the sensor vibrates or moves the spring will make contact with the metal casing\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\/2017\/10\/vibration_sensor_post_icon.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\/2017\/10\/vibration_sensor_post_icon.jpg?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/10\/vibration_sensor_post_icon.jpg?fit=800%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/10\/vibration_sensor_post_icon.jpg?fit=800%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":2549,"url":"https:\/\/chewett.co.uk\/blog\/2549\/using-the-128x64-i2c-sh1106-oled-display-module-screen-with-a-wemos-d1-mini-esp8266\/","url_meta":{"origin":1601,"position":5},"title":"Using the 128\u00d764 I2C SH1106 OLED Display Module Screen with a WeMos D1 Mini (ESP8266)","author":"Chewett","date":"September 26, 2020","format":false,"excerpt":"In this blog post I talk about how you can use a 128\u00d764 I2C\u00a0SH1106 OLED Display Module Screen with a WeMos D1 Mini (ESP8266) using the Arduino IDE. Summary of the 128\u00d764 I2C\u00a0SH1106 OLED Display Module Screen The SH1106 OLED display module is a nice 128x64 pixel screen. This unit\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\/2020\/08\/wemos_128x64_sh1106_oled_screen_output.png?fit=1200%2C628&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/08\/wemos_128x64_sh1106_oled_screen_output.png?fit=1200%2C628&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/08\/wemos_128x64_sh1106_oled_screen_output.png?fit=1200%2C628&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/08\/wemos_128x64_sh1106_oled_screen_output.png?fit=1200%2C628&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/08\/wemos_128x64_sh1106_oled_screen_output.png?fit=1200%2C628&ssl=1&resize=1050%2C600 3x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts\/1601","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=1601"}],"version-history":[{"count":4,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts\/1601\/revisions"}],"predecessor-version":[{"id":2484,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts\/1601\/revisions\/2484"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/media\/1609"}],"wp:attachment":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=1601"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=1601"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=1601"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}