Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
a61cbfb2
Commit
a61cbfb2
authored
Mar 18, 2015
by
zeroday
Browse files
Merge pull request #295 from nodemcu/master
merge from master
parents
1652df50
a7070926
Changes
42
Show whitespace changes
Inline
Side-by-side
app/modules/modules.h
View file @
a61cbfb2
...
...
@@ -141,6 +141,13 @@
#define ROM_MODULES_WS2812
#endif
#if defined(LUA_USE_MODULES_CJSON)
#define MODULES_CJSON "cjson"
#define ROM_MODULES_CJSON \
_ROM(MODULES_CJSON, luaopen_cjson, cjson_map)
#else
#define ROM_MODULES_CJSON
#endif
#define LUA_MODULES_ROM \
ROM_MODULES_GPIO \
...
...
@@ -159,7 +166,8 @@
ROM_MODULES_UART \
ROM_MODULES_OW \
ROM_MODULES_BIT \
ROM_MODULES_WS2812
ROM_MODULES_WS2812 \
ROM_MODULES_CJSON
#endif
examples/fragment.lua
View file @
a61cbfb2
pwm
.
setup
(
0
,
500
,
50
)
pwm
.
setup
(
1
,
500
,
50
)
pwm
.
setup
(
2
,
500
,
50
)
pwm
.
start
(
0
)
pwm
.
start
(
1
)
pwm
.
start
(
2
)
function
led
(
r
,
g
,
b
)
pwm
.
setduty
(
0
,
g
)
pwm
.
setduty
(
1
,
b
)
pwm
.
setduty
(
2
,
r
)
end
wifi
.
sta
tion
.
autoconnect
(
1
)
wifi
.
sta
.
autoconnect
(
1
)
a
=
0
tmr
.
alarm
(
1000
,
1
,
function
()
if
a
==
0
then
a
=
1
led
(
50
,
50
,
50
)
else
a
=
0
led
(
0
,
0
,
0
)
end
end
)
...
...
Prev
1
2
3
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment