<?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[External libraries and I2C via UIFLOW]]></title><description><![CDATA[<p dir="auto">It would be really to nice to have a tutorial using I2C blocks of UIFLOW and using external I2C devices. I tried to get readings from Adafruit BNO055 using execute block but just receive errors.<br />
Did anyone try to connect a non M5STACK I2C sensor via UIFLOW ?</p>
]]></description><link>https://community.m5stack.com/topic/1147/external-libraries-and-i2c-via-uiflow</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 04:13:44 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/1147.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 23 Jul 2019 20:46:13 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to External libraries and I2C via UIFLOW on Fri, 10 Jan 2020 17:41:36 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/robinkam" aria-label="Profile: robinkam">@<bdi>robinkam</bdi></a> Could you post the micropython code for it?<br />
That would be great, because I can't get it to work.</p>
]]></description><link>https://community.m5stack.com/post/6972</link><guid isPermaLink="true">https://community.m5stack.com/post/6972</guid><dc:creator><![CDATA[Wolli01]]></dc:creator><pubDate>Fri, 10 Jan 2020 17:41:36 GMT</pubDate></item><item><title><![CDATA[Reply to External libraries and I2C via UIFLOW on Sun, 29 Dec 2019 15:51:28 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jvmo" aria-label="Profile: jvmo">@<bdi>jvmo</bdi></a> said in <a href="/post/6746">External libraries and I2C via UIFLOW</a>:</p>
<blockquote>
<p dir="auto">i2c1.write_u8(0x24, 0x00)</p>
</blockquote>
<p dir="auto">Thanks for the sample code. I am trying to use UIFlow to write a program running on M5Stack Core on the BTC Base with DHT12 sensor. I found it kept reading wrong data until the i2c1.write_u8(0x24, 0x00) sentence in your code inspired me.</p>
<p dir="auto"><img src="/assets/uploads/files/1577634665917-img_1174-resized.jpg" alt="0_1577634660393_IMG_1174.jpg" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.m5stack.com/post/6803</link><guid isPermaLink="true">https://community.m5stack.com/post/6803</guid><dc:creator><![CDATA[robinkam]]></dc:creator><pubDate>Sun, 29 Dec 2019 15:51:28 GMT</pubDate></item><item><title><![CDATA[Reply to External libraries and I2C via UIFLOW on Thu, 19 Dec 2019 18:48:25 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/lukasmaximus" aria-label="Profile: lukasmaximus">@<bdi>lukasmaximus</bdi></a></p>
<p dir="auto">I read Sipeed Grove i2c sensor from m5stick C like this</p>
<pre><code class="language-python">from m5stack import *
from m5ui import *
from uiflow import *
import i2c_bus

i2c1 = i2c_bus.easyI2C(i2c_bus.PORTA, 0x45)

i2c1.write_u8(0x24, 0x00)
time.sleep(0.016)

data = i2c1.read(6)
temperature = data[0] * 256 + data[1]
celsius = -45 + (175 * temperature / 65535.0)
humidity = 100 * (data[3] * 256 + data[4]) / 65535.0

lcd.print(celsius,0,5,0xffffff)
lcd.print(humidity,0,20,0xffffff)</code></pre>
]]></description><link>https://community.m5stack.com/post/6746</link><guid isPermaLink="true">https://community.m5stack.com/post/6746</guid><dc:creator><![CDATA[jvmo]]></dc:creator><pubDate>Thu, 19 Dec 2019 18:48:25 GMT</pubDate></item><item><title><![CDATA[Reply to External libraries and I2C via UIFLOW on Wed, 24 Jul 2019 09:53:06 GMT]]></title><description><![CDATA[<p dir="auto">I have also been trying myself many times to interface with an I2C device and was only once successful with a sevseg display from seeed. This was back before we switched back to the main micropython branch and now I2C seems completely broken for anything other than M5Stack devices. If i use commands from the micropython 11.1 documentation I always get bus error, here is the precious little information about I2C commands in the latest UIflow firmware.</p>
<pre><code>import i2c_bus
# port i2c_bus.PORTA, i2c_bus.PORTB or (sda, scl)
i2c1 = i2c_bus.easyI2C(port, addr)

i2c1.write_u8(reg, data)
# byteorder: 'big' or 'little'
i2c1.write_u16(reg, data, byteorder='big')
#
data = i2c1.read_u8(reg):
# byteorder: 'big' or 'little'
data = i2c1.read_u16(reg, byteorder='big')
# data is bytes
data = i2c1.read(num)
# state: True or False
state = i2c1.available()
# addrList is a available addr list
addrList = i2c1.scan()</code></pre>
]]></description><link>https://community.m5stack.com/post/4863</link><guid isPermaLink="true">https://community.m5stack.com/post/4863</guid><dc:creator><![CDATA[lukasmaximus]]></dc:creator><pubDate>Wed, 24 Jul 2019 09:53:06 GMT</pubDate></item><item><title><![CDATA[Reply to External libraries and I2C via UIFLOW on Wed, 24 Jul 2019 04:52:35 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/hetzer" aria-label="Profile: hetzer">@<bdi>hetzer</bdi></a> said in <a href="/post/4858">External libraries and I2C via UIFLOW</a>:</p>
<blockquote>
<p dir="auto">It would be really to nice to have a tutorial using I2C blocks of UIFLOW and using external I2C devices. I tried to get readings from Adafruit BNO055 using execute block but just receive errors.<br />
Did anyone try to connect a non M5STACK I2C sensor via UIFLOW ?</p>
</blockquote>
<p dir="auto">Yes and I did get some limited success but haven't had the time to continue work on it.<br />
I2c works a bit funny in the latest versions of uiflow and takes some getting used to.<br />
It takes a combination of uiflow blocks and micropython hacking to get things to talk.</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/world101" aria-label="Profile: world101">@<bdi>world101</bdi></a> said in <a href="/post/4859">External libraries and I2C via UIFLOW</a>:</p>
<blockquote>
<p dir="auto">I wanted to know the same thing. I just received this one from Seed Studio that I’m trying to get working with uiFlow.</p>
<p dir="auto"><a href="https://www.seeedstudio.com/Grove-I2C-Mini-Motor-Driver-p-2508.html" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.seeedstudio.com/Grove-I2C-Mini-Motor-Driver-p-2508.html</a></p>
</blockquote>
<p dir="auto">That looks useful</p>
]]></description><link>https://community.m5stack.com/post/4862</link><guid isPermaLink="true">https://community.m5stack.com/post/4862</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Wed, 24 Jul 2019 04:52:35 GMT</pubDate></item><item><title><![CDATA[Reply to External libraries and I2C via UIFLOW on Tue, 23 Jul 2019 23:30:07 GMT]]></title><description><![CDATA[<p dir="auto">I wanted to know the same thing. I just received this one from Seed Studio that I’m trying to get working with uiFlow.</p>
<p dir="auto"><a href="https://www.seeedstudio.com/Grove-I2C-Mini-Motor-Driver-p-2508.html" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.seeedstudio.com/Grove-I2C-Mini-Motor-Driver-p-2508.html</a></p>
]]></description><link>https://community.m5stack.com/post/4859</link><guid isPermaLink="true">https://community.m5stack.com/post/4859</guid><dc:creator><![CDATA[world101]]></dc:creator><pubDate>Tue, 23 Jul 2019 23:30:07 GMT</pubDate></item></channel></rss>