I recently changed to a Mac from PC and I am having trouble getting my sketches running.
for instance the following for a tilt compensated compass worked well before but I cannot make it work now
ayf=ax/57.0;//Convert to rad
axf=ay/57.0;//Convert to rad
var_compass=atan2((double)yh,(double)xh) * (180 / PI) -90; // angle in degrees
delay(100); // There will be new values every 100ms
Serial.print(" y: ");
Serial.print(" z: ");
I believe it is something to do with the updates in the new Arduino version and I have read the release notes but being unfamiliar with Macs I am struggling.
I downloaded the Mac software which was a zip file and when the download was finished it was just an Arduino file which I clicked on and the Arduino environment opened.
I installed the FTI drivers correctly but the issue I am having is errors when verifying about the wire library.
I have no core library folder in my documents folder with Arduino.h or wire.h in it
I read in the release notes that you need to replace
#include <wProgram.h> with <Arduino.h> and that there is a bit of code you can add that includes Arduino.h when needed and uses wProgram.h when needed but I don know where to put it or where to find it.
I have no Arduino.h file on my Mac.
Can someone steer me in the right direction.
Once I have the .h files sorted then I can easily change the wording for Serial etc as per the release notes.
***Edit. I have now edited all the .h files in my libraries to include
#if defined(ARDUINO) && ARDUINO >= 100
However I still get a WProgram.h no such file or folder error. I found the core libraries in the package and copied the libraries folder and pasted it into the Arduino folder but that didnt work either.
***Abort ***Abort ***Abort
I have solved it. Finally tracked down the culprit. I had to edit wire.send and wire.receive etc and edit all the WProgram references but I fixed them.