MDSMC library problems

16 Nov 2012

Hi all, I wrote a small and simple library (my first library) MDSMC (Micro Dual Serial Motor Controller) bu Pololu. After writing the. H and. Cpp I wrote a small test software main.cpp that gives me the following error list:

/media/uploads/fangoman91/error_list.jpg

I am attaching also the zip containing the program and the library

/media/uploads/fangoman91/class_tester.zip

Finally, the link to the datasheet of the component:

http://www.pololu.com/file/download/smc02b_guide.pdf?file_id=0J36

16 Nov 2012

Hello,

First of all, publishing the code on the mbed site (right click, publish) is easier than exporting it to a zip.

The problems then, first of all you made the MDSMC object wrong (simply wrong syntax), it must be:

MDSMC Object(USBTX,USBRX,p5);

Problem 2, your constructor wants 5 arguments, not 3. The functions you then call in your main must use the name of the MDSMC object. And finally you call an init function that doesnt exist.

16 Nov 2012

Erik - wrote:

Hello,

First of all, publishing the code on the mbed site (right click, publish) is easier than exporting it to a zip.

The problems then, first of all you made the MDSMC object wrong (simply wrong syntax), it must be:

MDSMC Object(USBTX,USBRX,p5);

Problem 2, your constructor wants 5 arguments, not 3. The functions you then call in your main must use the name of the MDSMC object. And finally you call an init function that doesnt exist.

Thanks a lot the only problem was that the object was naming because that would put three parameters instead of five was my fault because it is a fix that I did despite the errors posted