' * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ' * Lab 02 Program: Code Snippet To Get You Started * ' * Written By: NJ Getson * ' * Date Created: 12 Jan 2020 * ' * Last Modified: * ' * * ' * This program will use two LED light bulbs wired to separate pins on * ' * the circuit board. Each bulb is controlled individually. The first * ' * bulb will blink a specific number of times, followed by the second * ' * bulb, which also blinks an independently specified number of times. * ' * The program uses two separate FOR - NEXT LOOP structures to control * ' * the number of blinks of each bulb individually. * ' * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * '{$STAMP BS2} 'Stamp directive '{$PBASIC 2.5} 'Language directive ' * * * * * * * * * * * * * * * --- CONSTANTS --- * * * * * * * * * * * * * * * leftLED PIN 3 ' Assign PIN 3 to the left LED rightLED PIN 11 ' Assign PIN 11 to the right LED ' * * * * * * * * * * * * * * * --- VARIABLES --- * * * * * * * * * * * * * * * ' What variables do you need to declare? ' * * * * * * * * * * * * * * ---INITIALIZATION --- * * * * * * * * * * * * * * ' Set the numeric values for each blinker ' * * * * * * * * * * * * * * --- MAIN PROGRAM --- * * * * * * * * * * * * * * ' Here is how to light the LED wired to PIN 3 HIGH leftLED ' Power on to left LED DEBUG "Left LED light on!" ' Inform user to confirm correct function PAUSE 500 ' Wait half a second LOW leftLED ' Power off to left LED DEBUG "Left LED light off!" ' Inform user to confirm correct function PAUSE 500 ' Wait half a second ' Now copy/paste lines 29-35, change the PIN, and both lights work. Next, ' modify your comments to reflect the change from the left LED to right. ' Once you verify that both LEDs operate correctly, do you need the DEBUG ' statements? (Spoiler alert: no.) If you don't need it, DELETE it! ' Next, encase each chunk in its own separate loop so that one light blinks, ' then the other one blinks. Once your code compiles and the LEDs blink ' independently, DELETE these comment lines! END ' End program ' Before you hand it in...go back to the comment header and modify it. Give ' the program an appropriate title, change the authorship, fix the date! Then ' DELETE this comment block! ' * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *