<?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[multiple i2c bugs]]></title><description><![CDATA[<p dir="auto">I am trying to get the CoreS3's proximity and ambient light sensor to work in UiFlow2.0 and I am having these problems.<br />
1: i2c "Generate START condition" block shows this error "OSError: I2C operation not supported"<br />
2: i2c "Scan Device" block returns addresses, but the address for the LTR553 (0x23) does not show up.<br />
3: You need an object with buffer protocol to send data via i2c but something with buffer protocol (like bytearray) does not work.</p>
<p dir="auto">Any help or bug fix/update is much appreciated!</p>
]]></description><link>https://community.m5stack.com/topic/5321/multiple-i2c-bugs</link><generator>RSS for Node</generator><lastBuildDate>Tue, 17 Mar 2026 09:45:22 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/5321.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 21 May 2023 20:37:53 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to multiple i2c bugs on Fri, 30 Jun 2023 10:08:23 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/11558">@HWTaro9</a> <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/4037">@felmue</a> <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/14347">@aleekwen</a></p>
<p dir="auto">Hi, new firmware now suppport LTR553 sensor.</p>
]]></description><link>https://community.m5stack.com/post/21412</link><guid isPermaLink="true">https://community.m5stack.com/post/21412</guid><dc:creator><![CDATA[IAMLIUBO]]></dc:creator><pubDate>Fri, 30 Jun 2023 10:08:23 GMT</pubDate></item><item><title><![CDATA[Reply to multiple i2c bugs on Fri, 23 Jun 2023 15:28:17 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/14347">@aleekwen</a></p>
<p dir="auto">thank you for the extensive code example.</p>
<p dir="auto">However, the original topic was for <strong>UIFlow 2.0</strong> (not IDE code) and the user having difficulties is <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/11558">@HWTaro9</a>.</p>
<p dir="auto">That said, it is still good to know that it works when using IDE code.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/21284</link><guid isPermaLink="true">https://community.m5stack.com/post/21284</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Fri, 23 Jun 2023 15:28:17 GMT</pubDate></item><item><title><![CDATA[Reply to multiple i2c bugs on Fri, 23 Jun 2023 15:11:44 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/4037">@felmue</a> this IDE code works for me on the CoreS3 - I had to cobble together code from various sources to get this to work (and still use the CoreS3 lib)</p>
<p dir="auto">#define LTR553_ADDR 0x23</p>
<p dir="auto">void writeRegister8(uint8_t _address, uint8_t subAddress, uint8_t data, uint32_t freq) {<br />
Wire1.beginTransmission(_address);<br />
Wire1.write(subAddress);<br />
Wire1.write(data);<br />
Wire1.endTransmission();<br />
}</p>
<p dir="auto">uint8_t readRegister8(uint8_t _address, uint8_t subAddress, uint32_t freq) {<br />
Wire1.beginTransmission(_address);<br />
Wire1.write(subAddress);<br />
Wire1.endTransmission();<br />
Wire1.requestFrom(_address, (size_t)1);<br />
return Wire1.read();<br />
}</p>
<p dir="auto">void  readRegister(uint8_t _address, uint8_t subAddress, uint8_t buff[], int size, uint32_t freq) {<br />
Wire1.beginTransmission(_address);<br />
Wire1.write(subAddress);<br />
Wire1.endTransmission();<br />
Wire1.requestFrom(_address, (size_t)size);<br />
for (int i = 0; i &lt; size; i++) {<br />
buff[i] = Wire1.read();<br />
}<br />
}</p>
<p dir="auto">bool LTR553Init() {<br />
// soft reset<br />
uint8_t value_r = readRegister8(LTR553_ADDR, 0x80, 100000L);<br />
value_r &amp;= (~0x02);<br />
uint8_t value_w = value_r | 0x02;<br />
writeRegister8(LTR553_ADDR, 0x80, value_w, 100000L);</p>
<pre><code>// PS Led Pluse
writeRegister8(LTR553_ADDR, 0x83, 0x0F, 100000L);
// ALS Active Mode
value_r = readRegister8(LTR553_ADDR, 0x80, 100000L);
value_r &amp;= (~0x01);
value_w = value_r | 0x01;
writeRegister8(LTR553_ADDR, 0x80, value_w, 100000L);
// PS Active Mode
value_r = readRegister8(LTR553_ADDR, 0x81, 100000L);
value_r &amp;= (~0x03);
value_w = value_r | 0x03;
writeRegister8(LTR553_ADDR, 0x81, value_w, 100000L);
return true;
</code></pre>
<p dir="auto">}</p>
<p dir="auto">uint32_t GetLTR553AlsCh0Value() {<br />
uint8_t buffer[2];<br />
uint32_t result;<br />
readRegister(LTR553_ADDR, 0x8A, buffer, 2, 100000L);<br />
result = (buffer[1] &lt;&lt; 8) | buffer[0];<br />
return result;<br />
}</p>
<p dir="auto">uint32_t GetLTR553AlsCh1Value() {<br />
uint8_t buffer[2];<br />
uint32_t result;<br />
readRegister(LTR553_ADDR, 0x88, buffer, 2, 100000L);<br />
result = (buffer[1] &lt;&lt; 8) | buffer[0];<br />
return result;<br />
}</p>
<p dir="auto">uint16_t GetLTR553PsValue() {<br />
uint8_t buffer[2];<br />
uint16_t result;<br />
readRegister(LTR553_ADDR, 0x8D, buffer, 2, 100000L);<br />
buffer[0] &amp;= 0xFF;<br />
buffer[1] &amp;= 0x07;<br />
result = (buffer[1] &lt;&lt; 8) | buffer[0];<br />
return result;<br />
}</p>
<p dir="auto">call the Init from setup and call the Get* ones as you need</p>
]]></description><link>https://community.m5stack.com/post/21283</link><guid isPermaLink="true">https://community.m5stack.com/post/21283</guid><dc:creator><![CDATA[aleekwen]]></dc:creator><pubDate>Fri, 23 Jun 2023 15:11:44 GMT</pubDate></item><item><title><![CDATA[Reply to multiple i2c bugs on Tue, 23 May 2023 21:04:07 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/11558">@HWTaro9</a></p>
<p dir="auto">that is only the general description of how I2C works. Or am I missing something?</p>
<p dir="auto">I am looking for a list of register addresses which can be read and write to.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/20954</link><guid isPermaLink="true">https://community.m5stack.com/post/20954</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Tue, 23 May 2023 21:04:07 GMT</pubDate></item><item><title><![CDATA[Reply to multiple i2c bugs on Tue, 23 May 2023 19:34:30 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/4037">@felmue</a> page 4 in this document <a href="http://www.everest-semi.com/pdf/ES7210%20PB.pdf" target="_blank" rel="noopener noreferrer nofollow ugc">http://www.everest-semi.com/pdf/ES7210 PB.pdf</a></p>
]]></description><link>https://community.m5stack.com/post/20953</link><guid isPermaLink="true">https://community.m5stack.com/post/20953</guid><dc:creator><![CDATA[HWTaro9]]></dc:creator><pubDate>Tue, 23 May 2023 19:34:30 GMT</pubDate></item><item><title><![CDATA[Reply to multiple i2c bugs on Tue, 23 May 2023 13:17:53 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/11558">@HWTaro9</a></p>
<p dir="auto">it is my understanding that audio data from the microphones are being sent via I2<strong>S</strong> (not I2<strong>C</strong>), no?</p>
<p dir="auto">Do you have a document explaining the I2C commands of the ES7210?</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/20942</link><guid isPermaLink="true">https://community.m5stack.com/post/20942</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Tue, 23 May 2023 13:17:53 GMT</pubDate></item><item><title><![CDATA[Reply to multiple i2c bugs on Tue, 23 May 2023 02:08:37 GMT]]></title><description><![CDATA[<p dir="auto">Thank you very much for the info and code! But the reason I need to send a start command is because the microphone decoder only sends code after a start condition is sent, and I'm not sure that it is sent automatically.</p>
]]></description><link>https://community.m5stack.com/post/20929</link><guid isPermaLink="true">https://community.m5stack.com/post/20929</guid><dc:creator><![CDATA[HWTaro9]]></dc:creator><pubDate>Tue, 23 May 2023 02:08:37 GMT</pubDate></item><item><title><![CDATA[Reply to multiple i2c bugs on Mon, 22 May 2023 20:28:03 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/11558">@HWTaro9</a></p>
<p dir="auto">1: not sure when this is actually needed.</p>
<p dir="auto">2: I2C scan returns a list with decimal values (not hex) therefore you should be looking for the decimal value 35 (=0x23) in the list.</p>
<p dir="auto">3: I am able to write to and read from the light sensor like below:</p>
<p dir="auto"><img src="/assets/uploads/files/1684787246208-uiflow2_cores3_lightsensor_20230522-resized.png" alt="0_1684787251587_UIFlow2_CoreS3_Lightsensor_20230522.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/20926</link><guid isPermaLink="true">https://community.m5stack.com/post/20926</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Mon, 22 May 2023 20:28:03 GMT</pubDate></item></channel></rss>