Skip to content

Instantly share code, notes, and snippets.

@jrmedd
Last active May 16, 2020 10:50
Show Gist options
  • Save jrmedd/5516863 to your computer and use it in GitHub Desktop.
Save jrmedd/5516863 to your computer and use it in GitHub Desktop.
Replace '#include "WProgram.h"' with this code to make libraries compatible with latest Arduino IDE.
#if defined(ARDUINO) && ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif
#include <Wire.h>
/*Replace #include "WProgram.h" with the above code to make compatible with
latest Arduino IDE.*/
@pramitbiswas
Copy link

@AlmamyAZ if still the problem exist,
try changing "Arduino.h" "WProgram.h" to <Arduino.h> <WProgram.h>, and removing

#if defined(ARDUINO) && ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif

part from .cpp file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment