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
81051610
Commit
81051610
authored
Nov 29, 2014
by
funshine
Browse files
modify pwm module, add uart module
parent
10c3c0bf
Changes
2
Show whitespace changes
Inline
Side-by-side
0.9.2/512k-flash/nodemcu_512k.bin
View file @
81051610
No preview for this file type
README.md
View file @
81051610
...
@@ -2,9 +2,10 @@
...
@@ -2,9 +2,10 @@
###A lua based firmware for wifi-soc esp8266
###A lua based firmware for wifi-soc esp8266
version 0.9.2 build 2014-11-29
version 0.9.2 build 2014-11-29
# Change log
# Change log
2014-11-29
<br
/>
2014-11-30
<br
/>
fix tmr.delay not work when delayed time
<
1
s.
<
br
/>
modify the max freq of pwm module to 1000.
<br
/>
fix pwm module not work when freq
<
77.<
br
/>
modify the max duty cycle of pwm module to 1023.
<br
/>
add uart module, uart.on("data") api to receive data from uart.
[
more change log
](
https://github.com/nodemcu/nodemcu-firmware/wiki/nodemcu_api_en#change_log
)
<br
/>
[
more change log
](
https://github.com/nodemcu/nodemcu-firmware/wiki/nodemcu_api_en#change_log
)
<br
/>
[
更多变更日志
](
https://github.com/nodemcu/nodemcu-firmware/wiki/nodemcu_api_cn#change_log
)
[
更多变更日志
](
https://github.com/nodemcu/nodemcu-firmware/wiki/nodemcu_api_cn#change_log
)
...
@@ -12,7 +13,7 @@ fix pwm module not work when freq < 77.<br />
...
@@ -12,7 +13,7 @@ fix pwm module not work when freq < 77.<br />
-
Easy to access wireless router
-
Easy to access wireless router
-
Based on Lua 5.1.4
-
Based on Lua 5.1.4
-
Event-Drive programming preferred.
-
Event-Drive programming preferred.
-
Build-in file, timer, pwm, i2c, net, gpio, wifi, and system api.
-
Build-in file, timer, pwm, i2c, net, gpio, wifi,
adc, uart
and system api.
-
GPIO pin re-mapped, use the index to access gpio, i2c, pwm.
-
GPIO pin re-mapped, use the index to access gpio, i2c, pwm.
-
GPIO Map Table:
-
GPIO Map Table:
...
@@ -108,14 +109,14 @@ braudrate:9600
...
@@ -108,14 +109,14 @@ braudrate:9600
pwm
.
setduty
(
1
,
g
)
pwm
.
setduty
(
1
,
g
)
pwm
.
setduty
(
2
,
b
)
pwm
.
setduty
(
2
,
b
)
end
end
pwm
.
setup
(
0
,
500
,
5
0
)
pwm
.
setup
(
0
,
500
,
5
12
)
pwm
.
setup
(
1
,
500
,
5
0
)
pwm
.
setup
(
1
,
500
,
5
12
)
pwm
.
setup
(
2
,
500
,
5
0
)
pwm
.
setup
(
2
,
500
,
5
12
)
pwm
.
start
(
0
)
pwm
.
start
(
0
)
pwm
.
start
(
1
)
pwm
.
start
(
1
)
pwm
.
start
(
2
)
pwm
.
start
(
2
)
led
(
5
0
,
0
,
0
)
-- red
led
(
5
12
,
0
,
0
)
-- red
led
(
0
,
0
,
5
0
)
-- blue
led
(
0
,
0
,
5
12
)
-- blue
```
```
####And blink it
####And blink it
...
@@ -124,7 +125,7 @@ braudrate:9600
...
@@ -124,7 +125,7 @@ braudrate:9600
tmr
.
alarm
(
1000
,
1
,
function
()
tmr
.
alarm
(
1000
,
1
,
function
()
if
lighton
==
0
then
if
lighton
==
0
then
lighton
=
1
lighton
=
1
led
(
5
0
,
50
,
50
)
led
(
5
12
,
512
,
512
)
else
else
lighton
=
0
lighton
=
0
led
(
0
,
0
,
0
)
led
(
0
,
0
,
0
)
...
...
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