<?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[[SOLVED] Core2 - how to fix the error: call of overloaded &#x27;begin(int ....)&#x27; is ambiguous]]></title><description><![CDATA[<p dir="auto">When using the GitHub M5Unit_Encoder (with recently updated .cpp) I'm getting this call of overloaded error.</p>
<pre><code>.../Arduino/libraries/M5Unit-Encoder/src/Unit_Encoder.cpp: In member function 'void Unit_Encoder::begin(TwoWire*, uint8_t, uint8_t, uint8_t, uint32_t)':
.../OneDrive-Persoonlijk/Arduino/libraries/M5Unit-Encoder/src/Unit_Encoder.cpp:11:46: error: call of overloaded 'begin(int, int, uint8_t&amp;)' is ambiguous
     _wire-&gt;begin((int)_sda, (int)_scl, _speed);
                                              ^
In file included from .../Arduino/libraries/M5Unit-Encoder/src/Unit_Encoder.h:13,
                 from .../Arduino/libraries/M5Unit-Encoder/src/Unit_Encoder.cpp:1:
.../Library/Arduino15/packages/m5stack/hardware/esp32/2.0.4/libraries/Wire/src/Wire.h:79:10: note: candidate: 'bool TwoWire::begin(int, int, uint32_t)'
     bool begin(int sda=-1, int scl=-1, uint32_t frequency=0); // returns true, if successful init of i2c bus
          ^~~~~
.../Library/Arduino15/packages/m5stack/hardware/esp32/2.0.4/libraries/Wire/src/Wire.h:80:10: note: candidate: 'bool TwoWire::begin(uint8_t, int, int, uint32_t)'
     bool begin(uint8_t slaveAddr, int sda=-1, int scl=-1, uint32_t frequency=0);
          ^~~~~

exit status 1

Compilation error: exit status 1
</code></pre>
<p dir="auto">The author just edited the .ccp file because of this error. Somehow didn't work for me...<br />
It's obvious that something is wrong with the number of arguments, but I do not have the knowledge to figure out what to do to solve this.</p>
<p dir="auto">below the .ino (stripped to the basics)</p>
<pre><code class="language-#include">#include "Unit_Encoder.h"
Unit_Encoder encoder;

void setup() {
  M5.begin();       // Init M5Stack
  encoder.begin();  //sensor.begin(&amp;Wire) doesn't work
}

void loop() {
  //signed short int encoder_value = encoder.getEncoderValue();
  bool btn_status = encoder.getButtonStatus();

  if (!btn_status) {
    M5.Lcd.fillRect(20, 160, 30, 30, DARKGREY);
    M5.Lcd.setTextColor(YELLOW);
    M5.Lcd.setTextSize(1);
    M5.Lcd.drawString("button", 30, 180, 4);
  }
}
</code></pre>
]]></description><link>https://community.m5stack.com/topic/4663/solved-core2-how-to-fix-the-error-call-of-overloaded-begin-int-is-ambiguous</link><generator>RSS for Node</generator><lastBuildDate>Tue, 17 Mar 2026 12:36:53 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/4663.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 03 Oct 2022 10:26:38 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to [SOLVED] Core2 - how to fix the error: call of overloaded &#x27;begin(int ....)&#x27; is ambiguous on Wed, 05 Oct 2022 20:23:24 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/25910">@Marelli7</a></p>
<p dir="auto">you are welcome. I sounds like you are having fun. And thanks for reporting back. I am glad to hear you got it working to your liking.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/18845</link><guid isPermaLink="true">https://community.m5stack.com/post/18845</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Wed, 05 Oct 2022 20:23:24 GMT</pubDate></item><item><title><![CDATA[Reply to [SOLVED] Core2 - how to fix the error: call of overloaded &#x27;begin(int ....)&#x27; is ambiguous on Wed, 05 Oct 2022 20:16:05 GMT]]></title><description><![CDATA[<p dir="auto">Thanks again <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/4037">@felmue</a><br />
I appreciate these spot-on answers other then guessing what might be the cause (sorry).</p>
<p dir="auto">I wasn't aware of that and I noticed that my Mac was on another SSID. No I understand why 'it' asks to use the same SSID as my mac....</p>
<p dir="auto">FYI: I got my Unit_DDS running on the Core2, controlled by a rotary-encoder (HW-040) connected to the M5Stamp I/O. Both, DDS and I/O, on I2C. Completely useless, other than testing my oscilloscope and hearing loss and blowing a candle with 10Hz, but fun to build.</p>
<p dir="auto">groeten,<br />
Paul</p>
]]></description><link>https://community.m5stack.com/post/18843</link><guid isPermaLink="true">https://community.m5stack.com/post/18843</guid><dc:creator><![CDATA[Marelli7]]></dc:creator><pubDate>Wed, 05 Oct 2022 20:16:05 GMT</pubDate></item><item><title><![CDATA[Reply to [SOLVED] Core2 - how to fix the error: call of overloaded &#x27;begin(int ....)&#x27; is ambiguous on Wed, 05 Oct 2022 19:37:12 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/25910">@Marelli7</a></p>
<p dir="auto">the IDE version is quite old and as I understand no longer maintained. I don't think you can add unlisted units to it.</p>
<p dir="auto">When UIFlow firmware is burned and running on your M5Core2 use M5Burner to set SSID and password. It should then connect to your WiFi and the UIFlow (online) backend.</p>
<p dir="auto">UIFlow, running in the browser, also connects the the backend. You then type in the ID that is shown on the M5Core2 screen and the browser and the M5Core2 then talk to each other through the backend.</p>
<p dir="auto">Note: for that to work no USB connection is needed.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/18840</link><guid isPermaLink="true">https://community.m5stack.com/post/18840</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Wed, 05 Oct 2022 19:37:12 GMT</pubDate></item><item><title><![CDATA[Reply to [SOLVED] Core2 - how to fix the error: call of overloaded &#x27;begin(int ....)&#x27; is ambiguous on Wed, 05 Oct 2022 18:46:38 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/4037">@felmue</a> ...A Catch22</p>
<p dir="auto">Finally managed to get the M5Burner to do its job (needed a Burner beta version for the Mac .....why...)</p>
<p dir="auto">the IDE doesn't has the encoder unit listed in the Unit list when using the (+), but the IDE does connect to my Core2. And I don't know how to add unlisted Units to the IDE</p>
<p dir="auto">The web version has the Unit_Enoder but is unable to connect to the Core2 (using Chrome). Somehow I'm unable to select the port to be used. User ajb2k3 suggested to use the orange Terminal button. The terminal connects OK, but the UIFlow doesn't.</p>
]]></description><link>https://community.m5stack.com/post/18838</link><guid isPermaLink="true">https://community.m5stack.com/post/18838</guid><dc:creator><![CDATA[Marelli7]]></dc:creator><pubDate>Wed, 05 Oct 2022 18:46:38 GMT</pubDate></item><item><title><![CDATA[Reply to [SOLVED] Core2 - how to fix the error: call of overloaded &#x27;begin(int ....)&#x27; is ambiguous on Tue, 04 Oct 2022 08:32:18 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></p>
<p dir="auto">Thanks a lot!! Message "extio Connected" made my day. I already changed the I2C adresses, but the <code>(int)</code> did the trick.<br />
I was close to the point to give the Core2 some flying lessons.</p>
<p dir="auto">Next will be getting familiar with UIFlow</p>
<p dir="auto">let's close this topic</p>
]]></description><link>https://community.m5stack.com/post/18805</link><guid isPermaLink="true">https://community.m5stack.com/post/18805</guid><dc:creator><![CDATA[Marelli7]]></dc:creator><pubDate>Tue, 04 Oct 2022 08:32:18 GMT</pubDate></item><item><title><![CDATA[Reply to [SOLVED] Core2 - how to fix the error: call of overloaded &#x27;begin(int ....)&#x27; is ambiguous on Tue, 04 Oct 2022 01:50:56 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/25910">@Marelli7</a></p>
<p dir="auto">yes, you can use UIFlow and Arduino IDE alternately. UIFlow is just another ESP32 firmware.</p>
<p dir="auto">While those units use the same STM32 chip the firmware inside the STM32 chip is different.</p>
<p dir="auto">I do have the unit <a href="https://docs.m5stack.com/en/unit/extio2" target="_blank" rel="noopener noreferrer nofollow ugc">EXTIO2</a> (which uses the same internal STM32 firmware as <a href="https://docs.m5stack.com/en/stamp/stamp_io" target="_blank" rel="noopener noreferrer nofollow ugc">Stamp I/O</a>) and it works fine with my M5Core2 after adapting the M5Stack example for M5Core2 by replacing those two lines:</p>
<pre><code>#include &lt;M5Stack.h&gt;

while (!extio.begin(&amp;Wire, 21, 22, 0x45)) {
</code></pre>
<p dir="auto">with</p>
<pre><code>#include &lt;M5Core2.h&gt;

while (!extio.begin(&amp;Wire, 32, 33, 0x45)) {
</code></pre>
<p dir="auto">like you did.</p>
<p dir="auto">Note: Make sure you have installed the latest <a href="https://github.com/m5stack/M5Unit-EXTIO2" target="_blank" rel="noopener noreferrer nofollow ugc">M5Unit-EXTIO2 library</a>. It has been fixed as well for the I2C master slave issue, but the version number has not been increased. So you probably need to re-install it in your environment manually. If your installed version has this line</p>
<pre><code>_wire-&gt;begin((int)_sda, (int)_scl);
</code></pre>
<p dir="auto">then your version already has the fix. Note the two <code>(int)</code>.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/18799</link><guid isPermaLink="true">https://community.m5stack.com/post/18799</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Tue, 04 Oct 2022 01:50:56 GMT</pubDate></item><item><title><![CDATA[Reply to [SOLVED] Core2 - how to fix the error: call of overloaded &#x27;begin(int ....)&#x27; is ambiguous on Mon, 03 Oct 2022 20:52:39 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/4037">@felmue</a>,</p>
<p dir="auto">I'm not familiar with UIFlow (yet). Currently using Arduino IDE to program and maintain a dozen ESP32 Devkits.<br />
Can I use both UIFlow and Arduino IDE alternately?</p>
<p dir="auto">I cannot understand why my Unit_DDS runs fine on a Core2 and where it goes wrong using the encoder and Stamp I/O -using Arduino IDE. All 3 are using the STM32-chip.</p>
<p dir="auto">The lack of easy accessible I/O makes the Core2 less usable for me. That's why I first bought the Extend I/O (PCA9554PW) &gt; Not working. Then the I2C Encoder (not working) and Stamp I/O (not working). Quite frustrating.</p>
<p dir="auto">First I'll try the Encoder on an ESP32 or even an Uno to set the frequency of the DDS.</p>
]]></description><link>https://community.m5stack.com/post/18797</link><guid isPermaLink="true">https://community.m5stack.com/post/18797</guid><dc:creator><![CDATA[Marelli7]]></dc:creator><pubDate>Mon, 03 Oct 2022 20:52:39 GMT</pubDate></item><item><title><![CDATA[Reply to [SOLVED] Core2 - how to fix the error: call of overloaded &#x27;begin(int ....)&#x27; is ambiguous on Mon, 03 Oct 2022 20:02:46 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/25910">@Marelli7</a></p>
<p dir="auto">hmm, not sure what's going on.</p>
<p dir="auto">Could you try installing UIFlow firmware (using <a href="https://docs.m5stack.com/en/download" target="_blank" rel="noopener noreferrer nofollow ugc">M5Burner</a>) onto your M5Core2 and then use <a href="https://flow.m5stack.com/" target="_blank" rel="noopener noreferrer nofollow ugc">UIFlow</a> online? I've checked and the Encoder Unit is available for M5Core2. That would tell us that the hardware and setup is ok.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/18796</link><guid isPermaLink="true">https://community.m5stack.com/post/18796</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Mon, 03 Oct 2022 20:02:46 GMT</pubDate></item><item><title><![CDATA[Reply to [SOLVED] Core2 - how to fix the error: call of overloaded &#x27;begin(int ....)&#x27; is ambiguous on Mon, 03 Oct 2022 19:58:26 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/25910">@marelli7</a> Hi!<br />
I set up my Core2 with a M5Stack ENVII sensor with this simple program...and it works fine.<br />
#include &lt;Wire.h&gt;<br />
#include  &lt;M5Core2.h&gt;<br />
#include &lt;SHT3X.h&gt;<br />
SHT3X sht30;<br />
float tempC = 12.3;</p>
<p dir="auto">void setup() {<br />
Wire.begin(32, 33); //SDA, SCL for Core 2 and Stamp PICO<br />
Serial.begin(115200);<br />
delay(1000);<br />
Serial.println("Setup " );<br />
}<br />
void loop() {<br />
if (sht30.get() == 0)<br />
{<br />
tempC = sht30.cTemp;<br />
}<br />
delay(1000);<br />
Serial.print("Temp= " );<br />
Serial.println(tempC, 1);<br />
}</p>
<p dir="auto">I realize that the ENVII does not use sensor.begin(), but I just wanted to say that Wire.begin(32, 33);  works with Core2 and an I2C sensor.<br />
Hope this helps!</p>
]]></description><link>https://community.m5stack.com/post/18795</link><guid isPermaLink="true">https://community.m5stack.com/post/18795</guid><dc:creator><![CDATA[teastain]]></dc:creator><pubDate>Mon, 03 Oct 2022 19:58:26 GMT</pubDate></item><item><title><![CDATA[Reply to [SOLVED] Core2 - how to fix the error: call of overloaded &#x27;begin(int ....)&#x27; is ambiguous on Mon, 03 Oct 2022 19:53:41 GMT]]></title><description><![CDATA[<p dir="auto">It's getting worse: same issue using the M5Stamp_I/O:<br />
connected an HW-040 (rotary encoder module) to the M5Stamp I/O.<br />
WireScan.ino found address 0x45.</p>
<pre><code>while (!extio.begin(&amp;Wire, 32, 33, 0x45)) {  //I2C was 21,22 for Core 2 32,33
    //Serial.println("extio Connect Error");
    M5.Lcd.drawString("extio Connect Error", 0, 0, 4);
    while (1) {}
  }
</code></pre>
<p dir="auto">Core2 display shows: <strong>extio Connect Error</strong></p>
<p dir="auto">BTW: The Unit_DDS function generator with an STM32 works fine connected to the Core2.</p>
]]></description><link>https://community.m5stack.com/post/18794</link><guid isPermaLink="true">https://community.m5stack.com/post/18794</guid><dc:creator><![CDATA[Marelli7]]></dc:creator><pubDate>Mon, 03 Oct 2022 19:53:41 GMT</pubDate></item><item><title><![CDATA[Reply to [SOLVED] Core2 - how to fix the error: call of overloaded &#x27;begin(int ....)&#x27; is ambiguous on Mon, 03 Oct 2022 18:48:47 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/4037">@felmue</a>,</p>
<p dir="auto">Arduino IDE 2.0.0 current settings:<br />
<img src="/assets/uploads/files/1664821689530-core2.jpg" alt="0_1664821688430_Core2.jpg" class=" img-fluid img-markdown" /></p>
<p dir="auto">No luck using <code>sensor.begin(&amp;Wire, 0x40, 32, 33);</code></p>
]]></description><link>https://community.m5stack.com/post/18793</link><guid isPermaLink="true">https://community.m5stack.com/post/18793</guid><dc:creator><![CDATA[Marelli7]]></dc:creator><pubDate>Mon, 03 Oct 2022 18:48:47 GMT</pubDate></item><item><title><![CDATA[Reply to [SOLVED] Core2 - how to fix the error: call of overloaded &#x27;begin(int ....)&#x27; is ambiguous on Mon, 03 Oct 2022 16:30:06 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/25910">@Marelli7</a></p>
<p dir="auto">ok, for some reason the compiler / linker thinks you are using an M5Stack. Is there a way you can select the board you are using? It should be M5Core2.</p>
<p dir="auto">Alternatively you can try to force it to use the correct GPIOs for M5Core2 by replacing this line:</p>
<pre><code>    sensor.begin();
</code></pre>
<p dir="auto">with</p>
<pre><code>    sensor.begin(&amp;Wire, 0x40, 32, 33);
</code></pre>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/18792</link><guid isPermaLink="true">https://community.m5stack.com/post/18792</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Mon, 03 Oct 2022 16:30:06 GMT</pubDate></item><item><title><![CDATA[Reply to [SOLVED] Core2 - how to fix the error: call of overloaded &#x27;begin(int ....)&#x27; is ambiguous on Mon, 03 Oct 2022 15:53:55 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></p>
<pre><code>SDA: 21 SCL: 22
_sda: 21 _scl: 22
</code></pre>
<p dir="auto">The sticker on bottom of the Core2 :<br />
<img src="/assets/uploads/files/1664812422143-45b23e0b-b792-468a-8321-9e7f07f4285b-afbeelding-resized.png" alt="0_1664812413941_45b23e0b-b792-468a-8321-9e7f07f4285b-afbeelding.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.m5stack.com/post/18791</link><guid isPermaLink="true">https://community.m5stack.com/post/18791</guid><dc:creator><![CDATA[Marelli7]]></dc:creator><pubDate>Mon, 03 Oct 2022 15:53:55 GMT</pubDate></item><item><title><![CDATA[Reply to [SOLVED] Core2 - how to fix the error: call of overloaded &#x27;begin(int ....)&#x27; is ambiguous on Mon, 03 Oct 2022 15:40:17 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/25910">@Marelli7</a></p>
<p dir="auto">after burning the modified application and attaching the debug window try resetting your M5Core2 (button next to the SD card slot). The debug output probably happens before the debug window has reattached. Alternatively add a <code>delay()</code> of a couple of seconds before those lines.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/18790</link><guid isPermaLink="true">https://community.m5stack.com/post/18790</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Mon, 03 Oct 2022 15:40:17 GMT</pubDate></item><item><title><![CDATA[Reply to [SOLVED] Core2 - how to fix the error: call of overloaded &#x27;begin(int ....)&#x27; is ambiguous on Mon, 03 Oct 2022 15:19:50 GMT]]></title><description><![CDATA[<p dir="auto">I added these lines to the .cpp file, but there is no related output on the Serial Monitor.</p>
<pre><code>    _sda   = sda;
    _scl   = scl;
    _speed = speed;
	Serial.printf("SDA: %d SCL: %d\n", SDA, SCL);
	Serial.printf("_sda: %d _scl: %d\n", _sda, _scl);
    _wire-&gt;begin((int)_sda, (int)_scl, _speed);
</code></pre>
<p dir="auto">Any other tips to get these GPIO's displayed?</p>
<p dir="auto">No worries. I'll do the testing for you.</p>
]]></description><link>https://community.m5stack.com/post/18789</link><guid isPermaLink="true">https://community.m5stack.com/post/18789</guid><dc:creator><![CDATA[Marelli7]]></dc:creator><pubDate>Mon, 03 Oct 2022 15:19:50 GMT</pubDate></item><item><title><![CDATA[Reply to [SOLVED] Core2 - how to fix the error: call of overloaded &#x27;begin(int ....)&#x27; is ambiguous on Mon, 03 Oct 2022 14:57:12 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/25910">@Marelli7</a></p>
<p dir="auto">hmm, since the example was for M5Stack I am wondering if the correct GPIOs are defined for the external I2C on port A. (M5Stack uses 21 and 22 whereas M5Core2 uses 32 and 33.)<br />
Could you try to add the following lines just before <code>_wire-&gt;begin((int)_sda, (int)_scl, _speed);</code> in <code>Unit_Encoder.cpp</code>:</p>
<pre><code>Serial.printf("SDA: %d SCL: %d\n", SDA, SCL);
Serial.printf("_sda: %d _scl: %d\n", _sda, _scl);
</code></pre>
<p dir="auto">then post the debug output here? Both SDA and _sda should be 32 and both SCL and _scl should be 33.</p>
<p dir="auto">Thanks<br />
Felix</p>
<p dir="auto">P.S. I do not have the Encoder hardware, so I cannot test this myself, sorry.</p>
]]></description><link>https://community.m5stack.com/post/18788</link><guid isPermaLink="true">https://community.m5stack.com/post/18788</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Mon, 03 Oct 2022 14:57:12 GMT</pubDate></item><item><title><![CDATA[Reply to [SOLVED] Core2 - how to fix the error: call of overloaded &#x27;begin(int ....)&#x27; is ambiguous on Mon, 03 Oct 2022 13:49:11 GMT]]></title><description><![CDATA[<p dir="auto">Hello Felix,</p>
<p dir="auto">Thanks for the quick reply, that part is solved! Compiled and runs on the Core2 !! (even without the <code>#include "pins_arduino.h"</code>)<br />
but... something else is wrong too I guess.<br />
The encoder doesn't return any values (value = -1) and the LED's do not respond to setLEDColor(). I2C-scan shows correct address 0x40 meaning the STM32F0 is found on the I2C-bus.<br />
Done testing with a slightly modified example (stauts replaced by status ... I'm a dislect too ;-)</p>
<pre><code>void loop() {
  signed short int encoder_value = sensor.getEncoderValue();
  bool btn_status = sensor.getButtonStatus();
  Serial.println(encoder_value);
  if (last_value != encoder_value) {
    if (last_value &gt; encoder_value) {
      sensor.setLEDColor(1, 0x000011);
    } else {
      sensor.setLEDColor(2, 0x111100);
    }
    last_value = encoder_value;
  } else {
    sensor.setLEDColor(0, 0x001100);
  }
  if (!btn_status) {
    sensor.setLEDColor(0, 0xC800FF);
  }
  M5.Lcd.fillRect(00, 00, 160, 70, DARKGREY);   //overwrite text
  M5.Lcd.setTextColor(YELLOW);
  M5.Lcd.setTextSize(1);
  M5.Lcd.drawString("button  " + String(btn_status), 10, 10, 4);
  M5.Lcd.drawString("encoder " + String(encoder_value), 10, 40, 4);
  delay(20);
} 
</code></pre>
<p dir="auto">Regards,<br />
Paul</p>
]]></description><link>https://community.m5stack.com/post/18787</link><guid isPermaLink="true">https://community.m5stack.com/post/18787</guid><dc:creator><![CDATA[Marelli7]]></dc:creator><pubDate>Mon, 03 Oct 2022 13:49:11 GMT</pubDate></item><item><title><![CDATA[Reply to [SOLVED] Core2 - how to fix the error: call of overloaded &#x27;begin(int ....)&#x27; is ambiguous on Mon, 03 Oct 2022 11:32:06 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/25910">@Marelli7</a></p>
<p dir="auto">thank you for reporting this error. We tried to fix some stuff regarding I2C master / slave but it looks like the Encoder library needs an additional fix.<br />
In <code>M5Unit-Encoder/src/Unit_Encoder.h</code> try replacing:</p>
<pre><code>    uint8_t _speed;
</code></pre>
<p dir="auto">with</p>
<pre><code>    uint32_t _speed;
</code></pre>
<p dir="auto">BTW: I made a <a href="https://github.com/m5stack/M5Unit-Encoder/pull/4" target="_blank" rel="noopener noreferrer nofollow ugc">pull-request</a> to fix issue in the library.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/18785</link><guid isPermaLink="true">https://community.m5stack.com/post/18785</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Mon, 03 Oct 2022 11:32:06 GMT</pubDate></item></channel></rss>