struct icon indicating copy to clipboard operation
struct copied to clipboard

Does this library work on Arduino IDE?

Open vigneshs-dev opened this issue 1 year ago • 1 comments

How can I convert this library so that I can use it with Arduino IDE. I am sending struct.pack() data from RPi4 to ESP32 through UART. In order to decode the received message, I want this library to work on my Arduino IDE for ESP32. How can I do that?

vigneshs-dev avatar May 07 '24 07:05 vigneshs-dev

Hi @VigneshVicky97

struct depends on following standard headers:

#include <stdarg.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <errno.h>
#include <math.h>

These header files would be installed as part of Arduino IDE package.

You can include struct.h, struct_endian.h, struct.c, struct_endian.c files into your project.

  • struct.c => struct.ino or struct.cpp
  • struct_endian.c => struct_endian.ino or struct_endian.cpp

ref. adding external c file

svperbeast avatar May 07 '24 14:05 svperbeast