I’m currently writing a library for a device I designed, running the Arduino Micro bootloader. The device is stand-alone (so not intended to connect other hardware to), and intended for use in classroom environments to help students learn how to program.
The device contains some advanced hardware, for which I’m writing the library. Although it is my first time writing a library, most things are clear to me and everything is working so far.
One thing however I’m not sure about. Should I write the library using classes or not? As far as I understand, classes are useful when you might have, for example, two servo motors connected. This way you can create an object for each servo. But in my case, all hardware for which I want to create functions is present only one time and the device is not designed to be expanded with extra hardware.
I want the library to be as user friendly as possible as it is intended for students with little to none programming experience, and it looks weird to me that you would have to create an object if all the code in the sketch is only intended for that object. I think it’s easier for the student to use this
Or am I misunderstanding some things here? Does using classes has other advantages that I’m not aware of?
All feedback is welcome!