Made Time, LiquidCrystal and RealTimeClockDisplaySensor example work in Arduino IDE 1.5.7.

This commit is contained in:
Henrik Ekblad
2014-09-20 13:04:01 +02:00
parent 82dda0fe30
commit f71ed97aaa
5 changed files with 31 additions and 31 deletions
+1 -1
View File
@@ -304,7 +304,7 @@ void LCD::createChar(uint8_t location, uint8_t charmap[])
} }
#ifdef __AVR__ #ifdef __AVR__
void LCD::createChar(uint8_t location, const prog_uchar charmap[]) void LCD::createChar(uint8_t location, const unsigned char charmap[])
{ {
location &= 0x7; // we only have 8 memory locations 0-7 location &= 0x7; // we only have 8 memory locations 0-7
+1 -1
View File
@@ -418,7 +418,7 @@ public:
(0 to 7) (0 to 7)
@param charmap[in] the bitmap array representing each row of the character. @param charmap[in] the bitmap array representing each row of the character.
*/ */
void createChar(uint8_t location, const prog_uchar charmap[]); void createChar(uint8_t location, const unsigned char charmap[]);
#endif // __AVR__ #endif // __AVR__
/*! /*!
+1 -1
View File
@@ -18,6 +18,6 @@
/*** /***
* Enable/Disable debug logging * Enable/Disable debug logging
*/ */
//#define DEBUG #define DEBUG
#endif #endif
@@ -42,8 +42,8 @@
* 7 Radio error LED (optional) +5V -> LED -> 270-330 Ohm resistor -> pin 7. * 7 Radio error LED (optional) +5V -> LED -> 270-330 Ohm resistor -> pin 7.
* 6 Radio SPI Slave Select * 6 Radio SPI Slave Select
* 5 Radio Chip Enable * 5 Radio Chip Enable
* 3 Inclusion mode button (optional), 10K pull down to GND, button to VCC) * 3 Inclusion mode button (optional) GND-> Button -> Pin3
* 2 Radio IRQ pin (optional), W5100 Int, if linked to pin 2) * 2 Radio IRQ pin (optional)
* ----------------------------------------------------------------------------------------------------------- * -----------------------------------------------------------------------------------------------------------
* Powering: both NRF24l01 radio and Ethernet(ENC28J60) uses 3.3V * Powering: both NRF24l01 radio and Ethernet(ENC28J60) uses 3.3V
*/ */
@@ -58,10 +58,10 @@
// Use this if you have attached a Ethernet ENC28J60 shields // Use this if you have attached a Ethernet ENC28J60 shields
#include <UIPEthernet.h> //#include <UIPEthernet.h>
// Use this fo WizNET module and Arduino Ethernet Shield // Use this fo WizNET module and Arduino Ethernet Shield
//#include <Ethernet.h> #include <Ethernet.h>
#define INCLUSION_MODE_TIME 1 // Number of minutes inclusion mode is enabled #define INCLUSION_MODE_TIME 1 // Number of minutes inclusion mode is enabled
+24 -24
View File
@@ -15,38 +15,38 @@
static char buffer[dt_MAX_STRING_LEN+1]; // must be big enough for longest string and the terminating null static char buffer[dt_MAX_STRING_LEN+1]; // must be big enough for longest string and the terminating null
char monthStr1[] PROGMEM = "January"; const char monthStr1[] PROGMEM = "January";
char monthStr2[] PROGMEM = "February"; const char monthStr2[] PROGMEM = "February";
char monthStr3[] PROGMEM = "March"; const char monthStr3[] PROGMEM = "March";
char monthStr4[] PROGMEM = "April"; const char monthStr4[] PROGMEM = "April";
char monthStr5[] PROGMEM = "May"; const char monthStr5[] PROGMEM = "May";
char monthStr6[] PROGMEM = "June"; const char monthStr6[] PROGMEM = "June";
char monthStr7[] PROGMEM = "July"; const char monthStr7[] PROGMEM = "July";
char monthStr8[] PROGMEM = "August"; const char monthStr8[] PROGMEM = "August";
char monthStr9[] PROGMEM = "September"; const char monthStr9[] PROGMEM = "September";
char monthStr10[] PROGMEM = "October"; const char monthStr10[] PROGMEM = "October";
char monthStr11[] PROGMEM = "November"; const char monthStr11[] PROGMEM = "November";
char monthStr12[] PROGMEM = "December"; const char monthStr12[] PROGMEM = "December";
PGM_P monthNames_P[] PROGMEM = PGM_P const monthNames_P[] PROGMEM =
{ {
"",monthStr1,monthStr2,monthStr3,monthStr4,monthStr5,monthStr6, "",monthStr1,monthStr2,monthStr3,monthStr4,monthStr5,monthStr6,
monthStr7,monthStr8,monthStr9,monthStr10,monthStr11,monthStr12 monthStr7,monthStr8,monthStr9,monthStr10,monthStr11,monthStr12
}; };
char monthShortNames_P[] PROGMEM = "ErrJanFebMarAprMayJunJulAugSepOctNovDec"; const char monthShortNames_P[] PROGMEM = "ErrJanFebMarAprMayJunJulAugSepOctNovDec";
char dayStr0[] PROGMEM = "Err"; const char dayStr0[] PROGMEM = "Err";
char dayStr1[] PROGMEM = "Sunday"; const char dayStr1[] PROGMEM = "Sunday";
char dayStr2[] PROGMEM = "Monday"; const char dayStr2[] PROGMEM = "Monday";
char dayStr3[] PROGMEM = "Tuesday"; const char dayStr3[] PROGMEM = "Tuesday";
char dayStr4[] PROGMEM = "Wednesday"; const char dayStr4[] PROGMEM = "Wednesday";
char dayStr5[] PROGMEM = "Thursday"; const char dayStr5[] PROGMEM = "Thursday";
char dayStr6[] PROGMEM = "Friday"; const char dayStr6[] PROGMEM = "Friday";
char dayStr7[] PROGMEM = "Saturday"; const char dayStr7[] PROGMEM = "Saturday";
PGM_P dayNames_P[] PROGMEM = { dayStr0,dayStr1,dayStr2,dayStr3,dayStr4,dayStr5,dayStr6,dayStr7}; PGM_P const dayNames_P[] PROGMEM = { dayStr0,dayStr1,dayStr2,dayStr3,dayStr4,dayStr5,dayStr6,dayStr7};
char dayShortNames_P[] PROGMEM = "ErrSunMonTueWedThrFriSat"; const char dayShortNames_P[] PROGMEM = "ErrSunMonTueWedThrFriSat";
/* functions to return date strings */ /* functions to return date strings */