Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does this library work on Arduino IDE? #9

Open
VigneshVicky97 opened this issue May 7, 2024 · 1 comment
Open

Does this library work on Arduino IDE? #9

VigneshVicky97 opened this issue May 7, 2024 · 1 comment

Comments

@VigneshVicky97
Copy link

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?

@svperbeast
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants