# MKR IoT Carrier button issues with case on

**URL:** <https://forum.arduino.cc/t/mkr-iot-carrier-button-issues-with-case-on/684581>\
**Category:** MKR Shields\
**Created:** [November 27, 2020, 3:40pm UTC](https://forum.arduino.cc/t/mkr-iot-carrier-button-issues-with-case-on/684581 "2020-11-27T15:40:09Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![wahur666](https://avatars.discourse-cdn.com/v4/letter/w/e9c0ed/32.png) [@wahur666](https://forum.arduino.cc/u/wahur666)\
**Post date:** [November 27, 2020, 3:40pm UTC](https://forum.arduino.cc/t/mkr-iot-carrier-button-issues-with-case-on/684581/1 "2020-11-27T15:40:09Z")

</div>

Hi,

I started to go through the tutorial material for the Opla Kit, which is a MKR Wifi 1010 and a MKR IoT Carrier, and came across the following issue:

When the case is on, the buttons does not work reliably at all. You can check it on the linked video: [Arduino, MKR IoT Carrier issue - YouTube](https://youtu.be/DvMQQ5jyZbc)

Here is the relevant code snippet.

```cpp
#include <Arduino_MKRIoTCarrier.h>
#include "arduino_secrets.h"
#include <WiFiNINA.h>
MKRIoTCarrier carrier;
bool CARRIER_CASE = true;

float temperature = 0;
float humidity = 0;
int r = 0;
char ssid[] = SECRET_SSID;
char pass[] = SECRET_PASS;
int status = WL_IDLE_STATUS;

void setup() {
  Serial.begin(9600);
  //Wait to open the Serial monitor to start the program and see details on errors
  while (!Serial);

  //Initialize the IoTSK carrier and output any errors in the serial monitor
  carrier.begin();
  carrier.display.setRotation(0);

  String fv = WiFi.firmwareVersion();
  Serial.print("Firmware verison: ");
  Serial.println(fv);

  while (status != WL_CONNECTED)
  {
    Serial.print("Attempting to connect to network: ");
    Serial.println(ssid);
    status = WiFi.begin(ssid, pass);
    delay(10000);
    Serial.println(status);
    printConnectionStatus();
  }
  

}

void printTemperature() {
  //configuring display, setting background color, text size and text color
  carrier.display.fillScreen(ST77XX_RED); //red background
  carrier.display.setTextColor(ST77XX_WHITE); //white text
  carrier.display.setTextSize(2); //medium sized text

  carrier.display.setCursor(30, 110); //sets position for printing (x and y)
  carrier.display.print("Temp: ");
  carrier.display.print(temperature);
  carrier.display.println(" C");
  carrier.display.print("R:");
  carrier.display.println(r);
}

void printHumidity() {
  //configuring display, setting background color, text size and text color
  carrier.display.fillScreen(ST77XX_BLUE); //red background
  carrier.display.setTextColor(ST77XX_WHITE); //white text
  carrier.display.setTextSize(2); //medium sized text

  carrier.display.setCursor(30, 110); //sets new position for printing (x and y)
  carrier.display.print("Humi: ");
  carrier.display.print(humidity);
  carrier.display.println(" %");
}

void printConnectionStatus() {
  //configuring display, setting background color, text size and text color
  carrier.display.fillScreen(ST77XX_PTLAR); //red background
  carrier.display.setTextColor(ST77XX_WHITE); //white text
  carrier.display.setTextSize(2); //medium sized text

  carrier.display.setCursor(30, 110); //sets new position for printing (x and y)
  carrier.display.print("Status: ");
  carrier.display.println("Connected");
  carrier.display.setCursor(30, 150);
  carrier.display.println(WiFi.localIP());

}

void loop() {
  // read the sensor values
  temperature = carrier.Env.readTemperature();
  humidity = carrier.Env.readHumidity();

  //Update touch buttons
  carrier.Buttons.update();

  // print each of the sensor values
  Serial.print("Temperature = ");
  Serial.print(temperature);
  Serial.println(" °C");

  Serial.print("Humidity = ");
  Serial.print(humidity);
  Serial.println(" %");

  //function to print out values
  if (carrier.Button1.onTouchDown()) {
    printTemperature();
    r++;
  }

  if (carrier.Button2.onTouchDown()) {
    printHumidity();
  }

  if (carrier.Button3.onTouchDown()) {
    printConnectionStatus();
  }
}

```

Is this a normal occurance, or my board is faulty? I bought it last week, delivered in the last two days.

Thanks for the help.

---

<div class="post-metadata">

**Author:** ![greenmeanie](https://avatars.discourse-cdn.com/v4/letter/g/a587f6/32.png) [@greenmeanie](https://forum.arduino.cc/u/greenmeanie)\
**Post date:** [December 6, 2020, 8:00am UTC](https://forum.arduino.cc/t/mkr-iot-carrier-button-issues-with-case-on/684581/2 "2020-12-06T08:00:52Z")

</div>

I'm encountering a similar problem with using the buttons with the case on. When I have the case off and set `CARRIER_CASE = false`, then the 5 buttons work as expected. When I have the case on and set `CARRIER_CASE = true`, then 3 buttons work as expected, 1 generates spurious touches, and 1 doesn't respond to touches at all. I've tried using `carrier.Buttons.updateConfig()` to adjust the sensitivity, but there doesn't seem to be a sensitivity level that allows all 5 buttons to work as expected with the case on. Did you end up finding a solution to this problem?

---

<div class="post-metadata">

**Author:** ![mdecuire](https://avatars.discourse-cdn.com/v4/letter/m/ecccb3/32.png) [@mdecuire](https://forum.arduino.cc/u/mdecuire)\
**Post date:** [December 20, 2020, 9:09am UTC](https://forum.arduino.cc/t/mkr-iot-carrier-button-issues-with-case-on/684581/3 "2020-12-20T09:09:56Z")

</div>

I just finished the Inventory Project and I'm having a similar issue.

To be specific:

- CASE OFF: w/o case I'm able to get the board to start up and run the 'inventory project' code. However the buttons require double or triple touches in order for them to responnd.
- CASE ON: w/ case on same touch-response issue persists and sometimes the project code won't run.

It seems a number of folks have had similar issues with the Opla kit not being that touch sensitive or perhaps I'm doing something wrong.

---

<div class="post-metadata">

**Author:** ![Ballscrewbob](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/ballscrewbob/32/950458_2.png) [@Ballscrewbob](https://forum.arduino.cc/u/Ballscrewbob)\
**Post date:** [December 20, 2020, 2:31pm UTC](https://forum.arduino.cc/t/mkr-iot-carrier-button-issues-with-case-on/684581/4 "2020-12-20T14:31:32Z")

</div>

I will raise this issue to the correct people.  
Monday will be the earliest response time.

Bob.

---

<div class="post-metadata">

**Author:** ![Theresed](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/theresed/32/243321_2.png) [@Theresed](https://forum.arduino.cc/u/Theresed)\
**Post date:** [December 21, 2020, 12:51pm UTC](https://forum.arduino.cc/t/mkr-iot-carrier-button-issues-with-case-on/684581/5 "2020-12-21T12:51:36Z")

</div>

Hi,

Try to calibrate the sensitivity threshold with the built in example from the library:

_Examples -\> From Libraries, Arduino MKRIoTCarrier -\> TouchPads -\> Custom\_Sensitivity_

Start with 4, which is the default value for when the case is used, and increase or decrease to find a value that works for your setup.

If you need further troubleshooting, you're always welcome to contact us through our contact form: [https://www.arduino.cc/en/contact-us/](https://www.arduino.cc/en/contact-us/)

/Therese

---

<div class="post-metadata">

**Author:** ![machthree](https://avatars.discourse-cdn.com/v4/letter/m/e274bd/32.png) [@machthree](https://forum.arduino.cc/u/machthree)\
**Post date:** [December 30, 2020, 9:48am UTC](https://forum.arduino.cc/t/mkr-iot-carrier-button-issues-with-case-on/684581/6 "2020-12-30T09:48:42Z")

</div>

I have the same problem: I cannot find a threshold that makes all buttons work reliably. With my board, one button appears much more sensitive than the others. If I reduce the threshold to a level where the majority of the buttons on the board work, the one button that is more sensitive will register spurious touches (usually quite rapidly). This problem occurs whether the board is in the case or out of it (with different threshold levels obviously).

I assume there is some manufacturing variance that is causing this on some boards' buttons.

I have registered a support request at [https://www.arduino.cc/en/contact-us/](https://www.arduino.cc/en/contact-us/) some days ago but have yet to hear back but given this is a holiday period I guess I will have to be patient.

---

<div class="post-metadata">

**Author:** ![Ballscrewbob](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/ballscrewbob/32/950458_2.png) [@Ballscrewbob](https://forum.arduino.cc/u/Ballscrewbob)\
**Post date:** [December 30, 2020, 2:03pm UTC](https://forum.arduino.cc/t/mkr-iot-carrier-button-issues-with-case-on/684581/7 "2020-12-30T14:03:15Z")

</div>

@machthree

Yes the European holidays tend to be a bit longer so please be patient for your support request.  
I am sure there may also be a slight backlog to get through too when they come back.

Bob.

---

<div class="post-metadata">

**Author:** ![jeniara](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/jeniara/32/543987_2.png) [@jeniara](https://forum.arduino.cc/u/jeniara)\
**Post date:** [January 17, 2021, 8:12am UTC](https://forum.arduino.cc/t/mkr-iot-carrier-button-issues-with-case-on/684581/8 "2021-01-17T08:12:16Z")

</div>

Same here, the buttons does not have a common sensitivity. With CARRIER\_CASE = true, button0 and button1 require several attempts, button 3 spontaneous reacts without touching, button2 and button4 working as expected...

I see at Github [Arduino\_MKRIoTCarrier/src at master · arduino-libraries/Arduino\_MKRIoTCarrier (github.com)](https://github.com/arduino-libraries/Arduino_MKRIoTCarrier/tree/master/src) that in the Arduino\_MKRIoTCarrier\_Qtouch.h there was an update "Added touch sensitivity for each button". I assume that this would make it possible to set individual sensitivity to the buttons, but I'm not skilled enough to understand from reading the code in the library how to use it... yet...

Maybe someone can give an example?

---

<div class="post-metadata">

**Author:** ![dhooge](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/dhooge/32/232287_2.png) [@dhooge](https://forum.arduino.cc/u/dhooge)\
**Post date:** [February 15, 2021, 3:09pm UTC](https://forum.arduino.cc/t/mkr-iot-carrier-button-issues-with-case-on/684581/9 "2021-02-15T15:09:12Z")

</div>

Opla IOT carrier Buttons problem  
I have the same problem: I cannot find a threshold that makes all the buttons work reliably. With my board, one button (4) appears much more sensitive than the others. Button 0 doesn't work at all with the case on.

Can Arduino provide a solution? There seem to be a lot users that have the same problem.  
You can't do any serious project that uses the buttons if you use the case.

Please help. :o

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![PMarquinez](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/pmarquinez/32/942592_2.png) [@PMarquinez](https://forum.arduino.cc/u/PMarquinez)\
**Post date:** [February 16, 2021, 3:38pm UTC](https://forum.arduino.cc/t/mkr-iot-carrier-button-issues-with-case-on/684581/10 "2021-02-16T15:38:35Z")

</div>

Hey you all!  
I'm working with the Carrier's library, thanks for the feedback!

So as my colleague said in #4

> Theresed:  
> Hi,
> 
> Try to calibrate the sensitivity threshold with the built in example from the library:
> 
> _Examples -\> From Libraries, Arduino MKRIoTCarrier -\> TouchPads -\> Custom\_Sensitivity_
> 
> Start with 4, which is the default value for when the case is used, and increase or decrease to find a value that works for your setup.
> 
> If you need further troubleshooting, you're always welcome to contact us through our contact form: [https://www.arduino.cc/en/contact-us/](https://www.arduino.cc/en/contact-us/)
> 
> /Therese

You have the example that shows how to change the thresholds at  
[Arduino\_MKRIoTCarrier/Custom\_Sensitivity.ino at master](https://github.com/arduino-libraries/Arduino_MKRIoTCarrier/blob/master/examples/TouchPads/Custom_Sensitivity/Custom_Sensitivity.ino#L20)

You will need to set the custom values before carrier.begin()  
Remember that 3 is the maximum (Further) and the minimum 100(closer)

To apply a value you need to set it in the sketch, and upload it to the board to make the changes

If you have any issue, check if you have the lastest updates (today's versions):  
Arduino\_MKRIoTCarrier 0.9.9  
Arduino\_MCHPTouch 1.1.0

Let me know if it worked for you, have a nice one!

/Pablo

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [June 16, 2021, 3:39pm UTC](https://forum.arduino.cc/t/mkr-iot-carrier-button-issues-with-case-on/684581/11 "2021-06-16T15:39:00Z")

</div>

Closed on June 16, 2021, 3:39pm UTC

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.
