<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[RemoteXY community — Индикация]]></title>
		<link>https://forum.remotexy.com/viewtopic.php?id=1576</link>
		<atom:link href="https://forum.remotexy.com/extern.php?action=feed&amp;tid=1576&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Индикация.]]></description>
		<lastBuildDate>Sat, 14 Jan 2023 03:46:47 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Индикация]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=4963#p4963</link>
			<description><![CDATA[<p>Glad you figured it out.</p>]]></description>
			<author><![CDATA[null@example.com (Gunner)]]></author>
			<pubDate>Sat, 14 Jan 2023 03:46:47 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=4963#p4963</guid>
		</item>
		<item>
			<title><![CDATA[Re: Индикация]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=4957#p4957</link>
			<description><![CDATA[<p>проблему решил сам</p>]]></description>
			<author><![CDATA[null@example.com (xxbaykov)]]></author>
			<pubDate>Thu, 12 Jan 2023 13:08:05 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=4957#p4957</guid>
		</item>
		<item>
			<title><![CDATA[Re: Индикация]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=4951#p4951</link>
			<description><![CDATA[<p>в очередной раз прошу помощи в своем вопросе</p>]]></description>
			<author><![CDATA[null@example.com (xxbaykov)]]></author>
			<pubDate>Sat, 07 Jan 2023 13:10:02 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=4951#p4951</guid>
		</item>
		<item>
			<title><![CDATA[Re: Индикация]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=4934#p4934</link>
			<description><![CDATA[<p>Удалось отправить код. Подскажите, где необходимо исправить? И если возможно, выделите цветом. Спасибо!<br /></p><div class="codebox"><pre><code>#define  REMOTEXY_MODE__ESP8266WIFI_LIB_CLOUD
#include &lt;ESP8266WiFi.h&gt;
#include &lt;RemoteXY.h&gt;
extern &quot;C&quot; 
{
    #include &quot;user_interface.h&quot;
}
#define REMOTEXY_WIFI_SSID &quot;*****&quot;
#define REMOTEXY_WIFI_PASSWORD &quot;******&quot;
#define REMOTEXY_CLOUD_SERVER &quot;cloud.remotexy.com&quot;
#define REMOTEXY_CLOUD_PORT 6376
#define REMOTEXY_CLOUD_TOKEN &quot;f568b4899837f0c&quot;
#pragma pack(push, 1)
uint8_t RemoteXY_CONF[] = {255, 0, 0, 11, 0, 12, 0, 16, 31, 1, 67, 5, 14, 42, 33, 17, 2, 26, 11};
struct 
{
    char text_1[11];
    unsigned char connect_flag;
}
 RemoteXY;
#pragma pack(pop)
int ESP8266_AnalogInputValue;
unsigned long ESP8266_AnalogInputValue_StR;
bool ESPControllerWifiClient_HRD = 0;
bool ESPControllerWifiClient_status = 1;
bool ESPControllerWifiClient_isDHCP = 1;
bool ESPControllerWifiClient_IsNeedReconect = 0;
bool ESPControllerWifiClient_workStatus = 1;
char ESPControllerWifiClient_SSID[40] = &quot;*****&quot;;
char ESPControllerWifiClient_password[40] = &quot;*****&quot;;
IPAddress ESPControllerWifiClient_ip(0, 0, 0, 0);
IPAddress  ESPControllerWifiClient_dns (0, 0, 0, 1);
IPAddress  ESPControllerWifiClient_gateway (0, 0, 0, 1);
IPAddress ESPControllerWifiClient_subnet (255, 255, 255, 0);
uint8_t ESPControllerWifiClient_mac[6] = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0};
void setup()
{
    RemoteXY_Init ();
    ESP8266_AnalogInputValue_StR = millis() + 500 ;
    WiFi.mode(WIFI_STA);
    _esp8266WifiModuleClientReconnect();
}
void loop()
{
    RemoteXY_Handler  ();
    if(ESPControllerWifiClient_IsNeedReconect) 
    {
        _esp8266WifiModuleClientReconnect();
        ESPControllerWifiClient_IsNeedReconect = 0;
    }
    ESPControllerWifiClient_status = WiFi.status() == WL_CONNECTED;
    if (ESPControllerWifiClient_status) 
    {
         if (! ESPControllerWifiClient_HRD) 
        {
            ESPControllerWifiClient_ip =  WiFi.localIP();
            ESPControllerWifiClient_subnet =  WiFi.subnetMask();
            ESPControllerWifiClient_gateway =  WiFi.gatewayIP();
            ESPControllerWifiClient_dns =  WiFi.dnsIP();
            WiFi.macAddress(ESPControllerWifiClient_mac);
            ESPControllerWifiClient_HRD = 1;
        }
    }
     else 
    {
        ESPControllerWifiClient_HRD = 0;
    }
    if(_isTimer(ESP8266_AnalogInputValue_StR, 500))
    {
        ESP8266_AnalogInputValue_StR = millis();
        ESP8266_AnalogInputValue = analogRead(A0);
    }
    //Плата:1
    ((String(ESP8266_AnalogInputValue, DEC))).toCharArray((RemoteXY.text_1), 11);
}
bool _isTimer(unsigned long startTime, unsigned long period)
{
    unsigned long currentTime;
    currentTime = millis();
    if (currentTime&gt;= startTime) 
    {
        return (currentTime&gt;=(startTime + period));
    }
     else 
    {
        return (currentTime &gt;=(4294967295-startTime+period));
    }
}
int hexStrToInt(String instring)
{
    byte len = instring.length();
    if  (len == 0) return 0;
    int result = 0;
    for (byte i = 0; i &lt; 8; i++)    // только первые 8 цыфар влезуть в uint32
    {
        char ch = instring[i];
        if (ch == 0) break;
        result &lt;&lt;= 4;
        if (isdigit(ch))
        result = result | (ch - &#039;0&#039;);
        else result = result | (ch - &#039;A&#039; + 10);
    }
    return result;
}
void _esp8266WifiModuleClientReconnect()
{
    if(_checkMacAddres(ESPControllerWifiClient_mac)) 
    {
          wifi_set_macaddr(0, const_cast&lt;uint8*&gt;(ESPControllerWifiClient_mac));
    }
    if(ESPControllerWifiClient_isDHCP) 
    {
         WiFi.config(0U, 0U, 0U, 0U, 0U);
    }
     else 
    {
        WiFi.config(ESPControllerWifiClient_ip, ESPControllerWifiClient_gateway, ESPControllerWifiClient_subnet, ESPControllerWifiClient_dns , ESPControllerWifiClient_dns);
    }
    WiFi.begin(ESPControllerWifiClient_SSID, ESPControllerWifiClient_password);
}
bool _checkMacAddres(byte array[])
{
    bool result = 0;
    for (byte i = 0; i &lt; 6; i++)
    {
        if (array[i] == 255) 
        {
            return 0;
        }
        if (array[i] &gt; 0) 
        {
            result = 1;
        }
    }
    return result;
}
void _parseMacAddressString(String value, byte array[])
{
    int index;
    byte buffer[6] = {255, 255, 255, 255, 255, 255};
    byte raz = 0;
    String tempString;
    while ((value.length() &gt; 0) &amp;&amp; (raz &lt;= 6)) 
    {
        index = value.indexOf(&quot;:&quot;);
        if (index == -1) 
        {
            tempString = value;
            value = &quot;&quot;;
        }
         else 
        {
            tempString = value.substring(0, index);
            value = value.substring(index + 1);
        }
        buffer[raz] = byte(hexStrToInt(tempString));
        raz++;
    }
    if (_checkMacAddres(buffer))
    {
        for (byte i = 0; i &lt; 6; i++)
        {
            array[i] = buffer[i];
        }
    }
}
bool _compareMacAddreses(byte array1[], byte array2[])
{
    for (byte i = 0; i &lt; 6; i++)
    {
        if (array1[i] != array2[i]) 
        {
            return 0;
        }
    }
    return 1;
}
bool _compareMacAddresWithString(byte array[], String value)
{
    byte buffer[6] = {255, 255, 255, 255, 255, 255};
    _parseMacAddressString(value,  buffer);
    return _compareMacAddreses(array, buffer);
}
bool _checkMacAddresString(String value)
{
    byte buffer[6] = {255, 255, 255, 255, 255, 255};
    _parseMacAddressString(value,  buffer);
    return _checkMacAddres(buffer);
}
String _macAddresToString(byte array[])
{
    String result = &quot;&quot;;
    String  temp =&quot;&quot;;
    for (byte i = 0; i &lt; 6; i++)
    {
        temp=String(array[i],HEX);
        if (temp.length()  &lt; 2) 
        {
            temp = String(&quot;0&quot;) + temp;
        }
        result = result + temp;
        if (i &lt; 5) 
        {
               result = result + String(&quot;:&quot;);
        }
    }
    result.toUpperCase();
    return result;
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (xxbaykov)]]></author>
			<pubDate>Mon, 26 Dec 2022 13:50:57 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=4934#p4934</guid>
		</item>
		<item>
			<title><![CDATA[Re: Индикация]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=4932#p4932</link>
			<description><![CDATA[<p>По той же ссылке самый последний пример. <a target="_blank" href="https://remotexy.com/en/help/indications/text/">https://remotexy.com/en/help/indications/text/</a><br /></p><div class="codebox"><pre><code>  // АЦП равен 204.8 на вольт при напряжении питания 5 Вольт
  double val = analogRead(A0) / 204.8; 
  dtostrf(val, 0, 2, RemoteXY.text_1); </code></pre></div><p>Так же можете посмотреть этот пример <a target="_blank" href="https://remotexy.com/ru/examples/temperature/">https://remotexy.com/ru/examples/temperature/</a></p>]]></description>
			<author><![CDATA[null@example.com (remotexy)]]></author>
			<pubDate>Mon, 26 Dec 2022 09:15:17 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=4932#p4932</guid>
		</item>
		<item>
			<title><![CDATA[Re: Индикация]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=4928#p4928</link>
			<description><![CDATA[<p>Внимание!Перед публикацией вашего сообщения необходимо исправить следующие ошибки:<br />[i— был открыт внутри себя, это недопустимо</p><br /><p>Не получается отправить код, каждый раз появляется такая информация на экране</p>]]></description>
			<author><![CDATA[null@example.com (xxbaykov)]]></author>
			<pubDate>Fri, 23 Dec 2022 18:25:40 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=4928#p4928</guid>
		</item>
		<item>
			<title><![CDATA[Re: Индикация]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=4927#p4927</link>
			<description><![CDATA[<div class="quotebox"><cite>xxbaykov wrote:</cite><blockquote><p>Обычно получается вывести только целые числа.</p></blockquote></div><p>If you are already able to do this, then just follow the already simple example given to replace your normal print output with</p><div class="codebox"><pre><code>dtostrf()</code></pre></div><p>Perhaps... Show us what you DO have working so someone can better explain with what you already know.</p><p>Select and enclose your posted code using the editing button &lt;&gt; to make it easier for us to follow along.</p>]]></description>
			<author><![CDATA[null@example.com (Gunner)]]></author>
			<pubDate>Fri, 23 Dec 2022 01:57:56 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=4927#p4927</guid>
		</item>
		<item>
			<title><![CDATA[Re: Индикация]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=4926#p4926</link>
			<description><![CDATA[<p>Добрый вечер! я очень далек от программирования. Прошу Вас показать пример простейшей программы программы с выводом на экран телефона текстовой индикации с десятыми долями числа со&nbsp; входа А0 платы Wemos mini. Может с примера пойму куда вставить текст написанный Вами ранее. У меня пока ничего не получается. Спасибо</p>]]></description>
			<author><![CDATA[null@example.com (xxbaykov)]]></author>
			<pubDate>Thu, 22 Dec 2022 16:44:26 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=4926#p4926</guid>
		</item>
		<item>
			<title><![CDATA[Re: Индикация]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=4906#p4906</link>
			<description><![CDATA[<p>Посмотрите документацию, там есть примеры как это можно сделать <br /><a target="_blank" href="https://remotexy.com/en/help/indications/text/">https://remotexy.com/en/help/indications/text/</a><br /></p><div class="codebox"><pre><code>  double val = 1234.321;
  dtostrf(val, 0, 2, RemoteXY.text_1); // result: &quot;1234.32&quot;</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (remotexy)]]></author>
			<pubDate>Sat, 17 Dec 2022 09:03:46 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=4906#p4906</guid>
		</item>
		<item>
			<title><![CDATA[Индикация]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=4902#p4902</link>
			<description><![CDATA[<p>Подскажите как выполнить текстовую индикацию в проекте с отображением десятых и сотых долей? Обычно получается вывести только целые числа. Необходимо вывести показания датчика давления воды через ESP8266 на телефон с использованием программы FLProg</p>]]></description>
			<author><![CDATA[null@example.com (xxbaykov)]]></author>
			<pubDate>Tue, 13 Dec 2022 07:51:32 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=4902#p4902</guid>
		</item>
	</channel>
</rss>
