Show Posts
Pages: [1]
1  Using Arduino / Programming Questions / Re: Time and TimeAlarms Libraries – Ask here for help or suggestions on: August 29, 2013, 08:26:29 am
Hello,

I'm currently working on a sketch witch will use several (may be 9+) changeable repeated alarms and I'm expecting difficulties with my ram usage (Arduino Nano v3).
As I understand, I can get the alarm id by "AlarmId   myTimer = Alarm.alarmRepeat(15, 00, 00, Repeats); " and delete the alarm by "Alarm.free(id);" if I want to set a new alarm.

Is there also a way to read the current alarm values?

This way I could save the currently used variables for hour and minute of each alarm so I can display them on lcd each time I want to change the alarm time.

Thanks
calim

edit: The timers do not seem to work at all. I checked using serial.print in all funktions of the sketch. I use three "Alarm.timerRepeat(10, Function);" in the setup-section and two "Alarm.timerOnce" in the sketch right now and the functions never start. I used only alarm.delay delays in the sketch. ->???
2  Using Arduino / Displays / Re: MENWIZ: yet another character lcd menu wizard library on: September 13, 2012, 06:46:58 am
Hi,
yes, the Nano v3 comes with the ATmega 328. It should have the full power of the Uno.  smiley-cool
calim
3  Using Arduino / Displays / Re: MENWIZ: yet another character lcd menu wizard library on: September 12, 2012, 03:01:11 pm
Hi,
I did check my files and MENWIZ.h already has
Code:
//#define EEPROM_SUPPORT     //uncomment if you want to use the readEeprom and writeEeprom methods!
and in my scetch I have
Code:
#include <Wire.h>
#include <Time.h>
#include <LCD.h>
#include <LiquidCrystal_I2C.h>
#include <buttons.h>
#include <MENWIZ.h>
//#include <EEPROM.h>
so it seems it is not the eeprom that's eating up RAM but one of the other libraries. When I have time I will do the whole menu and check the memory again. May be next week. Then I'll try lower values of MAX_MENU.
Thanks! calim

PS: I'm using an Arduino Nano v3.0
4  Using Arduino / Displays / Re: MENWIZ: yet another character lcd menu wizard library on: September 08, 2012, 04:59:13 am
Hi there,
including or uncommenting eeprom support had no effect because I didn't use it anyway. I tried different values of MAX_MENU. With 25 it has freeRam of 198. With 30 it has 98 and produces the error, with 29 it has 118 and the values in the las menu jump around wild but the menu point still is available after leaving the menu, with 28 it has 138 freeRam and everything works fine. I hope it still does when I have created all of the scetch. smiley

Thanks, calim

@elpaso: good idea with the label duplication. I'll try it for my time-setting menus. However, I don't know how to declare a const __FlashStringHelper*. When I try
Code:
const __FlashStringHelper* hh="Stunde";
I get
Code:
cannot convert ‘const char*’ to ‘const __FlashStringHelper*’ in initialization
5  Using Arduino / Displays / Re: MENWIZ: yet another character lcd menu wizard library on: September 06, 2012, 02:39:14 pm
Quote
MAX_MENU is not a variable, is a define. It take effect at compile time not at run time.
Which errors?
check free memory and use getErrorMessage  (it allert you when lib cannot allocate memory).

I tested the scetch I was working on. With #define MAX_MENU 25 the menu works fine. With #define MAX_MENU 30 I get a error when I go into the last menu I created and try to set the variable. Instead of
Code:
0 [0] 180
there is
Code:
1190 [0] 3597
on the LCD and I get the error code 44. freeRam is 98. When I leave the menu the error code is gone (0), still with freeRam=98 and instead of the menu point to set the variable the point is changed to my root menu name. When I select it I get to the root menu.
Strangely, when I set another variable in another menu branch this works well. However, when I go to the last menu there is the entry of the root menu as described above.

I hope this helps and is not too confusing.

calim
6  Using Arduino / Displays / Re: MENWIZ: yet another character lcd menu wizard library on: September 05, 2012, 03:54:49 am
Yes, I was sloppy when writing the last post.   smiley-red
When I'm back at my arduino I'll try to get the information about memory and errors. Yesterday I got the error when trying to adjust a integer variable (which was 0 to 180 in steps of 1). When I activated the menu I got huge negative values on the lcd as limits which change (to also huge random numbers) when I try to adjust the value before freezing. I think this is some kind of overflow.
Just a thought, would it be possible to make a recurring menu? I, for example, need 12 times a menu to set time. I could be memory saving to have just one menu to set time and call it from several points of the menu and to use it to set variables depending on the actual menu position. I haven't looked into your library and how you remember the position in the menu. It may well be incompatible with the library.

Thanks, calim
7  Using Arduino / Displays / Re: MENWIZ: yet another character lcd menu wizard library on: September 04, 2012, 03:17:16 pm
I already tried to set up another the MAX_MENU-variable in the scetch instead of the MENWIZ.h. So it had no effect.  smiley-roll-blue Now when I change it to 25 it works (but I haven't set up half of the variables I want to change). When I set it to 30 there occur errors in the menu. I hope 25 is enough to set up all menus.
I need menus to set up time, 2x on-times for the light, 2x off-times for the light, moon-light duration, temperature and fan-offsets, CO2 on and off, 2x on and off for the dynamic pump, 2x time and duration for the fertilizer pumps as well as activation variables for some of the options. Seems to be some extensive menu making ahead.  smiley

Thank you for the help!
8  Using Arduino / Displays / Re: MENWIZ: yet another character lcd menu wizard library on: September 04, 2012, 12:39:57 pm
Thank you, I thought so, too. Of course it woud have been great to have some menu displaying "hh:mm" and to set first "hh", press confirm and then "mm" and press confirm.

Could it be there is a menu-limit in MENWIZ? My main menu only displays three submenus of the four right now and the third is empty.
Of course I not only want to set time but set some alarm-times, too. In fact 12 different times, some other integer variables and some boolean variables. I'm working on a aquarium control unit. :-)

Thanks, calim
9  Using Arduino / Displays / Re: MENWIZ: yet another character lcd menu wizard library on: September 04, 2012, 10:53:38 am
Hi,

I have a question about the input-modes (variables). I want  to use the menu to input a time variable to set my ds1307. As it uses unix-time it should not be a problem in general. The only problem is, that I want the user to see hours and minutes while setting the time instead of the seconds unix time uses. I dont need year, month and day.

Thank you for any suggestions!!
calim
Pages: [1]