pst.start(115200)
pst.str (string("Warming up..."))
waitcnt(clkfreq * 20 + cnt)
pst.clear
repeat
state := ina[0]
pst.home
pst.str(string("IN0 = "))
pst.bin(state, 1)
waitcnt(clkfreq/200 + cnt)
Note: This program uses the Parallax Serial Terminal object library, which is included with the
Propeller Tool software download.
Note: To view the results of the demonstration, after uploading is complete run the Parallax
Serial Terminal from the Run menu, or press F12. Momentarily depress the Reset button on the
Propeller QuickStart board to restart the program.
Arduino Uno
void setup() {
Serial.begin(9600);
Serial.println("Warming up...");
delay(20000);
}
void loop() {
Serial.print("IN2 = ");
Serial.println(digitalRead(2), DEC);
delay(200);
}
Note: To view the results of the demonstration, after uploading is complete click the Serial
Monitor icon in the Arduino IDE. This displays the Serial Monitor window. Momentarily
depress the Reset button on the Arduino board to restart the sketch.
Copyright © Parallax Inc.
' Start Terminal at 115200 baud
' PIR "warm-up" time
' Clear the screen
' Save state of PIR Sensor
' Move cursor to upper left
' Display results
' Small delay
Page 5 of 6
Need help?
Do you have a question about the 555-28027 and is the answer not in the manual?