<?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[Using G33 analogRead while connected to Wi-Fi]]></title><description><![CDATA[<p dir="auto">First of all, this is my first post so please let me know if there is problem</p>
<hr />
<p dir="auto">So I thought I'd do an analog read with the G33 pin, but it worked fine at first, but when I added the code to do the wifi communication, the G33 analog read always returned 4098.</p>
<p dir="auto">I searched and found that using ADC2 with analogread during wifi communication always returns 4098, but the G33 pin is ADC1.</p>
<p dir="auto">I don't know what's wrong, please help!</p>
]]></description><link>https://community.m5stack.com/topic/2464/using-g33-analogread-while-connected-to-wi-fi</link><generator>RSS for Node</generator><lastBuildDate>Thu, 16 Apr 2026 01:56:09 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/2464.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 12 Nov 2020 13:06:54 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Using G33 analogRead while connected to Wi-Fi on Sun, 15 Nov 2020 02:15:54 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> said in <a href="/post/10737">Using G33 analogRead while connected to Wi-Fi</a>:</p>
<blockquote>
<p dir="auto">Have you confirmed that reading GPIO33 works again if you comment out the WiFi code? Maybe adding that isn't the cause that made reading GPIO33 stop working?</p>
</blockquote>
<p dir="auto">Yes. I have confirmed that it works when I remove the Wifi code...<br />
I will try this with another atom...</p>
]]></description><link>https://community.m5stack.com/post/10744</link><guid isPermaLink="true">https://community.m5stack.com/post/10744</guid><dc:creator><![CDATA[dollychun]]></dc:creator><pubDate>Sun, 15 Nov 2020 02:15:54 GMT</pubDate></item><item><title><![CDATA[Reply to Using G33 analogRead while connected to Wi-Fi on Sat, 14 Nov 2020 08:11:19 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/5034">@dollychun</a></p>
<p dir="auto">Hmm, I am running your code (with my WiFi credentials) on an M5Atom Matrix and reading GPIO33 is fine.</p>
<p dir="auto">I get <code>0</code> when GPIO33 is connected to GND and <code>4095</code> when connected to +3.3V and values in between when floating as expected.</p>
<pre><code>AnalogRead = 0
AnalogRead = 544
AnalogRead = 16
AnalogRead = 4095
</code></pre>
<p dir="auto">Have you confirmed that reading GPIO33 works again if you comment out the WiFi code? Maybe adding that isn't the cause that made reading GPIO33 stop working?</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/10737</link><guid isPermaLink="true">https://community.m5stack.com/post/10737</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Sat, 14 Nov 2020 08:11:19 GMT</pubDate></item><item><title><![CDATA[Reply to Using G33 analogRead while connected to Wi-Fi on Sat, 14 Nov 2020 02:20:41 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> Heres my code</p>
<pre><code>#include "M5Atom.h"
#include "WiFi.h"

int analogIn = 33;

const char* ssid       = "PatoWiFi";
const char* password   = "PatoWifi_Password";

WiFiClient client;

void setup() {
  // put your setup code here, to run once:
  M5.begin(true, false, true);
  Serial.begin(115200);
  pinMode(analogIn, INPUT);
  WiFi.begin(ssid, password);
  Serial.print("Connecting to WiFi");
  while(WiFi.status()!=WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }
  Serial.print("OK");
  Serial.print("\r\nWiFi connected\r\nIP address: ");
  Serial.println(WiFi.localIP());
  client.connect("www.someurl.com", 80);
  Serial.println("sending data to server");
  client.println("POST / HTTP/1.1");
  client.println("Host: www.someurl.com");
  client.println("User-Agent: ESP32/M5Atom");
  client.println("Accept */*");
  client.println();
  
  unsigned long timeout = millis();
  while (client.available() == 0) {
    if (millis() - timeout &gt; 5000) {
      Serial.println("&gt;&gt;&gt; Client Timeout !");
      client.stop();
    }
  }

  Serial.println("receiving from remote server");
  // not testing 'client.connected()' since we do not need to send data here
  while (client.available()) {
    char ch = static_cast&lt;char&gt;(client.read());
    Serial.print(ch);
  }

  // Close the connection
  Serial.println();
  Serial.println("closing connection");
  client.stop();
  
  WiFi.disconnect();
}

void loop() {
  // put your main code here, to run repeatedly:
  int val = analogRead(analogIn); // Always return 4095
  Serial.printf("AnalogRead = %d\n", val);
  delay(100);
}
</code></pre>
]]></description><link>https://community.m5stack.com/post/10735</link><guid isPermaLink="true">https://community.m5stack.com/post/10735</guid><dc:creator><![CDATA[dollychun]]></dc:creator><pubDate>Sat, 14 Nov 2020 02:20:41 GMT</pubDate></item><item><title><![CDATA[Reply to Using G33 analogRead while connected to Wi-Fi on Fri, 13 Nov 2020 20:57:49 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/5034">@dollychun</a></p>
<p dir="auto">using GPIO33 as analog input and WiFi works for me. M5Atom is connected to WiFi and I get values from 0 to 4095 from GPIO33. Care to share your code?</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/10732</link><guid isPermaLink="true">https://community.m5stack.com/post/10732</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Fri, 13 Nov 2020 20:57:49 GMT</pubDate></item></channel></rss>