Help Legacy Alarm clock code not working on UNO v 1.06

any one help with these errors I'm seeing?

Arduino: 1.6.1 (Windows 7), Board: "Arduino Uno"

Phi_1_test_alarm_clock_v3.pde:69:9: error: 'prog_char' does not name a type

Phi_1_test_alarm_clock_v3.pde:70:9: error: 'prog_char' does not name a type

Phi_1_test_alarm_clock_v3.pde:71:9: error: 'prog_char' does not name a type

Phi_1_test_alarm_clock_v3.pde:72:9: error: 'prog_char' does not name a type

Phi_1_test_alarm_clock_v3.pde:73:9: error: 'prog_char' does not name a type

Phi_1_test_alarm_clock_v3.pde:74:9: error: 'prog_char' does not name a type

Phi_1_test_alarm_clock_v3.pde:75:9: error: 'prog_char' does not name a type

Phi_1_test_alarm_clock_v3.pde:76:9: error: 'prog_char' does not name a type

Phi_1_test_alarm_clock_v3.pde:77:9: error: 'prog_char' does not name a type

Phi_1_test_alarm_clock_v3.pde:79:9: error: 'prog_char' does not name a type

Phi_1_test_alarm_clock_v3.pde:80:9: error: 'prog_char' does not name a type

Phi_1_test_alarm_clock_v3.pde:81:9: error: 'prog_char' does not name a type

Phi_1_test_alarm_clock_v3.pde:82:9: error: 'prog_char' does not name a type

Phi_1_test_alarm_clock_v3.pde:83:9: error: 'prog_char' does not name a type

Phi_1_test_alarm_clock_v3.pde:85:9: error: 'prog_char' does not name a type

Phi_1_test_alarm_clock_v3.pde:86:9: error: 'prog_char' does not name a type

Phi_1_test_alarm_clock_v3.pde:87:9: error: 'prog_char' does not name a type

Phi_1_test_alarm_clock_v3.pde:88:9: error: 'prog_char' does not name a type

Phi_1_test_alarm_clock_v3.pde:89:9: error: 'prog_char' does not name a type

Phi_1_test_alarm_clock_v3.pde:90:9: error: 'prog_char' does not name a type

Phi_1_test_alarm_clock_v3.pde:91:9: error: 'prog_char' does not name a type

Phi_1_test_alarm_clock_v3.pde:92:9: error: 'prog_char' does not name a type

Phi_1_test_alarm_clock_v3.pde:93:9: error: 'prog_char' does not name a type

Phi_1_test_alarm_clock_v3.pde:94:9: error: 'prog_char' does not name a type

Phi_1_test_alarm_clock_v3.pde:95:9: error: 'prog_char' does not name a type

Phi_1_test_alarm_clock_v3.pde:96:9: error: 'prog_char' does not name a type

Phi_1_test_alarm_clock_v3.pde:97:9: error: 'prog_char' does not name a type

hmi.pde: In function 'void render_DOW_in_place(int)':

hmi.pde:39:11: error: 'dow_00' was not declared in this scope

hmi.pde: In function 'void render_alarm_in_place(int)':

hmi.pde:44:11: error: 'alarm_00' was not declared in this scope

hmi.pde: In function 'void render_month_in_place(int)':

hmi.pde:49:11: error: 'month_00' was not declared in this scope

Error compiling.

This report would have more information with "Show verbose output during compilation" enabled in File > Preferences.

Hi,

Can you please post your code using code tags. If it is too big then add it as an attachment.

Tom... :)

Thanks Tom!!!.
:grinning: :slight_smile:
Its a pretty popular instructable code for an alarm clock.

EEPROM Author: hkhijhe

*/
#include <LiquidCrystal.h>
#if ARDUINO >= 100
#include “Arduino.h”
#else
#include “WProgram.h”
#endif
#include <Wire.h>
#include <stdio.h>
#include <avr/pgmspace.h>
#include <EEPROM.h>
#include “buttons.h”
#include “DS1307_1.h”
#include “alarm_clock.h”

int hmi_with_update_2(int current, int lower, int upper, byte inc, byte column, byte row, byte space, void (*update_function)(int));

// Defining pins used
//#define setRTC
#define buzzer 16
#define ch1 16
#define ch1_analog 2
#define led 17
#define ch2 17
#define ch2_analog 3
#define btn_u 5
#define btn_d 10
#define btn_l 11
#define btn_r 3
#define btn_b 14
#define btn_a 15
#define alarm_EEPROM_storage 1023-3*Max_alarms // Where the alarm is saved.
// Messages used in program.
PROGMEM prog_char dow_00=“SUN”;
PROGMEM prog_char dow_01=“MON”;
PROGMEM prog_char dow_02=“TUE”;
PROGMEM prog_char dow_03=“WED”;
PROGMEM prog_char dow_04=“THU”;
PROGMEM prog_char dow_05=“FRI”;
PROGMEM prog_char dow_06=“SAT”;
PROGMEM prog_char dow_07=“M-F”;
PROGMEM prog_char dow_08=“Day of the week”;

PROGMEM prog_char alarm_00="Off ";
PROGMEM prog_char alarm_01="Daily ";
PROGMEM prog_char alarm_02=“Weekday”;
PROGMEM prog_char alarm_03=“Weekend”;
PROGMEM prog_char alarm_04="Once ";

PROGMEM prog_char month_00=“JAN”;
PROGMEM prog_char month_01=“FEB”;
PROGMEM prog_char month_02=“MAR”;
PROGMEM prog_char month_03=“APR”;
PROGMEM prog_char month_04=“MAY”;
PROGMEM prog_char month_05=“JUN”;
PROGMEM prog_char month_06=“JUL”;
PROGMEM prog_char month_07=“AUG”;
PROGMEM prog_char month_08=“SEP”;
PROGMEM prog_char month_09=“OCT”;
PROGMEM prog_char month_10=“NOV”;
PROGMEM prog_char month_11=“DEC”;
PROGMEM prog_char month_12=“Month”;

// Defines button objects
buttons btn_1(btn_u, LOW);
buttons btn_2(btn_d, LOW);
buttons btn_3(btn_l, LOW);
buttons btn_4(btn_r, LOW);
buttons btn_5(btn_b, LOW);
buttons btn_6(btn_a, LOW);

int rtc[7];
LiquidCrystal lcd(8, 9, 7, 6, 2, 4); //Phi-1 shield setting
DS1307 RTC=DS1307(); // Create RTC object
alarm_clock clock1(false); // Create an alarm clock

void setup()
{
lcd.begin(16, 2);
Wire.begin(); // initialize wire

// Set button pins to input with internal pull-up resistors
pinMode(btn_u,INPUT);
digitalWrite(btn_u,HIGH);
pinMode(btn_d,INPUT);
digitalWrite(btn_d,HIGH);
pinMode(btn_l,INPUT);
digitalWrite(btn_l,HIGH);
pinMode(btn_r,INPUT);
digitalWrite(btn_r,HIGH);
pinMode(btn_b,INPUT);
digitalWrite(btn_b,HIGH);
pinMode(btn_a,INPUT);
digitalWrite(btn_a,HIGH);

// Set the two channels to output to drive the buzzer and LED.
pinMode(buzzer,OUTPUT);
digitalWrite(buzzer,LOW);
pinMode(led,OUTPUT);
digitalWrite(led,LOW);

#ifdef setRTC
// Set/init RTC
RTC.stop();
RTC.set(DS1307_SEC,0);
RTC.set(DS1307_MIN,50);
RTC.set(DS1307_HR,0);
RTC.set(DS1307_DOW,3); // value from 1 to 7. User define whether 1 is sun or mon.
RTC.set(DS1307_DATE,16);
RTC.set(DS1307_MTH,11);
RTC.set(DS1307_YR,10);
RTC.start();

//Set alarms
EEPROM.write(alarm_EEPROM_storage,6); // Alarm 0 hour
EEPROM.write(alarm_EEPROM_storage+1,50); // Alarm 0 minute
EEPROM.write(alarm_EEPROM_storage+2,2); // Alarm 0 frequency M-F

EEPROM.write(alarm_EEPROM_storage+3,7); // Alarm 1 hour
EEPROM.write(alarm_EEPROM_storage+4,00); // Alarm 1 minute
EEPROM.write(alarm_EEPROM_storage+5,2); // Alarm 1 frequency M-F

EEPROM.write(alarm_EEPROM_storage+6,7); // Alarm 2 hour
EEPROM.write(alarm_EEPROM_storage+7,10); // Alarm 2 minute
EEPROM.write(alarm_EEPROM_storage+8,2); // Alarm 2 frequency M-F

EEPROM.write(alarm_EEPROM_storage+9,9); // Alarm 3 hour
EEPROM.write(alarm_EEPROM_storage+10,30); // Alarm 3 minute
EEPROM.write(alarm_EEPROM_storage+11,3); // Alarm 3 frequency Weekend
#else
// Set alarm on the clock from EEPROM.
clock1.set_alarm(0, EEPROM.read(alarm_EEPROM_storage), EEPROM.read(alarm_EEPROM_storage+1), EEPROM.read(alarm_EEPROM_storage+2));
clock1.set_alarm(1, EEPROM.read(alarm_EEPROM_storage+3), EEPROM.read(alarm_EEPROM_storage+4), EEPROM.read(alarm_EEPROM_storage+5));
clock1.set_alarm(2, EEPROM.read(alarm_EEPROM_storage+6), EEPROM.read(alarm_EEPROM_storage+7), EEPROM.read(alarm_EEPROM_storage+8));
clock1.set_alarm(3, EEPROM.read(alarm_EEPROM_storage+9), EEPROM.read(alarm_EEPROM_storage+10), EEPROM.read(alarm_EEPROM_storage+11));
#endif

}

void loop()
{
int temp1;
clock1.run();
if (!clock1.alarm_is_on)
{
temp1=wait_on_escape(250);
switch (temp1)
{
case 1:
lcd.clear();
lcd.print(“liudr.wordpress”);
lcd.setCursor(0,1);
lcd.print(".com for details");
wait_on_escape(5000);
break;

case 5:
set_alarm(0);
break;

case 6:
set_clock();
break;

default:
break;
}
}
}

Any luck? not sure how to upload the tags.

Hi,

Try here.

Please use code tags.. See section 7 http://forum.arduino.cc/index.php/topic,148850.0.html

That will make sure you code is properly entered into the posting.

Tom... :)