Installing Libraries in Arduino PLC IDE

Hi, i have an Arduino Opta that I'm using to develop teaching materials for a University course in Advanced Manufacturing, and I need to connect it to the Arduino Cloud. Direct deployment of a sketch from the cloud doesn't allow all the PLC aspects of the board, and so not useful. What I'm trying to do is build the sketch within the Arduino PLC IDE as if the board was a manually configured device. This requires:

#include <ArduinoIoTCloud.h>
#include <Arduino_ConnectionHandler.h>

However there doesn't seem to be any options within the IDE to install new libraries or point to existing ones. The Arduino_ConnectionHandler is there, but throws errors when it tries to use one of it's dependencies (Arduino_DebugUtils.h), and the ArduinoIoTCloud isn't there at all. Just looking for any guidance on how to include extra libraries and dependencies in the PLC IDE, thanks.

1 Like

I found this post while looking for answers to use an Opta with the Arduino PLC IDE myself, so I thought I would share what I found. It seems you cannot manually install new libraries, but the IDE will allow you to point to existing public libraries. That includes only those libraries found at https://www.arduinolibraries.info/. The method to include public libraries can be found in the programming introduction for the PLC IDE, at https://docs.arduino.cc/software/plc-ide/tutorials/plc-programming-introduction/#library-management.

I am not sure how to get dependencies to work - in my case I was trying to use some features from mbed_mktime.h which are included in a sample sketch, but the PLC IDE apparently will not allow use of it.

Hi bwool, yes i managed to find the solution i was looking for. Noted it here also - Sketch libraries for Opta - #10 by dwholmesphd. The most useful part is the list of available libraries found in the C:\Users\[user]\AppData\Local\T\A folder. It's important to get the version right, and that file has all available versions for your PLC IDE install. Also, you can also use custom libraries if you put the library zip in the C:\Users\[user]\AppData\Local\T\D\libraries folder, but it won't manage dependencies automatically, so you might find yourself going down a rabbit hole of copy library, find dependency, copy new library, repeat.

1 Like

Perfect, thank you for that additional information! I hadn't found that list or the process to use custom libraries yet, but they sound very helpful for my project.