Compilation Error: 'type_traits' Library Not Found When Using uMATE and Serial9b Libraries

Hello,

I am currently working on a project where I am trying to connect to an Outback FlexMax 80 controller using a Pro Micro board. For this, I am using the uMATE and Serial9b libraries. However, I am encountering a compilation error that I am unable to resolve.

Here is the code I am using:

#include <Serial9b_private.h>
#include <MateNetPort.h>
#include <MxController.h>
#include <MateControllerProtocol.h>
#include <MateDeviceProtocol.h>
#include <MateControllerDevice.h>
#include <uMate.h>
#include <uMATE.h>
#include <Serial9b.h>

// Create a uMATE instance on Serial1
uMATE mate(Serial1);

void setup() {
  // Start the serial communication with the computer
  Serial.begin(9600);
  
  // Start the uMATE instance
  mate.begin(19200);
}

void loop() {
  // Send a packet to request status from the MX controller
  mate.sendPacket(1, uMATE::PKT_STATUS_REQUEST, NULL, 0);
  
  // Wait for a response
  delay(1000);
  
  // If a packet is available
  if (mate.available()) {
    // Read the packet
    uMATE::Packet packet;
    mate.readPacket(packet);
    
    // If the packet is a status response from the MX controller
    if (packet.deviceID == 1 && packet.packetType == uMATE::PKT_STATUS_RESPONSE) {
      // Print the status data to the serial monitor
      Serial.println("MX controller status:");
      for (int i = 0; i < packet.dataLength; i++) {
        Serial.print(packet.data[i], HEX);
        Serial.print(" ");
      }
      Serial.println();
    }
  }
}

When I try to compile this code, I get the following error:

/Users//Documents/Arduino/libraries/uMATE/src/MateNetPort.h:7:10: fatal error: type_traits: No such file or directory
 #include <type_traits>
          ^~~~~~~~~~~~~
compilation terminated.
exit status 1
Error compiling for board SparkFun Pro Micro.

It seems that the 'type_traits' library is not found. I am using Arduino IDE version 1.8.19 on Mac OS X.

I would appreciate any help or guidance on how to resolve this issue. Thank you in advance.

Not all C++ libraries are ported/portable to Arduinos. Search the Web, possibly you need a bigger Arduino for such stuff.

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