Modify your program so that it turns both lights on and off at about the same time.Try controlling the P27 light along with the P26 light. Modify the main function as shown below.Click Save Project As button, and save a copy of your project named Blink Light Faster.
For example, to blink the light twice as fast, just reduce the pauses to half as long. You can make the light blink faster by reducing the pause function’s parameter. Click the SimpleIDE Help menu and choose Simple Library Reference to see a link to the simpletools library's functions. The simpletools library has lots of useful functions for controlling and monitoring circuits high, low, and pause are just three examples. #include "simpletools.h" // Include simpletools Those four commands are in a code block in a while(1) loop, which repeats endlessly, so the light keeps blinking. Another pause(100) makes the light stay off for 1/10 of a second. This takes away the electrical pressure, so the current stops flowing through the circuit and the light turns off. Next, low(26) sets P26 to output-low, which connects the pin to its 0 V ground supply voltage instead. After that, pause(100) makes the program do nothing for 100 ms, which keeps the light on for 1/10 of a second. The pin applies 3.3 V of electrical pressure to the LED circuit, causing electric current to pass through it and the light to turn on. The function call high(26) sets the Propeller chip's P26 I/O pin to output-high, which connects the pin to its 3.3 V supply.
The Propeller microcontroller has 32 input/output pins, or I/O pins, that are designed to interact with other circuits.