beautypg.com

Checking program length – Elenco Snap Circuits SnapMicro I Deluxe ® User Manual

Page 28

background image

27

Checking Program Length.

As programs become complex it is possible the micro-controller will run out of memory to store the

program. Check the previous program length by clicking the ‘Syntax Check’ button.

If there are no programming errors the

Success window will open and show the

amount of memory used by the program.

To play all 4 songs and flash both lights,

this program used 32 bytes out of 256 or

12.5% of the total memory. Remove the ‘2

Snap’ on U8 (S-Out or Pin 0) and connect

the red programming wire. Download this

program. Then reconnect the ‘2 Snap’ and

run the program.

The fact that four ‘Play’ commands are followed by four ‘Wait’ commands indicates this program could

use variables and a ‘for … next’ loop. The ‘for … next’ loop does not have a standard flowchart box but

can still be programmed using the flowchart system as shown on the next page.

This manual is related to the following products: