<?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[Re: I2C slave mode doesn&#x27;t work for UnitV Stick]]></title><description><![CDATA[<p dir="auto">Is this problem already solved?</p>
<p dir="auto">I encountered the same problem and found a solution.<br />
I think this is a mistake in the sample program.</p>
<p dir="auto">Although the variable `count' in the function i2c_on_transmit must be global it is interpreted as a local variable.</p>
<p dir="auto">I have modified the i2c_on_transmit() as follows.</p>
<pre><code>def i2c_on_transmit()
  global count
  count = count + 1
  print ("on_transmit, send:", count)
  return count
</code></pre>
<p dir="auto">Then, it worked well.</p>
]]></description><link>https://community.m5stack.com/topic/2480/re-i2c-slave-mode-doesn-t-work-for-unitv-stick</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 03:46:08 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/2480.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 18 Nov 2020 04:52:50 GMT</pubDate><ttl>60</ttl></channel></rss>