<?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[ADC Module not working in UIflow2 - [fixed]]]></title><description><![CDATA[<p dir="auto">Hello,<br />
Setup: New UIF2 Project, Core2, only adding an external ADC Unit (and calling value in loop)</p>
<p dir="auto">Problem: I2C Bus initializes, but the "Init adc_0" Block fails in a debug error: "ValueError: expecting a pin" on the display. The error referres to line "adc_0 = ADC(i2c0)".</p>
<p dir="auto">So, sound like function "ADC()" does not accept the i2c0 handler.</p>
<p dir="auto">How to proceed/fix? thank you! :)</p>
]]></description><link>https://community.m5stack.com/topic/5578/adc-module-not-working-in-uiflow2-fixed</link><generator>RSS for Node</generator><lastBuildDate>Tue, 12 May 2026 01:31:15 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/5578.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 14 Aug 2023 21:07:26 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to ADC Module not working in UIflow2 - [fixed] on Thu, 17 Aug 2023 20:51:28 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/lbuque" aria-label="Profile: lbuque">@<bdi>lbuque</bdi></a> Great, thanks a lot, it works now (alpha23) :) and thanks <a class="plugin-mentions-user plugin-mentions-a" href="/user/ajb2k3" aria-label="Profile: ajb2k3">@<bdi>ajb2k3</bdi></a> for checking and confirming!</p>
]]></description><link>https://community.m5stack.com/post/21977</link><guid isPermaLink="true">https://community.m5stack.com/post/21977</guid><dc:creator><![CDATA[smatlok]]></dc:creator><pubDate>Thu, 17 Aug 2023 20:51:28 GMT</pubDate></item><item><title><![CDATA[Reply to ADC Module not working in UIflow2 - [fixed] on Wed, 16 Aug 2023 04:55:59 GMT]]></title><description><![CDATA[<p dir="auto">Machine ADC if for adc readings from the pins directly where as the Unit ADC uses defined port pins.</p>
]]></description><link>https://community.m5stack.com/post/21945</link><guid isPermaLink="true">https://community.m5stack.com/post/21945</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Wed, 16 Aug 2023 04:55:59 GMT</pubDate></item><item><title><![CDATA[Reply to ADC Module not working in UIflow2 - [fixed] on Wed, 16 Aug 2023 02:24:55 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/smatlok" aria-label="Profile: smatlok">@<bdi>smatlok</bdi></a> <a class="plugin-mentions-user plugin-mentions-a" href="/user/ajb2k3" aria-label="Profile: ajb2k3">@<bdi>ajb2k3</bdi></a> There is an ADC class in the unit module, which is the abstract class of the ADC unit, and it conflicts with the class name of machine.ADC. It will be fixed in the next version.</p>
]]></description><link>https://community.m5stack.com/post/21939</link><guid isPermaLink="true">https://community.m5stack.com/post/21939</guid><dc:creator><![CDATA[lbuque]]></dc:creator><pubDate>Wed, 16 Aug 2023 02:24:55 GMT</pubDate></item><item><title><![CDATA[Reply to ADC Module not working in UIflow2 - [fixed] on Tue, 15 Aug 2023 17:15:50 GMT]]></title><description><![CDATA[<p dir="auto">If you ha a Twitter/X/whatever its called account, post it there with <a class="plugin-mentions-user plugin-mentions-a" href="/user/m5stack" aria-label="Profile: m5stack">@<bdi>m5stack</bdi></a></p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/m5stack" aria-label="Profile: M5Stack">@<bdi>M5Stack</bdi></a> confirmed.<br />
here is the console output</p>
<pre><code>MicroPython v1.20.0 on 2023-08-04; M5STACK with ESP32S3
Type "help()" for more information.
&gt;&gt;&gt; 
&gt;&gt;&gt; 
&gt;&gt;&gt; import gc
&gt;&gt;&gt; gc.collect()
&gt;&gt;&gt; 
paste mode; Ctrl-C to cancel, Ctrl-D to finish
=== import os, sys, io
=== import M5
=== from M5 import *
=== from hardware import *
=== from unit import *
=== label0 = None
=== i2c0 = None
=== adc_0 = None
=== def setup():
===   global label0, i2c0, adc_0
===   i2c0 = I2C(0, scl=Pin(1), sda=Pin(2), freq=100000)
===   adc_0 = ADC(i2c0)
===   M5.begin()
===   Widgets.fillScreen(0x222222)
===   label0 = Widgets.Label("Text", 64, 71, 1.0, 0xffffff, 0x222222, Widgets.FONTS.DejaVu18)
=== def loop():
===   global label0, i2c0, adc_0
===   M5.update()
===   label0.setText(str(adc_0.get_raw_value()))
=== if __name__ == '__main__':
===   try:
===     setup()
===     while True:
===       loop()
===   except (Exception, KeyboardInterrupt) as e:
===     try:
===       from utility import print_error_msg
===       print_error_msg(e)
===     except ImportError:
===       print("please update to latest firmware")
=== 
=== 
=== 
Traceback (most recent call last):
  File "&lt;stdin&gt;", line 22, in &lt;module&gt;
  File "&lt;stdin&gt;", line 12, in setup
ValueError: expecting a pin

&gt;&gt;&gt; 
</code></pre>
]]></description><link>https://community.m5stack.com/post/21937</link><guid isPermaLink="true">https://community.m5stack.com/post/21937</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Tue, 15 Aug 2023 17:15:50 GMT</pubDate></item></channel></rss>