Merge branch 'master' of github.com:jiegec/nodemcu-firmware

This commit is contained in:
Jiajie Chen 2015-03-07 22:06:01 +08:00
commit 72e3afa3dd
5 changed files with 37 additions and 6 deletions

21
.travis.yml Normal file
View File

@ -0,0 +1,21 @@
language: cpp
before_install:
- sudo apt-get install -y python-serial srecord
install:
- wget https://github.com/GeorgeHahn/nodemcu-firmware/raw/travis/tools/esp-open-sdk.tar.gz -O tools/esp-open-sdk.tar.gz
- tar -zxvf tools/esp-open-sdk.tar.gz
- export PATH=$PATH:$PWD/esp-open-sdk/sdk:$PWD/esp-open-sdk/xtensa-lx106-elf/bin
script:
- make all
- cd bin/
- file_name="nodemcu-firmware_v${TRAVIS_TAG}.${TRAVIS_BUILD_NUMBER}.bin"
- srec_cat -output ${file_name} -binary 0x00000.bin -binary -fill 0xff 0x00000 0x10000 0x10000.bin -binary -offset 0x10000
deploy:
provider: releases
api_key:
secure: Swecz5lWvsuSbchSbVQ1rmCPN9nQIN5p/HlZNIEdEgAgnoLcJxRV4P8poVTB37jiA8Pck+8x2nWXpg74Rqik0i3KlPNvDfg5o4rIazWLNs4bc1Tbcpt44XAzFKKLYnDnWQUGcqjk7BcAXuNAF2X/fPBCVhFbHVg3Z7cDb32RsNw=
file: "$TRAVIS_BUILD_DIR/bin/${file_name}"
skip_cleanup: true
on:
tags: true
repo: nodemcu/nodemcu-firmware

7
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,7 @@
## Contributing
Thank you everyone for contributing to this project.
Pull requests for new features and major fixes should be opened against the `dev` branch.
*Note that the `pre_build` bin in the dev branch is never up-to-date.*

View File

@ -1,5 +1,8 @@
# **NodeMcu** # # **NodeMcu** #
version 0.9.5 version 0.9.5
[![Build Status](https://travis-ci.org/nodemcu/nodemcu-firmware.svg)](https://travis-ci.org/nodemcu/nodemcu-firmware)
###A lua based firmware for wifi-soc esp8266 ###A lua based firmware for wifi-soc esp8266
Build on [ESP8266 sdk 0.9.5](http://bbs.espressif.com/viewtopic.php?f=5&t=154)<br /> Build on [ESP8266 sdk 0.9.5](http://bbs.espressif.com/viewtopic.php?f=5&t=154)<br />
Lua core based on [eLua project](http://www.eluaproject.net/)<br /> Lua core based on [eLua project](http://www.eluaproject.net/)<br />
@ -92,7 +95,7 @@ build pre_build bin.
<td>6</td><td>GPIO12</td><td></td><td></td> <td>6</td><td>GPIO12</td><td></td><td></td>
</tr> </tr>
<tr> <tr>
<td>7</td><td>GPIO13</td<td></td><td></td> <td>7</td><td>GPIO13</td><td></td><td></td>
</tr> </tr>
</table> </table>
#### [*] D0(GPIO16) can only be used as gpio read/write. no interrupt supported. no pwm/i2c/ow supported. #### [*] D0(GPIO16) can only be used as gpio read/write. no interrupt supported. no pwm/i2c/ow supported.

View File

@ -29,11 +29,11 @@ function startServer()
print("===Now, logon and input LUA.====") print("===Now, logon and input LUA.====")
end end
tmr.alarm(1000, 1, function() tmr.alarm(1, 1000, 1, function()
if wifi.sta.getip()=="0.0.0.0" then if wifi.sta.getip()=="0.0.0.0" then
print("Connect AP, Waiting...") print("Connect AP, Waiting...")
else else
startServer() startServer()
tmr.stop() tmr.stop(1)
end end
end) end)

View File

@ -62,17 +62,17 @@ function M.read(pin)
--DHT data acquired, process. --DHT data acquired, process.
for i = 1, 16, 1 do for i = 1, 16, 1 do
if (bitStream[i] > 4) then if (bitStream[i] > 3) then
humidity = humidity + 2 ^ (16 - i) humidity = humidity + 2 ^ (16 - i)
end end
end end
for i = 1, 16, 1 do for i = 1, 16, 1 do
if (bitStream[i + 16] > 4) then if (bitStream[i + 16] > 3) then
temperature = temperature + 2 ^ (16 - i) temperature = temperature + 2 ^ (16 - i)
end end
end end
for i = 1, 8, 1 do for i = 1, 8, 1 do
if (bitStream[i + 32] > 4) then if (bitStream[i + 32] > 3) then
checksum = checksum + 2 ^ (8 - i) checksum = checksum + 2 ^ (8 - i)
end end
end end