code review
Dunnsept
Posts: 115
howdy all!
just wondering if somebody would be so kind as to give my code a quick perusal as a sort of review/sanity check.
This is going to eventually be the code to run my popcorn popper/coffee roaster, just waiting on the DS2760 thermocouple stuff.
I currently have an LED simulating the out to the SSR (heater control) and have a 10k pot for RCTIME to simulate
data (temp) coming back from the DS2760.
Everything seems to work just fine, mainly I was hoping I could bribe/coerce somebody to take a quick look for anything
really obvious. I am not overly concerned about coding style at this point, but if there's something horrible, please
do mention it, otherwise, on to the description:
energize the SSR until "temp" comes up to 3
start timing 1 minute with "temp" at 4
if the temp is low (SSR energized) for a long time, I want to add time on to the stage.
This is currently setup by a minute interval in the ISR. When this gets setup for real on the
roaster, times will be longer.
OK, once stage1 is over, move to stage2, energize SSR/heater and start timing.
stage2 over, move to stage3.
Time for the stages is set by adding a constant to the current minute count.
AT ANY TIME, press a button on RA.2 then shut everything down.
Press a button on RB.7 to add time to current stage.
Press a button on RB.4 to subtract time from current stage, this can also be used to end the current
stage and move to the next.
With LEDs, a POT with RCTIME and just made-up numbers (all stage times are 1 minute)·this seems to work OK. But I sure would appreciate
comments/etc if somebody who has time to glance at the code sees something crazy.
As soon as the DS2760's show up, I sure hope this whole thing can get moved over to the project forum.
Thanks!
Paul...
just wondering if somebody would be so kind as to give my code a quick perusal as a sort of review/sanity check.
This is going to eventually be the code to run my popcorn popper/coffee roaster, just waiting on the DS2760 thermocouple stuff.
I currently have an LED simulating the out to the SSR (heater control) and have a 10k pot for RCTIME to simulate
data (temp) coming back from the DS2760.
Everything seems to work just fine, mainly I was hoping I could bribe/coerce somebody to take a quick look for anything
really obvious. I am not overly concerned about coding style at this point, but if there's something horrible, please
do mention it, otherwise, on to the description:
energize the SSR until "temp" comes up to 3
start timing 1 minute with "temp" at 4
if the temp is low (SSR energized) for a long time, I want to add time on to the stage.
This is currently setup by a minute interval in the ISR. When this gets setup for real on the
roaster, times will be longer.
OK, once stage1 is over, move to stage2, energize SSR/heater and start timing.
stage2 over, move to stage3.
Time for the stages is set by adding a constant to the current minute count.
AT ANY TIME, press a button on RA.2 then shut everything down.
Press a button on RB.7 to add time to current stage.
Press a button on RB.4 to subtract time from current stage, this can also be used to end the current
stage and move to the next.
With LEDs, a POT with RCTIME and just made-up numbers (all stage times are 1 minute)·this seems to work OK. But I sure would appreciate
comments/etc if somebody who has time to glance at the code sees something crazy.
As soon as the DS2760's show up, I sure hope this whole thing can get moved over to the project forum.
Thanks!
Paul...
Comments
· Just a little 10 minute review, everything look good. Actually pretty damn good.
· Good use of DO...LOOPs, not a bunch of labels or unneed stuff.
· When you get your HC4LED displays I'll help you get them working.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"SX-Video·Module"·available from Parallax for only $28.95 http://www.parallax.com/detail.asp?product_id=30012
"SX-Video OSD module"·available from Parallax for only·$49.95 http://www.parallax.com/detail.asp?product_id=30015
Product web site: www.sxvm.com
Available now! Cheap 4-digit LED display with driver IC·www.hc4led.com
"I reject your reality, and substitute my own." Mythbusters
·
"not a bunch of labels" is that a good or a bad thing
I think I can get the LEDs working fine, but I'll gladly take some help getting the DS2760s to work.
paul...