I have recently bought one of the esp32 PLCs made by industrialshields, specifically the ESP32 PLC 19R. This device has Arduino IDE support, but not yet Platformio support.
Considering that I enjoy the development process in Platformio, I am hoping that someone is willing to help me get around the hurdles of getting the device to work on this platform!
I have made a github repo with the contents of the .arduino15 folder that seems to contain the same directories, so hopefully this will help a bunch.
The files in the repo are direct copies of the ones that get downloaded by Arduino IDE using the custom url provided by industrialshields.
Looking at the files it seems that there are some changes/additions made eg /hardware/esp32/2.1.2/cores/industrialshields/expanded-gpio.c, so that seems to suggest that files have been changed/added in core.
what steps do you think I should follow to get this to work ?
I have compiled and uploaded it and it is working as expected! I made a small change to the code since there is no visible builtin LED, but I made it turn a relay on and off which is lined to an LED!
The above project is just a “Proof of Concept” to see whether it works at all, but if we want this to go into mainline platform-espressif32, it probably needs to be its own package (framework-arduinoespressif32-industrialshields) and all the board definitions need to properly there as json file so that you could just say board = industrialshield_esp32_plc_19r.
If you are willing to put the time into making the PR , then I will gladly test it for you!
Just to be sure:
The industrialshield esp32 does do this strange thing where it “hijacks” functions such as digitalWrite to write to I2C to write to certain “pins” eg the ones i used for my simple example to trigger the relays (R0_1 and R0_2)
The compiler flags and built sources can be directly compared in the verbose output of the Arduino IDE and PlatformIO. So if they’re the same and the same toolchain versions are used, the output is the same. That can be checked once and then it should be good.
Of course you can also throw a more complicated sketch at it.
Hi, I just bought an IndustrialShields board, and looking for some information I came to this thread.
I have an M-Duino 38R+ LoRa with an Arduino Mega inside, I think the repo you posted above will not work for me, so ¿Do you know where I can find some information for doing this integration for my particular board?