Hi guys, I feel really bad like a leech here but I'm in no position to help anyone 'yet'. When I am in that position I will. Your help is greatly appreciated!
I started this sketch before I knew anything really(still don't tbh). Finished about 50% before I even knew about arrays. I just used simple example type code and went on from there. It works but its very crappy how I coded it. Even I know that. I really don't want to redo this now. Its almost done and I learned from it. I want to learn to code properly after this.
I'm having two problems I need some help with.. The first is a timer. In my original sketch I used millis() and another variable previousmillis as a seconds counter. Very simple. When millis() > previousmillis by 1000 it updates counter variable then resets previousmillis. This worked great although I need to use smaller increments of time like increments of .25 all the way up to 9.00.
The weird thing is the .25 isn't .25 seconds. It actually ends up being 4 seconds. There's another variable that is a setpoint that needs to ramp up at that rate(by .25 a degree by a second). I really hope that makes sense.
.25 = 4000 milliseconds
.50 = 2000 milliseconds
1 = 1000 milliseconds
If that doesn't make sense I'll wait until tomorrow to explain I'm sure it'll sound better.
The second problem is I'm using an lcd menu. Simple crap coded one but very effective. You guys helped with it it actually. I added the eeprom functions to save/load everything and its working. I'm finally adding the sketches together and I'm having a problem going from loop() to MENU states. Whats happening is I setup the IDLE menu in loop() function. When I load the REFLOW_STATE_IDLE state I tried to simply clear the lcd before hand but it keeps redrawing. I figured that I should go straight to REFLOW_STATE_IDLE THEN setup the lcd menu but then none of my buttons worked. How it is now, if I press the edit menu button it writes the menu over top the existing idle lcd setup. if I'm in a menu and press cancel I have it setup to go to idle but it works fine that way with a simple lcd.clear();
Any help would be greatly appreciated on either problem.
Its about 40k of code so I uploaded it to mediafire. Its still a work in progress with other problems but these are most important now. I also have other variables and another finite state machine that aren't used yet. Again, I know the code is whack but I'm like a first grader trying to do this. Its working so far and I really am planning on learning to code the right way. Just my first project.http://www.mediafire.com/?5qekavq11aeveeb
EDIT:For timer problem open sketch and search for REFLOW_STATE_STEP_1_RAMP. For LCD problem search for void loop() and go from there. Thanks again I'm really stuck on these problems.....