Chapter 3 Pg 94 Issue
TheTech69
Posts: 51
Is there a problem with the BASIC Stamp software running on Windows Vista platform? I am re-doing the "What's a Microcontroller?" book v2.2. I try to implement the solution "timeCounter = timeCounter * 2". The result in the terminal window is 0ms even when I hold for 30 seconds. However, when I do the solution "timeCounter = timeCounter + 1" I get the correct value for ms. I have also tried the */ operator with the result being 0ms. I verified the code is the same in v3.0 of "What's a Microcontroller?" on page 85. Anyone ideas why this happens on Windows 7 and Windows Vista platform but not Windows XP?
Thank you for your assistance with this.
Thank you for your assistance with this.
Comments
Also, are you using the same Pbasic 2.5 directive in both cases?
I verified that PBasic 2.5 was used in both instances. I also retyped the entire code from scratch in a new window just to ensure a clean slate. I still have the same issue.
Thank you for your quick response! It is greatly appreciated!
It's such a short program that there isn't much to go wrong, except a typo. Sometimes you go snowblind looking at your same code over and over. Please attach your misbehaving code here when you can so we can see if we can spot something.
Any chance you bumped your circuit and moved a switch or wire out of place? Can you go back to your XP computer and verify that everything still works? While you're there, copy your working program onto a flashdrive and port that into your new OS and retry it.
That would explain your problem where the counter is always zero: zero times anything is always zero. You still need counter=counter+1. Per the text, you add counter=counter*2 to the existing program later in the program, outside the increment do loop, before the final debug statement.
You can go back to your first post and edit the dropdown to "Solved". You have to be in "advanced" mode.
I have changed it for you.