Retrieving highest and lowest value.
mademoiselle
Posts: 10
Hi, I'm new to BASIC Stamp and i need to do a project on recording temperature and retrieve/show the highest and lowest value on my debug terminal when i sense the temperature with my thermistor.Does anybody have any idea on how to do it or samples to assist me to receive such results? thanks alot for your kind help (:
Comments
0. Set a variable called Lotemp at 255. Set another variable called Hitemp at 0
1. take a temperature reading.
2. If its higher than Hitemp, store that value in Hitemp.
3. if its lower than Lotemp, store that value in Lotemp.
4.Goto Step 1
If you also want to log each reading, use WRITE to store the value in EEPROM. In a Stamp, you don't have much room to store data, (2K, less the length of your program) and after thousands of writes the EEPROM will eventually wear out. Choose how often you WRITE carefully.
As pointed out in the other thread you've got running, have a look at the WRITE and READ commands in the Helpfile.