C Code on ESP8266 with Arduino

Hi there

I have recently started with SmartThings and have managed to successfully direct-connect an ESP8266 to the platform.
As the switch_example C code uses FreeRTOS, I am now wondering how to properly include the Arduino.h library as well as other arduino libraries such as NeoPixel etc.

Does anyone know how to do this?

Hi, @Mathew
Sorry for the delay, I’ll ask the engineering team about this to get more information and I’ll get back to you.

1 Like

Thank you!

Have there already been any updates?

Sorry, not yet, I already pinged the team again. Thanks for following up!

Hi, @Mathew
The team mentioned that the SmartThings Device SDK for direct-connected wasn’t released with integration with Arduino.
I know of others that have made different integrations with Direct-Connect like @TAustin. Todd, have you done something with Arduino?

Is your integration for personal use?

I have not done anything with Arduino. But @Mathew, if you want to try creating your own ‘BSP’, I can help you with the core pieces, but the toolchain pieces you’d have to figure out since I’ve not had to deal with those in my work getting this to work on a Raspberry Pi.

But I would suspect it would just be a modification of the ESP stuff.

Thanks @nayelyz and @TAustin.

Unfortunately I do not have a lot of experience with C++ projects in general.
Maybe I get it wrong, but shouldn’t it be possible to just add the line

#include <arduino.h>
#include <otherArduinoLibrary.h>

to the main.c script?

I have downloaded the esp8266 arduino core but I don’t know how to include it properly. Is it possible to add the path to Makefile? Because at the moment I am able to include arduino.h, but it does not find its dependencies and manually pasting in all the missing files does not work either…