Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 66c0a61

Browse files
Add lua script demo
1 parent c6cc810 commit 66c0a61

File tree

1 file changed

+20
-0
lines changed
  • examples/ExecuteScriptFromSerial

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
print(string.format("Lua version is %s", _VERSION))
2+
3+
INPUT = 0
4+
OUTPUT = 1
5+
HIGH = 1
6+
LOW = 0
7+
LED_BUILTIN = 13
8+
9+
pinMode(LED_BUILTIN, OUTPUT)
10+
11+
for i=1,5,1
12+
do
13+
print(i)
14+
print("LED ON")
15+
digitalWrite(LED_BUILTIN, HIGH)
16+
delay(1000)
17+
print("LED OFF")
18+
digitalWrite(LED_BUILTIN, LOW)
19+
delay(1000)
20+
end

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /