130-28029 Parallax Inc, 130-28029 Datasheet - Page 232

KIT PARTS SMART SENSORS

130-28029

Manufacturer Part Number
130-28029
Description
KIT PARTS SMART SENSORS
Manufacturer
Parallax Inc
Datasheet

Specifications of 130-28029

Accessory Type
Education Kit
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
For Use With/related Products
BASIC Stamp®
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Contains lead / RoHS non-compliant
Page 220 · Smart Sensors and Applications
program again. The time after that, it does not halt the program, and so on. So the
program utilizes your Board of Education's Reset button as an on/off toggle button.
Below is an example that uses the code block in a different way. Instead of halting or
allowing the program to continue, the
program is run, then executed the second time the program is run (after pressing and
releasing the Reset button). It is then skipped the next time and executed again the time
after that. The net effect is that the program either counts down and jumps straight to the
Record_Data
whether your board's Reset button has been pressed/released an odd or even number of
times.
Example Program: EepromDataStorageWithReset.bs2
This program demonstrates how to use an address in EEPROM to control the way the
program behaves, depending on whether the program has been run or re-run an odd or
even number of times. The number of times the program has been run will be controlled
by the Reset button after download. If the Reset button has been pressed/released an
even number of times, the program starts with the menu from the previous activity. If it
has been pressed/released an odd number of times, it performs a countdown, and then
calls the
' -----[ Initialization ]---------------------------------------
READ Reset, value
value = value + 1
WRITE Reset, value
IF value // 2 = 0 THEN
ENDIF
Record_Data
FOR char = 15 TO 0
NEXT
GOTO Record_Data
DEBUG CLS, "Datalogging starts", CR,
FREQOUT 4, 50, 3750
PAUSE 950
subroutine, or moves on to the main menu in the program, depending on
subroutine.
"in ", DEC2 char, " seconds",
CR, CR,
"Press/release Reset", CR,
"for menu..."
IF
...
THEN
code block is skipped the first time the

Related parts for 130-28029