From 74d20f11777598fdfdb365861be44922e0f0d748 Mon Sep 17 00:00:00 2001 From: Vladimir Tarasoff Date: Sun, 9 Dec 2012 10:41:04 +0200 Subject: [PATCH] Update MomentaryButton.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Compatibility issue for Arduiono IDE versions 1.0 and higher. --- MomentaryButton.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/MomentaryButton.h b/MomentaryButton.h index f19664b..596c298 100644 --- a/MomentaryButton.h +++ b/MomentaryButton.h @@ -1,6 +1,10 @@ #pragma once -#include "WProgram.h" +#if defined(ARDUINO) && ARDUINO >= 100 + #include "Arduino.h" +#else + #include "WProgram.h" +#endif // Any button press >= HOLD_THRESHOLD milliseconds is considered a hold, // not a click.