Hi guys, please help me to solve these 2 errors on my project.
The link to my project is here Multiple Alarm Scheduler using RTC and Arduino variant - YouTube.
It's simply implementing TimeAlarms features (maximum 6 scheduled alarms functions)
I have the following code included, except that when it comes to TimeAlarms library, I got these 2 exact errors, no more no less.
void setup() {
Serial.begin(9600);
rtc.begin();
// create the alarms
Alarm.alarmRepeat(8,30,0, MorningAlarm); // 8:30am every day
Alarm.alarmRepeat(17,45,0,EveningAlarm); // 5:45pm every day
Alarm.alarmRepeat(dowSaturday,8,30,30,WeeklyAlarm); // 8:30:30 every Saturday
Alarm.timerRepeat(15, Repeats); // timer for every 15 seconds
Alarm.timerOnce(10, OnceOnly); // called once after 10 seconds
1.TimeAlarms.cpp: In member function 'void TimeAlarmsClass::delay(long unsigned int)':
TimeAlarms.cpp:194: error: 'yield' was not declared in this scope
I could say that I have already scoured the net on TimeAlarms library (TimeAlarms.h) and tested them all on my project but to no avail.
As a newbie on Arduino, it's somehow frustrating, considering that it's only my hobby, and I'm not a programmer that I have to know the reason on the details of the errors to solve the problem. At some point, Arduino is not for all enthusiasts, but I just love electronic stuff
Yes Sir, Aceduino is the only available board at the time I was searching in our place...but so far it works on other simple projects. I'm using the IDE provided for Aceduino (the latest version of Arduino doesn't work).
Here's the link of the screencapture on the errors :
Please note that previously I was able to successfully implemented the TimeAlarms library but my only problem at that time was that my project always resets to the time it was compiled, meaning, my project did not synchronize with time of the RTC. That problem was already fixed, when I have not implemented the TimeAlarm features.
It seems that there are conflicts in using Libraries.
I hope the errors above can be addressed.
Copy the folder Aceduino to {sketchbook folder}/hardware
Start the Arduino IDE 1.8.5
Try compiling your code again.
By the way, it looks to me like the company who makes the Aceduino really don't know what they're doing and you would be better off even with a cheap Chinese Uno clone. It always makes me sad to see these companies that try to cash in on the Arduino community without providing even close to level of support for their products that community members are giving for free in our open source projects. This is not complex stuff. It's quite simple and well documented so the only reason for this is that they just don't care about their customers.
Hi Sir, I followed your instruction, these are the outcome:
Using the old IDE by Aceduino, the following #include files are okey (automatically highlighted in orange color by the IDE. But now using IDE ver. 1.8.5 (and copying Aceduino folder to hardware folder) all files got blacked in font color, except the Wire.h and LiquidCrystal.h files.
The IDE error is:
... \schedalarm_6trigger_1.ino:3:20: fatal error: DS3231.h: No such file or directory
#include <DS3231.h>
^
compilation terminated.
exit status 1
Error compiling for board ACEduino ATmega328.
I need to put the required libraries in the hardware folder since it is empty...
How did you install the libraries before? If you installed them correctly they are located in the Aceduino IDE's sketchbook folder (as set by File > Preferences > Sketchbook location) and you would only need to either move the contents of your old sketchbook to the new sketchbook location or change the Arduino IDE 1.8.5 sketchbook location to the old folder. If you change the Arduino IDE 1.8.5 sketchbook location then you need to copy the hardware folder over to the updated sketchbook location.
Some places you will find the bad advice to install libraries to the Arduino IDE installation folder. The reason you should never do that is because when you change to a different version of the Arduino IDE you will no longer have access to those libraries.
Sir still same problem, only the Repeat every 10 seconds is working.
I have uploaded the files with no errors.
I tried to copy all necessary files to the sketchbook location and the below libraries are now automatically highlighted in orange color (but I just don't what does bold orange font and non-bold font of the files means. The Time.h, DS3231.h, DS3231RTC and LiquidCrystal.h are now in bold orange font). The others are not in bold font. All I presume is that if the file name font is black in color, it just that the library is not suitable for a particular project.
#include <Time.h>
#include <Wire.h> // in bold orange font
#include <DS3231.h>
#include <DS3231RTC.h> // in bold orange font
#include <TimeAlarms.h>// in bold orange font
#include <LiquidCrystal.h> // in bold orange font
mnunez: Sir still same problem, only the Repeat every 10 seconds is working.
I have uploaded the files with no errors.
How is that the same problem??? The original problem you reported was a "'yield' was not declared in this scope" compilation error. Then you had a "No such file or directory" error. If you can upload to your Aceduino with no errors then it's surely not the same problem.
mnunez:
but I just don't what does bold orange font and non-bold font of the files means. The Time.h, DS3231.h, DS3231RTC and LiquidCrystal.h are now in bold orange font). The others are not in bold font. All I presume is that if the file name font is black in color, it just that the library is not suitable for a particular project.
It feels good that after a series of sleepless challenging nights, finally I've made it
Yes, I'm now using Arduino IDE ver. 1.8.5 thanks for the info on that.
My next goal is to integrate my DFplayer mini to speak every 7:30 am, 8:30am, 12pm, etc.
I have already posted such as new topic at Arduino Forum > Using Arduino > Audio > Does ADKEYs play specific mp3 file and will not play the next mp3 file?