I need to use the the ShiftPWM library (https://github.com/elcojacobs/ShiftPWM) on the Spark, but I once I remove the #include Arduino.h I’m getting a bunch of error. If I don’t remove the #include Arduino.h, I’m getting an error because he is looking for a files that don’t exist. I have also try to add the Arduino.h in my files, but I’m getting a lot of errors because there is a lot of files that are include in Arduino.h that don’t exist. Here’s a part of the errors that I’m getting:
CShiftPWM.cpp: In constructor 'CShiftPWM::CShiftPWM(int, bool, int, int, int)': CShiftPWM.cpp:39:18: warning: unused variable 'm_PWMValues' [-Wunused-variable] unsigned char * m_PWMValues=0; ^ CShiftPWM.cpp: In destructor 'CShiftPWM::~CShiftPWM()': CShiftPWM.cpp:44:21: error: 'free' was not declared in this scope free( m_PWMValues ); ^ CShiftPWM.cpp: In member function 'bool CShiftPWM::IsValidPin(int)': CShiftPWM.cpp:53:3: error: 'Serial' was not declared in this scope Serial.print(F("Error: Trying to write duty cycle of pin ")); ^ CShiftPWM.cpp:22:51: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive] #define F(string_literal) (reinterpret_cast<const __FlashStringHelper *>(PSTR(string_literal))) ^ CShiftPWM.cpp:53:16: note: in expansion of macro 'F' Serial.print(F("Error: Trying to write duty cycle of pin "));
Thanks for your help !