C++ library for Raspberry

General discussion of the MCP motion controller product line
Post Reply
Posts: 25
Joined: Wed Jul 31, 2019 7:24 am

C++ library for Raspberry

Post by fausto.tromba » Sun Apr 26, 2020 11:28 pm

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.

User avatar
Basicmicro Support
Posts: 1365
Joined: Thu Feb 26, 2015 9:45 pm

Re: C++ library for Raspberry

Post by Basicmicro Support » Mon Apr 27, 2020 8:56 am

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.

Post Reply