<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[[Solved]M5Stick and VL53L1X]]></title><description><![CDATA[<p dir="auto">Hi all,</p>
<p dir="auto">I'm trying <a href="https://www.pololu.com/product/3415" target="_blank" rel="noopener noreferrer nofollow ugc">VL53L1X</a> sensor on M5Stick through grove connection</p>
<p dir="auto">VL53L1X---------------------M5Stick<br />
VIN-------------------------------5v grove<br />
GRD-------------------------------grd grove<br />
SDA--------------------------------G21 grove<br />
SCL---------------------------------G22 grove</p>
<p dir="auto">uploading this sketch</p>
<pre><code>/*
  This example shows how to take simple range measurements with the VL53L1X. The
  range readings are in units of mm.
*/

#include &lt;Wire.h&gt;
#include &lt;VL53L1X.h&gt;

VL53L1X sensor;

void setup()
{

  Serial.begin(115200);
  Wire.begin();
  Wire.setClock(400000); // use 400 kHz I2C

  sensor.setTimeout(500);
  if (!sensor.init())
  {
    Serial.println("Failed to detect and initialize sensor!");
    while (1);
  }

  // Use long distance mode and allow up to 50000 us (50 ms) for a measurement.
  // You can change these settings to adjust the performance of the sensor, but
  // the minimum timing budget is 20 ms for short distance mode and 33 ms for
  // medium and long distance modes. See the VL53L1X datasheet for more
  // information on range and timing limits.
  sensor.setDistanceMode(VL53L1X::Long);
  sensor.setMeasurementTimingBudget(50000);

  // Start continuous readings at a rate of one measurement every 50 ms (the
  // inter-measurement period). This period should be at least as long as the
  // timing budget.
  sensor.startContinuous(50);
}

void loop()
{
  Serial.print(sensor.read());
  if (sensor.timeoutOccurred()) {
    Serial.print(" TIMEOUT");
  }

  Serial.println();
}
</code></pre>
<p dir="auto">this is the serial monitor output...</p>
<pre><code>rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1100
load:0x40078000,len:9220
load:0x40080400,len:6300
entry 0x400806a4
Failed to detect and initialize sensor!

</code></pre>
<p dir="auto">whats wrong??</p>
]]></description><link>https://community.m5stack.com/topic/681/solved-m5stick-and-vl53l1x</link><generator>RSS for Node</generator><lastBuildDate>Thu, 30 Apr 2026 11:34:06 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/681.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 16 Feb 2019 23:15:09 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to [Solved]M5Stick and VL53L1X on Wed, 17 Apr 2019 05:34:19 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/cepics" aria-label="Profile: cepics">@<bdi>cepics</bdi></a> said in <a href="/post/3781">[Solved]M5Stick and VL53L1X</a>:</p>
<blockquote>
<pre><code>/*
This example shows how to take simple range measurements with the VL53L1X. The
range readings are in units of mm.
*/

#include &lt;Wire.h&gt;
#include &lt;VL53L1X.h&gt;

VL53L1X sensor;

void setup()
{
  Serial.begin(115200);
  //Wire.begin();
    Wire.begin(25, 13); // (SDA, SCL) grove stick
  //Wire.begin(21, 22); // (SDA, SCL) grove stack
  Wire.setClock(400000); // use 400 kHz I2C

  sensor.setTimeout(500);
  if (!sensor.init())
  {
    Serial.println("Failed to detect and initialize sensor!");
    while (1);
  }
  
  // Use long distance mode and allow up to 50000 us (50 ms) for a measurement.
  // You can change these settings to adjust the performance of the sensor, but
  // the minimum timing budget is 20 ms for short distance mode and 33 ms for
  // medium and long distance modes. See the VL53L1X datasheet for more
  // information on range and timing limits.
  sensor.setDistanceMode(VL53L1X::Long);
  sensor.setMeasurementTimingBudget(50000);

  // Start continuous readings at a rate of one measurement every 50 ms (the
  // inter-measurement period). This period should be at least as long as the
  // timing budget.
  sensor.startContinuous(50);
}

void loop()
{
  //Serial.print(sensor.read()); //MM
  Serial.print(sensor.read()/10); //CM
  if (sensor.timeoutOccurred()) { Serial.print(" TIMEOUT"); }

  Serial.println();
}
</code></pre>
<p dir="auto">it works!!!</p>
</blockquote>
<p dir="auto">Glad it works and sorry for posting the pins the wrong way around.</p>
]]></description><link>https://community.m5stack.com/post/3785</link><guid isPermaLink="true">https://community.m5stack.com/post/3785</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Wed, 17 Apr 2019 05:34:19 GMT</pubDate></item><item><title><![CDATA[Reply to [Solved]M5Stick and VL53L1X on Tue, 16 Apr 2019 21:24:36 GMT]]></title><description><![CDATA[<pre><code>/*
This example shows how to take simple range measurements with the VL53L1X. The
range readings are in units of mm.
*/

#include &lt;Wire.h&gt;
#include &lt;VL53L1X.h&gt;

VL53L1X sensor;

void setup()
{
  Serial.begin(115200);
  //Wire.begin();
    Wire.begin(25, 13); // (SDA, SCL) grove stick
  //Wire.begin(21, 22); // (SDA, SCL) grove stack
  Wire.setClock(400000); // use 400 kHz I2C

  sensor.setTimeout(500);
  if (!sensor.init())
  {
    Serial.println("Failed to detect and initialize sensor!");
    while (1);
  }
  
  // Use long distance mode and allow up to 50000 us (50 ms) for a measurement.
  // You can change these settings to adjust the performance of the sensor, but
  // the minimum timing budget is 20 ms for short distance mode and 33 ms for
  // medium and long distance modes. See the VL53L1X datasheet for more
  // information on range and timing limits.
  sensor.setDistanceMode(VL53L1X::Long);
  sensor.setMeasurementTimingBudget(50000);

  // Start continuous readings at a rate of one measurement every 50 ms (the
  // inter-measurement period). This period should be at least as long as the
  // timing budget.
  sensor.startContinuous(50);
}

void loop()
{
  //Serial.print(sensor.read()); //MM
  Serial.print(sensor.read()/10); //CM
  if (sensor.timeoutOccurred()) { Serial.print(" TIMEOUT"); }

  Serial.println();
}
</code></pre>
<p dir="auto">it works!!!</p>
]]></description><link>https://community.m5stack.com/post/3781</link><guid isPermaLink="true">https://community.m5stack.com/post/3781</guid><dc:creator><![CDATA[cepics]]></dc:creator><pubDate>Tue, 16 Apr 2019 21:24:36 GMT</pubDate></item><item><title><![CDATA[Reply to [Solved]M5Stick and VL53L1X on Tue, 16 Apr 2019 19:35:31 GMT]]></title><description><![CDATA[<p dir="auto">Tnks a lot guys!!!!</p>
<p dir="auto">I will try asaic....</p>
]]></description><link>https://community.m5stack.com/post/3780</link><guid isPermaLink="true">https://community.m5stack.com/post/3780</guid><dc:creator><![CDATA[cepics]]></dc:creator><pubDate>Tue, 16 Apr 2019 19:35:31 GMT</pubDate></item><item><title><![CDATA[Reply to [Solved]M5Stick and VL53L1X on Mon, 15 Apr 2019 02:11:22 GMT]]></title><description><![CDATA[<p dir="auto">Thanks for your reply. <a class="plugin-mentions-user plugin-mentions-a" href="/user/ajb2k3" aria-label="Profile: ajb2k3">@<bdi>ajb2k3</bdi></a></p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/cepics" aria-label="Profile: cepics">@<bdi>cepics</bdi></a>  As <a class="plugin-mentions-user plugin-mentions-a" href="/user/ajb2k3" aria-label="Profile: ajb2k3">@<bdi>ajb2k3</bdi></a> said, you need use <code>Wire.begin(13, 25);</code> for Grove port IIC initialization for assigning gpio13 and gpio25 to IIC function pins.</p>
]]></description><link>https://community.m5stack.com/post/3752</link><guid isPermaLink="true">https://community.m5stack.com/post/3752</guid><dc:creator><![CDATA[m5-docs]]></dc:creator><pubDate>Mon, 15 Apr 2019 02:11:22 GMT</pubDate></item><item><title><![CDATA[Reply to [Solved]M5Stick and VL53L1X on Sun, 14 Apr 2019 21:07:58 GMT]]></title><description><![CDATA[<p dir="auto">I cant remember the exact code but you need to add<br />
<code>Wire1.begin();</code> Note the 1!</p>
<p dir="auto">its something like <code>Wire1.begin(13, 25);</code><br />
that you need to add after <code>Wire.begin();</code></p>
<p dir="auto">Sorry, I lost my source so cant remember how I solved it.</p>
]]></description><link>https://community.m5stack.com/post/3749</link><guid isPermaLink="true">https://community.m5stack.com/post/3749</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Sun, 14 Apr 2019 21:07:58 GMT</pubDate></item><item><title><![CDATA[Reply to [Solved]M5Stick and VL53L1X on Sun, 14 Apr 2019 20:06:48 GMT]]></title><description><![CDATA[<p dir="auto">Hi, tnks for answering...</p>
<p dir="auto">I'm using <a href="https://github.com/pololu/vl53l1x-arduino" target="_blank" rel="noopener noreferrer nofollow ugc">this</a> setup.</p>
<p dir="auto">in the code there isn't setup for pins....</p>
]]></description><link>https://community.m5stack.com/post/3748</link><guid isPermaLink="true">https://community.m5stack.com/post/3748</guid><dc:creator><![CDATA[cepics]]></dc:creator><pubDate>Sun, 14 Apr 2019 20:06:48 GMT</pubDate></item><item><title><![CDATA[Reply to [Solved]M5Stick and VL53L1X on Thu, 14 Mar 2019 02:37:34 GMT]]></title><description><![CDATA[<p dir="auto">Yes, The grove pins on M5Stick are difference with M5Core.<br />
<img src="/assets/uploads/files/1552530792151-%E5%BE%AE%E4%BF%A1%E6%88%AA%E5%9B%BE_20190314103152.png" alt="0_1552530776691_微信截图_20190314103152.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.m5stack.com/post/3281</link><guid isPermaLink="true">https://community.m5stack.com/post/3281</guid><dc:creator><![CDATA[m5-docs]]></dc:creator><pubDate>Thu, 14 Mar 2019 02:37:34 GMT</pubDate></item><item><title><![CDATA[Reply to [Solved]M5Stick and VL53L1X on Wed, 13 Mar 2019 07:20:51 GMT]]></title><description><![CDATA[<p dir="auto">M5Stick GROVE Interface	SCL: GPIO13, SDA: GPIO25. Look at <a href="https://docs.m5stack.com/#/en/core/m5stick" target="_blank" rel="noopener noreferrer nofollow ugc">M5Stick doc</a></p>
]]></description><link>https://community.m5stack.com/post/3275</link><guid isPermaLink="true">https://community.m5stack.com/post/3275</guid><dc:creator><![CDATA[ederle.d]]></dc:creator><pubDate>Wed, 13 Mar 2019 07:20:51 GMT</pubDate></item></channel></rss>