<?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[Where did ADC go in V1.1.2?]]></title><description><![CDATA[<p dir="auto">With the new V1.1.2 firmware today, it seems that we've lost the ADC functions under the Advanced menu. I think it is causing issues with my flow.</p>
<p dir="auto">I'm trying this simple flow with a non-contact water sensor (XKC-Y25-T12V).<br />
<img src="/assets/uploads/files/1548441305202-screen-shot-2019-01-25-at-1.34.37-pm-resized.png" alt="0_1548441300468_Screen Shot 2019-01-25 at 1.34.37 PM.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">I could be doing something wrong, as this is my first attempt at creating a uiFlow from this Arduino example sketch:<br />
<a href="https://www.dfrobot.com/wiki/index.php/Non-contact_Liquid_Level_Sensor_XKC-Y25-T12V_SKU:_SEN0204" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.dfrobot.com/wiki/index.php/Non-contact_Liquid_Level_Sensor_XKC-Y25-T12V_SKU:_SEN0204</a></p>
<p dir="auto">I have VCC (brown) and GND (blue) connected between the water sensor and the m5stack.  Then I have the OUT pin (yellow) of the water sensor connected to G5 (GPIO 5) of the m5stack (grey bottom). Finally, I have the ADJ pin (black) connected to GND.  The sensor is working properly.  I fill a glass of water about half way full.  When placing the sensor on the side of the glass above the water, the LED on the sensor is off and the voltage reads 0V on my multimeter.  When I slide the sensor down to below the water line, it detects the water, the LED on the sensor turns on, and the voltage reads about 4.75V on my multimeter.</p>
<p dir="auto">Upon uploading to my m5stack grey core, I get this error:<br />
<code>AttribueError("type object 'ADC' has no attirbute 'OUT'",)</code></p>
<p dir="auto">Any ideas? I'm no sure if uiFlow has a bug or my program.</p>
]]></description><link>https://community.m5stack.com/topic/541/where-did-adc-go-in-v1-1-2</link><generator>RSS for Node</generator><lastBuildDate>Sun, 08 Mar 2026 04:13:01 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/541.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 25 Jan 2019 18:44:23 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Where did ADC go in V1.1.2? on Tue, 29 Jan 2019 19:14:06 GMT]]></title><description><![CDATA[<p dir="auto">opps, port A is only for i2c, Port B is for I/O<br />
Sorry again for the typo that I didn't catch.<br />
Sorry 2 I was playing with code and didn't realise both the adc and earth sensor was there as I was working on my book.<br />
Sorry again for the confusion.</p>
<p dir="auto">Glad to hear that the senor works.</p>
]]></description><link>https://community.m5stack.com/post/2775</link><guid isPermaLink="true">https://community.m5stack.com/post/2775</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Tue, 29 Jan 2019 19:14:06 GMT</pubDate></item><item><title><![CDATA[Reply to Where did ADC go in V1.1.2? on Tue, 29 Jan 2019 18:36:07 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/443">@ajb2k3</a> said in <a href="/post/2742">Where did ADC go in V1.1.2?</a>:</p>
<blockquote>
<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/187">@world101</a> Ah, sorry for the misunderstanding, I don't mean test the actual earth sensor, I mean can you test the code with your sensor, please?</p>
</blockquote>
<p dir="auto">I tried to wire my breadboard jumpers to port A of the Fire, but they didn't fit too well (2.54mm vs. 2.00mm pin pitch). I will have to wait on my shipment of Grove cables from Aliexpress. Also, it looks like you have the ADC unit and the Earth unit both defined on port A. uiFlow didn't like that.</p>
<p dir="auto">So instead of trying to use the Unit functionality within uiFlow, I wired up the m5stack Grey again and used the Micropython console. This code works with my liquid sensor:</p>
<pre><code>from m5ui import *

clear_bg(0x111111)

pinin = machine.Pin(5, machine.Pin.IN)

btnA = M5Button(name="ButtonA", text="ButtonA", visibility=False)
btnB = M5Button(name="ButtonB", text="ButtonB", visibility=False)
btnC = M5Button(name="ButtonC", text="ButtonC", visibility=False)
label0 = M5TextBox(136, 127, "Text", lcd.FONT_Default, 0xFFFFFF)


while True:
    val = pinin.value()
    label0.setText(str(val))
    wait(0.1)
</code></pre>
<p dir="auto">It reports a 0 (no liquid) or 1 (liquid detected) on the m5stack LCD.</p>
]]></description><link>https://community.m5stack.com/post/2774</link><guid isPermaLink="true">https://community.m5stack.com/post/2774</guid><dc:creator><![CDATA[world101]]></dc:creator><pubDate>Tue, 29 Jan 2019 18:36:07 GMT</pubDate></item><item><title><![CDATA[Reply to Where did ADC go in V1.1.2? on Tue, 29 Jan 2019 18:13:05 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/700">@lukasmaximus</a> said in <a href="/post/2741">Where did ADC go in V1.1.2?</a>:</p>
<blockquote>
<p dir="auto">Apparently those blocks have now all been moved into the pin section, you can set the pwm duty within the analog write block and there is a block for setting a pin to in or out etc.. I cant see the adc bit width equivalent block anywhere. As i'm not too familiar with the functions of those blocks I never used them so please let me know if these reassigned blocks give the same function or not.</p>
</blockquote>
<p dir="auto">The Set pin block seems to cause the issue I was seeing with "AttribueError("type object 'ADC' has no attirbute 'OUT'",)". Now that I removed it, the flow is working fine. You are correct though, it looks like the Pin menu (presumably for GPIO pin functions) now has the combined blocks from Pin and ADC, but missing some blocks like ADC bit width, as you said. I wonder if that is on purpose. The Unit ADC from m5stack has the ADS1100 chip that supports up to 16 bits. Maybe the blockly code assumes users will only want to use 16 bits of resolution and not less???</p>
]]></description><link>https://community.m5stack.com/post/2773</link><guid isPermaLink="true">https://community.m5stack.com/post/2773</guid><dc:creator><![CDATA[world101]]></dc:creator><pubDate>Tue, 29 Jan 2019 18:13:05 GMT</pubDate></item><item><title><![CDATA[Reply to Where did ADC go in V1.1.2? on Mon, 28 Jan 2019 05:49:17 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/187">@world101</a> Ah, sorry for the misunderstanding, I don't mean test the actual earth sensor, I mean can you test the code with your sensor, please?</p>
]]></description><link>https://community.m5stack.com/post/2742</link><guid isPermaLink="true">https://community.m5stack.com/post/2742</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Mon, 28 Jan 2019 05:49:17 GMT</pubDate></item><item><title><![CDATA[Reply to Where did ADC go in V1.1.2? on Mon, 28 Jan 2019 02:53:49 GMT]]></title><description><![CDATA[<p dir="auto">Apparently those blocks have now all been moved into the pin section, you can set the pwm duty within the analog write block and there is a block for setting a pin to in or out etc.. I cant see the adc bit width equivalent block anywhere. As i'm not too familiar with the functions of those blocks I never used them so please let me know if these reassigned blocks give the same function or not.</p>
]]></description><link>https://community.m5stack.com/post/2741</link><guid isPermaLink="true">https://community.m5stack.com/post/2741</guid><dc:creator><![CDATA[lukasmaximus]]></dc:creator><pubDate>Mon, 28 Jan 2019 02:53:49 GMT</pubDate></item><item><title><![CDATA[Reply to Where did ADC go in V1.1.2? on Mon, 28 Jan 2019 02:00:47 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/443">@ajb2k3</a></p>
<p dir="auto">I would try your tests, but unfortunately, I don't have the Earth sensor from M5stack.  I have a few things on order (Relay unit, hexagon neopixel unit, etc.), but the Earth unit is not one of them. I only have the water sensor I linked in my first post, model XKC-Y25-V.  It's not from m5stack.  Here is a link to a better datasheet.</p>
<p dir="auto"><a href="http://www.naylampmechatronics.com/img/cms/Datasheets/XKC%20Y25%20T12V.pdf" target="_blank" rel="noopener noreferrer nofollow ugc">http://www.naylampmechatronics.com/img/cms/Datasheets/XKC Y25 T12V.pdf</a></p>
<p dir="auto">I just wire it straight to my m5stack core using jumper wires. The yellow wire goes to GPIO5 on the bottom of my m5stack grey.<br />
<img src="/assets/uploads/files/1548640694900-img_1314-resized.jpg" alt="0_1548640690032_IMG_1314.JPG" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.m5stack.com/post/2740</link><guid isPermaLink="true">https://community.m5stack.com/post/2740</guid><dc:creator><![CDATA[world101]]></dc:creator><pubDate>Mon, 28 Jan 2019 02:00:47 GMT</pubDate></item><item><title><![CDATA[Reply to Where did ADC go in V1.1.2? on Sun, 27 Jan 2019 16:27:32 GMT]]></title><description><![CDATA[<p dir="auto">Thank you for checking out my handbook, I'm glad to see that is proving useful so far.<br />
And thank you for pointing out the missing code blocks.</p>
<p dir="auto">Out of curiosity can you share any pics and information on your sensors?<br />
0 or 1 values from a water sensor?<br />
(don't shout at me because I know you said not blocky, however,)<br />
According to the M5 Documentation, the Earth Sensor Unit is a water sensor that has a variable input and outputs both analog and digital values.<br />
Would you mind testing the earth sensor blocks on your sensor and let me know the outcome for my handbook please?</p>
<p dir="auto">Ok back to the subject of alternative code use, again using the earth sensor,<br />
in mycropython you can try</p>
<pre><code>from m5stack import *
from m5ui import *
import units

clear_bg(0x111111)
adc0 = units.get(units.adc,units.PORTA)
earth0 = units.Earth(units.PORTA)



btnA = M5Button(name="ButtonA", text="ButtonA", visibility=False)
btnB = M5Button(name="ButtonB", text="ButtonB", visibility=False)
btnC = M5Button(name="ButtonC", text="ButtonC", visibility=False)
label0 = M5TextBox(136, 127, "Text", lcd.FONT_Default, 0xFFFFFF)


while True:
  label0.setText(str(earth0.a_read()))
  wait(0.001)
</code></pre>
<p dir="auto">or</p>
<pre><code>
from m5stack import *
from m5ui import *
import units

clear_bg(0x111111)
adc0 = units.get(units.adc,units.PORTA)
earth0 = units.Earth(units.PORTA)



btnA = M5Button(name="ButtonA", text="ButtonA", visibility=False)
btnB = M5Button(name="ButtonB", text="ButtonB", visibility=False)
btnC = M5Button(name="ButtonC", text="ButtonC", visibility=False)
label0 = M5TextBox(136, 127, "Text", lcd.FONT_Default, 0xFFFFFF)


while True:
  label0.setText(str(earth0.d_read()))
  wait(0.001)
</code></pre>
<p dir="auto">Please can you try this and let me know the outcome please?</p>
]]></description><link>https://community.m5stack.com/post/2733</link><guid isPermaLink="true">https://community.m5stack.com/post/2733</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Sun, 27 Jan 2019 16:27:32 GMT</pubDate></item><item><title><![CDATA[Reply to Where did ADC go in V1.1.2? on Sun, 27 Jan 2019 14:39:54 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/443">@ajb2k3</a></p>
<p dir="auto">I'm not looking to use the ADC blockly functionality in my flow above. The sensor I have can be considered a digital sensor.  It only reports low (0V) or high (VCC) when capacitance is detected from a liquid.  So I'm using digital pin functions within uiFlow.</p>
<p dir="auto">I'm just pointing out the fact that uiFlow is missing a bunch of blockly functions that I think were there in v1.1.1, but are gone in v1.1.2.  Looking at your manual I see these under the Advanced menu.  The ones in bold are missing from v1.1.2 of uiFLow.  This might be the cause of my errors with the <em>Set pin</em> blockly function I was using in my first post flow.  Not sure???</p>
<p dir="auto">Advanced,<br />
Pin,<br />
Analog Pin Write,<br />
Analog Pin Read,<br />
Digital Pin Read,<br />
Digital Pin Write,<br />
Set Pin Mode,<br />
Map Pin,<br />
<strong>GPIO,<br />
Set Pin Out of Pin,<br />
Set Pin In,<br />
Set Pin Out,<br />
Set Val to Pin In Value<br />
PWM,<br />
Set PWM of Pin,<br />
Set PWM Frequency,<br />
Set PWM Duty Cycle,<br />
ADC,<br />
Set ADC Pin to Value,<br />
Set Item,<br />
Set ADC Pin Bit Width,<br />
Read ADC Pin,</strong><br />
DAC,<br />
Set Dac,<br />
Write Value to Dac,<br />
UART,<br />
Set Uart,<br />
Read Uart,<br />
Read Uart (0) Characters,<br />
Read a Line of Uart,<br />
Read Uart and Write to Buffer,<br />
Read Uart Status?,<br />
Write Value to Uart,<br />
I2C,<br />
Set I2C in Port,<br />
I2C Scan Available,<br />
I2C Address (0) is Ready,<br />
I2C Read Address (0) count (0),<br />
I2C Read Address (0) Reg (0) Count (0),<br />
I2C Read Address (0) One Byte,<br />
I2C Read Address (0) Reg (0) One Byte,<br />
Execute,<br />
Execute Code,<br />
Network,<br />
WIFI Connect,<br />
MQTT,<br />
MQTT Setup,<br />
MQTT Subscribe,<br />
MQTT Start,<br />
Get Topic Data,<br />
Publish Topic,</p>
]]></description><link>https://community.m5stack.com/post/2730</link><guid isPermaLink="true">https://community.m5stack.com/post/2730</guid><dc:creator><![CDATA[world101]]></dc:creator><pubDate>Sun, 27 Jan 2019 14:39:54 GMT</pubDate></item><item><title><![CDATA[Reply to Where did ADC go in V1.1.2? on Sat, 26 Jan 2019 14:57:41 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/187">@world101</a> The M5Go and M5 fire use Port B for analog sensors but don't have the I/O base that the Core and Gray have.</p>
<p dir="auto">As a followup, the units will work on the core via the adc pins 35&amp;36</p>
]]></description><link>https://community.m5stack.com/post/2713</link><guid isPermaLink="true">https://community.m5stack.com/post/2713</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Sat, 26 Jan 2019 14:57:41 GMT</pubDate></item><item><title><![CDATA[Reply to Where did ADC go in V1.1.2? on Sat, 26 Jan 2019 14:41:18 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/443">@ajb2k3</a> said in <a href="/post/2710">Where did ADC go in V1.1.2?</a>:</p>
<blockquote>
<p dir="auto">All I can tell you is that ADC only works through the ADC pins on the base plate,<br />
The Grove port on the Core and gray is a digital i2C port.<br />
I'm still experimenting with a home-made rotation sensor</p>
</blockquote>
<p dir="auto">I'm using GPIO5 on the base (bottom) of the M5stack grey core. I haven't received my Grove cables yet, but once I do, I plan to test this on the M5stack fire as well.</p>
]]></description><link>https://community.m5stack.com/post/2712</link><guid isPermaLink="true">https://community.m5stack.com/post/2712</guid><dc:creator><![CDATA[world101]]></dc:creator><pubDate>Sat, 26 Jan 2019 14:41:18 GMT</pubDate></item><item><title><![CDATA[Reply to Where did ADC go in V1.1.2? on Sat, 26 Jan 2019 14:39:52 GMT]]></title><description><![CDATA[<p dir="auto">Here is a video: <a href="https://youtu.be/zWNDvSm6klk" target="_blank" rel="noopener noreferrer nofollow ugc">https://youtu.be/zWNDvSm6klk</a></p>
]]></description><link>https://community.m5stack.com/post/2711</link><guid isPermaLink="true">https://community.m5stack.com/post/2711</guid><dc:creator><![CDATA[world101]]></dc:creator><pubDate>Sat, 26 Jan 2019 14:39:52 GMT</pubDate></item><item><title><![CDATA[Reply to Where did ADC go in V1.1.2? on Sat, 26 Jan 2019 14:21:16 GMT]]></title><description><![CDATA[<p dir="auto">All I can tell you is that ADC only works through the ADC pins on the base plate,<br />
The Grove port on the Core and gray is a digital i2C port.<br />
I'm still experimenting with a home-made rotation sensor</p>
]]></description><link>https://community.m5stack.com/post/2710</link><guid isPermaLink="true">https://community.m5stack.com/post/2710</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Sat, 26 Jan 2019 14:21:16 GMT</pubDate></item><item><title><![CDATA[Reply to Where did ADC go in V1.1.2? on Sat, 26 Jan 2019 14:16:24 GMT]]></title><description><![CDATA[<p dir="auto">After some trial and error, I figured it out.  A few changes I made:</p>
<ul>
<li>Removed the "Set pin" block. This allowed the flow to compile without error.</li>
<li>Connected the ADJ pin (black) to VCC instead of GND per the sensor datasheet.</li>
<li>Added an audible tone function to the flow so a song will play when the liquid is detected.</li>
<li>Updates to the UI interface</li>
</ul>
<p dir="auto"><img src="/assets/uploads/files/1548511957210-screen-shot-2019-01-26-at-8.39.26-am-resized.png" alt="0_1548511932915_Screen Shot 2019-01-26 at 8.39.26 AM.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">I'm still not sure why the ADC causes an error when the Set pin block is inserted.  <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/480">@heybin</a> or <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/133419">@watson</a>, perhaps you can look into that.</p>
]]></description><link>https://community.m5stack.com/post/2709</link><guid isPermaLink="true">https://community.m5stack.com/post/2709</guid><dc:creator><![CDATA[world101]]></dc:creator><pubDate>Sat, 26 Jan 2019 14:16:24 GMT</pubDate></item></channel></rss>