From d76b5e9358d3acc4f024158da37ffcc990015dad Mon Sep 17 00:00:00 2001 From: follower Date: Wed, 10 Dec 2014 00:07:06 +1300 Subject: [PATCH] Fix LED blink example so it works Two fixes to the LED blink example: * The ID and delay time have been swapped (should be ID followed by delay time). * By default the alarm only fires once, there needs to be an extra `1` as a parameter before the function definition. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3d8fb767..86948dd6 100644 --- a/README.md +++ b/README.md @@ -124,7 +124,7 @@ braudrate:9600 ####And blink it ```lua lighton=0 - tmr.alarm(1000,1,function() + tmr.alarm(1,1000,1,function() if lighton==0 then lighton=1 led(512,512,512)