chipKIT® Development Platform

Inspired by Arduino™

Arduino to Chipkit 3rd party Libraries

Created Fri, 02 Sep 2011 18:09:48 +0000 by jack23233


jack23233

Fri, 02 Sep 2011 18:09:48 +0000

I am having great success with my new UNO as long as I do not ask for any of the 'standard' Arduino libraries.

My current project running on the Arduino Uno uses;

#include <WProgram.h> #include <DS1307.h> #include <Wire.h> #include <OneWire.h> #include <DallasTemperature.h> #include <SD.h>

All of these are 'pretty common' and 'old standards'. Yet my chipkit UNO32 has a heart attack every time it sees one of these libraries.

I understand about the PIC not being a AVR, etc.

Where do I pick up UNO32 adapted libraries? How/where/ do I install them?

Do I have to revise my Arduino commands like (RTC.get(rtc,true); or

hotboxTemp=(DallasTemperature::toFahrenheit(sensors.getTempC(hotboxThermometer)));

... etc) to be compatible.

Of all these libraries, the only code that is not 'standard' is ' DDRC|=_BV(2) |_BV(3); // POWER:Vcc Gnd PORTC |=_BV(3); // VCC PINC3 .... which is commonly used for the RTC ds1307 setup.

Can someone please help get me straightened out?

js


GeneApperson

Fri, 02 Sep 2011 18:49:25 +0000

The term standard libraries can be kind of vague. From the perspective of the chipKIT MPIDE distribution, the standard libraries are the ones that are distributed in the MPIDE download. These are the same libraries distributed with the Arduino download (same in the sense that the library names and functions are the same, not in the sense that the code is the same).

These are the libraries that were ported as part of the chipKIT project and are being maintained by the chipKIT team.

In this sense, the only 'standard' libraries that you listed are Wire.h and SD.h. Are you having problems with those. If so, can you describe the problem in more detail. There are still some issues with some of the libraries that we are trying to work out, and bug reports are helpful to find and resolve the problems.

I believe that there are regulars on the forum who have worked on/ported some of the other ones you listed and can probably help you with some of them.

Unfortunately, the chipKIT team doesn't have the resources or time to port every third party library. We will be doing some of the more important ones when we have the time.

I would encourage anyone who has ported/fixed a contributed library and has it working with the chipKIT system to post that revised library in the 'third party libraries' repository in the chipKIT32 project on github.

Thanks, Gene Apperson Digilent


jack23233

Mon, 03 Oct 2011 00:59:46 +0000

Now that i have (almost) finished my ArduinoUNO project, I have had time to review the Uno32 issues.

A NOTE to others that run both Uno and Uno32;

take care to keep libraries separate. A library that is in the Arduino (UNO) file structure is not compatible with Arduino (UNO32). It only makes sense, they are two different processors. So keep the directory structures separate.

Simple sketches may be moved back and forth, but not files used by compile operations. Complex sketches that take advantage of UNO32 extended features will undoubtedly fail as a UNO sketch.

I didn't, and paid the price. :oops:

Look at the ChipKit Wiki library page, and the github page for current info.

Sorry, Gene, I should have spent a little more time thinking it over. I was too quick to mix libraries. Your answer pointed the WAY.


STEVENG42

Wed, 05 Oct 2011 02:59:10 +0000

I am trying to run a DFRobot LCD4884 LCD with a chipKIT Uno32. I am new to Arduino and C. Am I corect to assume that the LCD4884 libraries will not work with the Uno32. I can't even get the LCD4884 libraries to appear in the list with the other libraries. I expanded the LCD4884 libraries and put them, in their own folder with the others (Arduino est Site, EErom, Ethernet, etc), all done outsidethe IDE environment. When I open the mpde-0022 IDE environment the LCD4884 librarie I have added is not shown with the rest. Why is this? or what am I doing wrong?