Forums before death by AOL, social media and spammers... "We can't have nice things"
|    alt.energy.homepower    |    Electrical part of living of the grid    |    2,576 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 924 of 2,576    |
|    Curbie to muratlanne@gmail.com    |
|    Re: 1kW $50 E-Cat ?    |
|    30 Jan 12 13:43:16    |
   
   From: jim.richards65@yahoo.com   
      
   Jim,   
      
   My loops are all under 1ms including responses, just waiting for   
   button de-bouncing takes 20ms or 20 loops that can be doing something   
   else, I have no delay() functions, just a bunch of timer variables   
   that basically say, is it time to do the next step.   
      
   Again, this type a command/response loop only works if the input of   
   one command is not dependant on the results of another, in which case,   
   you need a run-queue.   
      
   Some character spinner stuff if it's helpful.   
      
   Curbie   
      
   byte pumpF = N_OFF; // last feed pump   
   character   
   char spinner[] = {'X','|', '/', '-', '\'}; // sequence   
   through these chars to make a spinner   
    lcd.write( spinner[pumpF] ); // write spinner   
   character to line 2 to lcd   
    pumpF = bump(pumpF); // if feed pump   
   running, bump display character index   
      
   byte bump( byte charIndex ) { // bump moving   
   character index if spinner or wave is turned on   
      
   if ( charIndex == 4 ) { // if last display   
   character index   
    return 1; } // return to   
   caller, index first display character   
   else { // if displaying   
   in Fahrenheit   
    if ( charIndex == 0 ) { // if display off   
   character index   
    return 0; } // return to   
   caller, off character index   
    else { // if displaying   
   moving character   
    return charIndex + 1; // return to   
   caller, next character index   
    } // end if last   
   display character index   
   } // end if last   
   display character index   
   } // end bump   
   function   
   On Mon, 30 Jan 2012 15:01:21 -0500, "Jim Wilkins"   
   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca