Step 6: Updates: A living instructable (11/3/12)

I am so happy that this instructable won me a prize, I've desided to revisit it, and update it with changes I've made.  Two quick changes this morning

  1. I added a sleep statement at the beginning of the loop.  The logic is "If state=waiting, then wait 1 second."  This means I have to hold down the * key to start dialing, but it's a small price to pay to go from 100% CPU utilization to 25% utilization.  Code:

    if (state==waiting):
  2. I added the ability to stop dialing.  Previously, while waiting, you'd press * to start dialing, then if you made a mistake, you'd press * again to start dialing all over again.  I've added some code that checks to see if there is a current number in the buffer.  If there is, it will reset dialing, but if not, it will go back to waiting.  Code:

    elif (state==dialing):
      if (keyPressed=="*"):
        if (string1==""):
So that's two things that I was able to "knock off my list" of "what's next" from the last step.  There might be more coming!