From 839f6a7e8e9fd9397112d2d5013cf2c05595d9da Mon Sep 17 00:00:00 2001 From: Yik Teng Hie Date: Wed, 7 Oct 2020 17:32:37 +0800 Subject: [PATCH] led --- LED.bs2 | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 LED.bs2 diff --git a/LED.bs2 b/LED.bs2 new file mode 100644 index 0000000..dc4b0ba --- /dev/null +++ b/LED.bs2 @@ -0,0 +1,25 @@ +' {$STAMP BS2} +' {$PBASIC 2.5} + +LED PIN 8 +GREENLED PIN 7 +DWELL CON 1000 + +' set io01 and 02 as INPUT +INPUT 1 +INPUT 2 + +Main: + DO + HIGH LED + LOW GREENLED + PAUSE DWELL + LOW LED + HIGH GREENLED + PAUSE DWELL + DEBUG "." + ' debug status of PIN1 and 2 + DEBUG ? IN1 + DEBUG ? IN2 + LOOP +END \ No newline at end of file