Page 1 of 1

C++ library for Raspberry

Posted: Sun Apr 26, 2020 11:28 pm
by fausto.tromba
How can I use MCP236 with Raspberry programming in C++ ? do you have a library?
I saw that there are for Arduino in C, but not for Raspberry.

do you have an easy example? Like how to read the version of MSP236.

Re: C++ library for Raspberry

Posted: Mon Apr 27, 2020 8:56 am
by Basicmicro Support
There is no standalone C++ library. The reason is there is no standard serial port interface class in C++. There are many third party but nothing standardized.

The Arduino C++ library was written to be as general purpose as possible. All you have to do to make it work with anything else is implement a wrapper class for whatever serial port library you decide to use, that has the same interface as the Serial class on the Arduino and then pass a reference to the Roboclaw C++ class constructor just like we do in Arduino examples.