<?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[Simple Wi-Fi signal strength]]></title><description><![CDATA[<p dir="auto">It's like an icon of LTE signal strength, but...<br />
Of course, I wanted to do it in a way that everyone knows, but...It's too complicated. Does anyone have a simple implementation experience?</p>
<p dir="auto">void showWifiSignal()<br />
{</p>
<p dir="auto">int nWifi = getWifidBm();<br />
M5.Lcd.setCursor(2, 30);<br />
M5.Lcd.setTextSize(1);<br />
M5.Lcd.print(String(nWifi)+"dBm");</p>
<p dir="auto">if(nWifi &lt; -50  &amp;&amp; nWifi == 0 )<br />
{<br />
M5.Lcd.drawRoundRect(30, 12, 5, 16, 1, LIGHTGREY);</p>
<p dir="auto">}<br />
else<br />
{<br />
M5.Lcd.fillRoundRect(30, 12, 5, 16, 1, BLACK);<br />
}</p>
<p dir="auto">if(nWifi &lt; -70 &amp;&amp; nWifi == 0)<br />
{<br />
M5.Lcd.drawRoundRect(22, 16, 5, 12, 1, LIGHTGREY);</p>
<p dir="auto">}<br />
else<br />
{<br />
M5.Lcd.fillRoundRect(22, 16, 5, 12, 1, BLACK);<br />
}</p>
<p dir="auto">if(nWifi &lt; -80 &amp;&amp; nWifi == 0)<br />
{<br />
M5.Lcd.drawRoundRect(14, 20, 5, 8, 1, LIGHTGREY);</p>
<p dir="auto">}<br />
else<br />
{<br />
M5.Lcd.fillRoundRect(14, 20, 5, 8, 1, BLACK);<br />
}</p>
<p dir="auto">if(nWifi &lt; -90 &amp;&amp; nWifi == 0)<br />
{<br />
M5.Lcd.drawRoundRect(6, 23, 5, 5, 1, LIGHTGREY);<br />
}<br />
else<br />
{<br />
M5.Lcd.fillRoundRect(6, 23, 5, 5, 1, BLACK);<br />
}<br />
}</p>
]]></description><link>https://community.m5stack.com/topic/1780/simple-wi-fi-signal-strength</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 17:14:54 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/1780.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 20 Mar 2020 09:29:20 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Simple Wi-Fi signal strength on Sat, 04 Apr 2020 18:10:29 GMT]]></title><description><![CDATA[<p dir="auto">you can try this pice of code which is working for me:<br />
.</p>
<p dir="auto">.</p>
<p dir="auto">#include &lt;WiFi.h&gt;<br />
#include "Free_Fonts.h"<br />
#include &lt;M5Stack.h&gt;</p>
<p dir="auto">const char* ssid     = "your_host";<br />
const char* password = "your_password";<br />
WiFiClient client;</p>
<p dir="auto">void setup() {<br />
M5.begin();<br />
// Connecting to WiFi:<br />
M5.Lcd.setFreeFont(FM9); M5.Lcd.setTextSize(1); M5.Lcd.setTextColor(TFT_WHITE);<br />
M5.Lcd.print("\n\nConnecting to ");<br />
M5.Lcd.println(ssid);<br />
WiFi.begin(ssid, password);<br />
while (WiFi.status() != WL_CONNECTED) {<br />
M5.Lcd.setTextWrap(true);<br />
M5.Lcd.print(".");<br />
delay(500);<br />
}<br />
M5.Lcd.println("\nWiFi connected");<br />
delay(1000);<br />
M5.Lcd.fillScreen(TFT_BLACK);<br />
}</p>
<p dir="auto">void loop() {<br />
showWifiStrength();<br />
delay(2000);<br />
}</p>
<p dir="auto">// show Wifi-RSSI level (signal strength in 4 bars  + dBm )<br />
void showWifiStrength() {<br />
int WifiRSSI = WiFi.RSSI();<br />
M5.Lcd.fillRect(40, 0, 68, 15, TFT_BLACK);<br />
M5.Lcd.setCursor(40, 14);<br />
M5.Lcd.print(String(WifiRSSI) + "dBm");<br />
if (WifiRSSI &gt; -50 &amp; ! WifiRSSI == 0 ) M5.Lcd.fillRoundRect(26, 1, 5, 12, 1, TFT_WHITE);<br />
else M5.Lcd.fillRoundRect(26, 1, 5, 12, 1, TFT_DARKGREY);<br />
if (WifiRSSI &gt; -70 &amp; ! WifiRSSI == 0) M5.Lcd.fillRoundRect(18, 3, 5, 10, 1, TFT_WHITE);<br />
else M5.Lcd.fillRoundRect(18, 3, 5, 10, 1, TFT_DARKGREY);<br />
if (WifiRSSI &gt; -80 &amp; ! WifiRSSI == 0) M5.Lcd.fillRoundRect(10, 5, 5, 8, 1, TFT_WHITE);<br />
else M5.Lcd.fillRoundRect(10, 5, 5, 8, 1, TFT_DARKGREY);<br />
if (WifiRSSI &gt; -90 &amp; ! WifiRSSI == 0)<br />
M5.Lcd.fillRoundRect(2, 7, 5, 6, 1, TFT_WHITE);<br />
else M5.Lcd.fillRoundRect(2, 7, 5, 6, 1, TFT_RED);<br />
}</p>
]]></description><link>https://community.m5stack.com/post/8009</link><guid isPermaLink="true">https://community.m5stack.com/post/8009</guid><dc:creator><![CDATA[frittna]]></dc:creator><pubDate>Sat, 04 Apr 2020 18:10:29 GMT</pubDate></item></channel></rss>