C++ library for Raspberry
-
- Posts: 37
- Joined: Wed Jul 31, 2019 7:24 am
C++ library for Raspberry
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.
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.
- Basicmicro Support
- Posts: 1594
- Joined: Thu Feb 26, 2015 9:45 pm
Re: C++ library for Raspberry
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.
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.