<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[RemoteXY community — под ESP32 не компилируется код ESP8266]]></title>
		<link>https://forum.remotexy.com/viewtopic.php?id=1448</link>
		<atom:link href="https://forum.remotexy.com/extern.php?action=feed&amp;tid=1448&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in под ESP32 не компилируется код ESP8266.]]></description>
		<lastBuildDate>Wed, 12 Jan 2022 08:12:07 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: под ESP32 не компилируется код ESP8266]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=4470#p4470</link>
			<description><![CDATA[<div class="quotebox"><cite>remotexy wrote:</cite><blockquote><p>.</p></blockquote></div><p>спасибо. уже догадался))<br /></p><div class="codebox"><pre><code>void Wheel (unsigned char * motor, int v)
{
  if (v&gt;100) v=100;
  if (v&lt;-100) v=-100;
  int x = v*2.55;
  if (v&gt;0) { digitalWrite(motor[0], HIGH); digitalWrite(motor[1], LOW); analogWrite(motor[2], x); }
  else if (v&lt;0) { digitalWrite(motor[0], LOW); digitalWrite(motor[1], HIGH); analogWrite(motor[2], -x); }
  else { digitalWrite(motor[0], LOW); digitalWrite(motor[1], LOW); analogWrite(motor[2], 0); }
}</code></pre></div><p>еще раз спасибо за помощь</p>]]></description>
			<author><![CDATA[null@example.com (denisfefelov)]]></author>
			<pubDate>Wed, 12 Jan 2022 08:12:07 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=4470#p4470</guid>
		</item>
		<item>
			<title><![CDATA[Re: под ESP32 не компилируется код ESP8266]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=4469#p4469</link>
			<description><![CDATA[<div class="codebox"><pre><code>void Wheel (unsigned char * motor, int v)
{
  if (v&gt;100) v=100;
  if (v&lt;-100) v=-100;
 
  int k = v * 2.55;

  if (v&gt;0) {
    digitalWrite(motor[0], HIGH);
    digitalWrite(motor[1], LOW);
    analogWrite(motor[2], k);
  }
  else if (v&lt;0) {
    digitalWrite(motor[0], LOW);
    digitalWrite(motor[1], HIGH);
    analogWrite(motor[2], -k);
  }
  else {
    digitalWrite(motor[0], LOW);
    digitalWrite(motor[1], LOW);
    analogWrite(motor[2], 0);
  }
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (remotexy)]]></author>
			<pubDate>Wed, 12 Jan 2022 07:55:36 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=4469#p4469</guid>
		</item>
		<item>
			<title><![CDATA[Re: под ESP32 не компилируется код ESP8266]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=4468#p4468</link>
			<description><![CDATA[<div class="quotebox"><cite>remotexy wrote:</cite><blockquote><p>Попробуйте заменить везде в коде где вызывается analogWrite<br /></p><div class="codebox"><pre><code>//analogWrite(motor[2], v*2.55);
analogWrite(motor[2], (int)(v*2.55));</code></pre></div></blockquote></div><p>вот так <br /></p><div class="codebox"><pre><code>void Wheel (unsigned char * motor, int v)
{
  if (v&gt;100) v=100;
  if (v&lt;-100) v=-100;
  if (v&gt;0) {
    digitalWrite(motor[0], HIGH);
    digitalWrite(motor[1], LOW);
    analogWrite(motor[2], v);
  }
  else if (v&lt;0) {
    digitalWrite(motor[0], LOW);
    digitalWrite(motor[1], HIGH);
    analogWrite(motor[2], -v);
  }
  else {
    digitalWrite(motor[0], LOW);
    digitalWrite(motor[1], LOW);
    analogWrite(motor[2], 0);
  }
}</code></pre></div><p>скомпиллировало<br />как теперь из 0-100 сделать 0-255?</p>]]></description>
			<author><![CDATA[null@example.com (denisfefelov)]]></author>
			<pubDate>Wed, 12 Jan 2022 07:41:20 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=4468#p4468</guid>
		</item>
		<item>
			<title><![CDATA[Re: под ESP32 не компилируется код ESP8266]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=4467#p4467</link>
			<description><![CDATA[<div class="quotebox"><cite>remotexy wrote:</cite><blockquote><p>Попробуйте заменить везде в коде где вызывается analogWrite<br /></p><div class="codebox"><pre><code>//analogWrite(motor[2], v*2.55);
analogWrite(motor[2], (int)(v*2.55));</code></pre></div></blockquote></div><p>Не помогло…</p>]]></description>
			<author><![CDATA[null@example.com (denisfefelov)]]></author>
			<pubDate>Wed, 12 Jan 2022 03:37:55 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=4467#p4467</guid>
		</item>
		<item>
			<title><![CDATA[Re: под ESP32 не компилируется код ESP8266]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=4466#p4466</link>
			<description><![CDATA[<p>Попробуйте заменить везде в коде где вызывается analogWrite<br /></p><div class="codebox"><pre><code>//analogWrite(motor[2], v*2.55);
analogWrite(motor[2], (int)(v*2.55));</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (remotexy)]]></author>
			<pubDate>Wed, 12 Jan 2022 03:23:26 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=4466#p4466</guid>
		</item>
		<item>
			<title><![CDATA[Re: под ESP32 не компилируется код ESP8266]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=4465#p4465</link>
			<description><![CDATA[<div class="quotebox"><cite>remotexy wrote:</cite><blockquote><p>.</p></blockquote></div><p> пожалуйста, помогите решить проблему</p>]]></description>
			<author><![CDATA[null@example.com (denisfefelov)]]></author>
			<pubDate>Wed, 12 Jan 2022 02:58:23 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=4465#p4465</guid>
		</item>
		<item>
			<title><![CDATA[Re: под ESP32 не компилируется код ESP8266]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=4463#p4463</link>
			<description><![CDATA[<p>Я в программировании прям новичек. Две недели назад купил первую плату... что он хочет от меня?</p>]]></description>
			<author><![CDATA[null@example.com (denisfefelov)]]></author>
			<pubDate>Wed, 12 Jan 2022 02:02:15 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=4463#p4463</guid>
		</item>
		<item>
			<title><![CDATA[под ESP32 не компилируется код ESP8266]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=4461#p4461</link>
			<description><![CDATA[<p>Всем привет. Проблема такая - один и тот же код (за исключением библиотек под разные платы) нормально компилируется под плату ESP8266 и не компилируется под плату ESP 32.<br />копипаст ошибки<br />C:\Users\DNS\Documents\Arduino\sketch\remotexy\t34_driver.ino\t34_driver.ino.ino: In function &#039;void Wheel(unsigned char*, int)&#039;:<br />t34_driver.ino:188:106: error: call of overloaded &#039;analogWrite(unsigned char&amp;, double)&#039; is ambiguous<br />&nbsp; &nbsp; &nbsp; &nbsp; if (v&gt;0) { digitalWrite(motor[0], HIGH); digitalWrite(motor[1], LOW); analogWrite(motor[2], v*2.55); }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ^<br />In file included from C:\Users\DNS\Documents\ArduinoData\packages\esp32\hardware\esp32\2.0.2\cores\esp32/Arduino.h:36,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;from sketch\t34_driver.ino.ino.cpp:1:<br />C:\Users\DNS\Documents\ArduinoData\packages\esp32\hardware\esp32\2.0.2\cores\esp32/esp32-hal.h:93:6: note: candidate: &#039;void analogWrite(uint8_t, int)&#039;<br /> void analogWrite(uint8_t pin, int value);<br />&nbsp; &nbsp; &nbsp; ^~~~~~~~~~~<br />In file included from C:\Users\DNS\Documents\Arduino\libraries\ESP32Servo\src/ESP32Servo.h:67,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;from C:\Users\DNS\Documents\Arduino\sketch\remotexy\t34_driver.ino\t34_driver.ino.ino:26:<br />C:\Users\DNS\Documents\Arduino\libraries\ESP32Servo\src/analogWrite.h:9:8: note: candidate: &#039;void analogWrite(uint8_t, uint16_t)&#039;<br />&nbsp; &nbsp;void analogWrite( uint8_t APin, uint16_t AValue );<br />&nbsp; &nbsp; &nbsp; &nbsp; ^~~~~~~~~~~<br />t34_driver.ino:189:109: error: call of overloaded &#039;analogWrite(unsigned char&amp;, double)&#039; is ambiguous<br />&nbsp; &nbsp;else if (v&lt;0) { digitalWrite(motor[0], LOW); digitalWrite(motor[1], HIGH); analogWrite(motor[2], (-v)*2.55); }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;^<br />In file included from C:\Users\DNS\Documents\ArduinoData\packages\esp32\hardware\esp32\2.0.2\cores\esp32/Arduino.h:36,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;from sketch\t34_driver.ino.ino.cpp:1:<br />C:\Users\DNS\Documents\ArduinoData\packages\esp32\hardware\esp32\2.0.2\cores\esp32/esp32-hal.h:93:6: note: candidate: &#039;void analogWrite(uint8_t, int)&#039;<br /> void analogWrite(uint8_t pin, int value);<br />&nbsp; &nbsp; &nbsp; ^~~~~~~~~~~<br />In file included from C:\Users\DNS\Documents\Arduino\libraries\ESP32Servo\src/ESP32Servo.h:67,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;from C:\Users\DNS\Documents\Arduino\sketch\remotexy\t34_driver.ino\t34_driver.ino.ino:26:<br />C:\Users\DNS\Documents\Arduino\libraries\ESP32Servo\src/analogWrite.h:9:8: note: candidate: &#039;void analogWrite(uint8_t, uint16_t)&#039;<br />&nbsp; &nbsp;void analogWrite( uint8_t APin, uint16_t AValue );<br />&nbsp; &nbsp; &nbsp; &nbsp; ^~~~~~~~~~~<br />C:\Users\DNS\Documents\Arduino\sketch\remotexy\t34_driver.ino\t34_driver.ino.ino: In function &#039;void setup()&#039;:<br />t34_driver.ino:196:3: error: &#039;RemoteXY_Init&#039; was not declared in this scope<br />&nbsp; &nbsp;RemoteXY_Init ();<br />&nbsp; &nbsp;^~~~~~~~~~~~~<br />C:\Users\DNS\Documents\Arduino\sketch\remotexy\t34_driver.ino\t34_driver.ino.ino:196:3: note: suggested alternative: &#039;RemoteXY_CONF&#039;<br />&nbsp; &nbsp;RemoteXY_Init ();<br />&nbsp; &nbsp;^~~~~~~~~~~~~<br />&nbsp; &nbsp;RemoteXY_CONF<br />In file included from C:\Users\DNS\Documents\Arduino\sketch\remotexy\t34_driver.ino\t34_driver.ino.ino:25:<br />C:\Users\DNS\Documents\Arduino\sketch\remotexy\t34_driver.ino\t34_driver.ino.ino: In function &#039;void loop()&#039;:<br />C:\Users\DNS\Documents\Arduino\libraries\RemoteXY\src/RemoteXY.h:151:28: error: &#039;remotexy&#039; was not declared in this scope<br /> #define RemoteXY_Handler() remotexy-&gt;handler ()<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ^~~~~~~~<br />C:\Users\DNS\Documents\Arduino\sketch\remotexy\t34_driver.ino\t34_driver.ino.ino:233:3: note: in expansion of macro &#039;RemoteXY_Handler&#039;<br />&nbsp; &nbsp;RemoteXY_Handler ();<br />&nbsp; &nbsp;^~~~~~~~~~~~~~~~<br />C:\Users\DNS\Documents\Arduino\libraries\RemoteXY\src/RemoteXY.h:151:28: note: suggested alternative: &#039;RemoteXY&#039;<br /> #define RemoteXY_Handler() remotexy-&gt;handler ()<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ^~~~~~~~<br />C:\Users\DNS\Documents\Arduino\sketch\remotexy\t34_driver.ino\t34_driver.ino.ino:233:3: note: in expansion of macro &#039;RemoteXY_Handler&#039;<br />&nbsp; &nbsp;RemoteXY_Handler ();<br />&nbsp; &nbsp;^~~~~~~~~~~~~~~~<br />exit status 1<br />call of overloaded &#039;analogWrite(unsigned char&amp;, double)&#039; is ambiguous</p>]]></description>
			<author><![CDATA[null@example.com (denisfefelov)]]></author>
			<pubDate>Wed, 12 Jan 2022 01:56:13 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=4461#p4461</guid>
		</item>
	</channel>
</rss>
