Commit Graph

204 Commits

Author SHA1 Message Date
Johny Mattsson 09410d55c6 Added SNTP module, for easy time sync.
Integrates with the rtctime component if it's available.
2015-07-10 15:12:31 +10:00
Johny Mattsson 67e72c45df Imported RTC FIFO component + added Lua interface.
The rtcfifo module uses RTC memory to store sensor samples across deep-sleeps,
making it possible to batch up samples for less frequent uploads. This
component uses 9 RTC memory slots for control, and a variable number of
slots for sample storage (see rtcfifo.prepare() on how to control the
size/location of the latter).

When used together with the rtctime module, it also exposes the convenience
function rtcfifo.dsleep_until_sample() which can be used to easily take
readings on a regular basis without having to manually take into account
time spent awake to get an accurate sleep time.

The format used for storing samples is quite dense, and allows for 16 bits
of data in a fixed point format (per sample).
2015-07-10 15:12:31 +10:00
Johny Mattsson 2187424928 Imported RTC+sleep timekeeping from an internal DiUS project.
Added Lua module rtctime to interface with it.

This keeps as accurate time as is possible on the ESP8266, including across
deep sleeps (provided rtctime.dsleep() is used rather than node.dsleep()).
Intended to be used together with NTP for high accuracy time keeping. The
API is via rtctime.{get,set}timeofday(), working from Unix epoch.

Note that 160MHz CPU clock is not currently supported by the rtctime code,
as it is only aware of the 52MHz boot clock and the regular 80Mhz default
clock.

See rtctime.h for detailed info on how this all works.
2015-07-10 15:12:31 +10:00
Johny Mattsson 1a613effeb Imported RTC access from a DiUS internal project.
Added Lua access module named "rtcmem" for read/write of RTC user module.
2015-07-10 15:10:15 +10:00
vowstar 67d785ffec Restore default data and init data before system restore. 2015-07-04 04:27:59 +08:00
vowstar 89aaf475d0 Add node.restore().
If NodeMCU can't connect Wi-Fi, please use it.
After reboot, all will be OK.
RESTORE ITEMS:
wifi_station_set_auto_connect, wifi_set_phy_mode, wifi_softap_set_config,  wifi_station_set_config, wifi_set_opmode.
2015-07-04 03:54:22 +08:00
vowstar 2224f24dad Merge branch 'dev096' of https://github.com/nodemcu/nodemcu-firmware into dev 2015-07-04 02:31:15 +08:00
vowstar 638bf7b023 Merge branch 'dev' of https://github.com/nodemcu/nodemcu-firmware into dev 2015-07-04 02:28:31 +08:00
vowstar fb0e4722b8 Fix and support Wi-Fi smart link (esp-touch and air-kiss).
Espressif open-source android and iOs APP,
See also https://github.com/espressifapp
Note: Must use ESP-TOUCH-V021 in espressif app history.
2015-07-04 02:27:51 +08:00
Konrad Beckmann 3d3c2431b3 Added WS2801 support 2015-07-02 00:50:26 +02:00
Vowstar 125d2173d6 Merge pull request #519 from md5crypt/tmr_module
rewrote the timer module from scratch
2015-06-30 15:50:08 +08:00
Luna 2691383696 added tmr.interval 2015-06-29 23:15:30 +02:00
Luna c1d2eb413b rewrote the timer module from scratch 2015-06-29 21:19:24 +02:00
Vowstar aa710d1f53 Merge pull request #513 from NodeUSB/dev096
update 433MHz transmission comment, add static ICACHE_FLASH_ATTR flag
2015-06-28 14:55:07 +08:00
Mike Wen 66ca7f6aca update 433MHz transmission comment, add static ICACHE_FLASH_ATTR flag 2015-06-27 18:14:24 -04:00
Mike Wen cf72a3203d update 433MHz transmission doc, add static ICACHE_FLASH_ATTR flag 2015-06-27 14:42:39 -04:00
vowstar 663158e4ab added wifi.ap.getconfig() by @md5crypt https://github.com/nodemcu/nodemcu-firmware/pull/500/files#diff-81824fe90d00138d98b6e9f0d7d8c7dcL1458. 2015-06-27 12:30:36 +08:00
vowstar a32df17579 Fixed net.dns.getdnsserver() by @md5crypt. 2015-06-27 12:26:24 +08:00
Johny Mattsson 7bd10e8a17 Added node.bootreason() to inspect boot cause. 2015-06-27 12:34:03 +10:00
devsaurus 277c6d0116 move u8g progmem constants to new .rodata sections
this simplifies the overall memory handling based on the irom support by @jmattsson
2015-06-25 00:38:11 +02:00
Luna 5ca807d7a1 fixed net.dns.getdnsserver() and added wifi.ap.getconfig() 2015-06-24 22:38:37 +02:00
MarsTechHAN 04c03b00ae @jorgempy We change the API of DNS callback format back
Make the net api universe  Callback Format -> function(conn,ip)
2015-06-20 19:10:01 +08:00
Vowstar 90ca92ca6e Revert "Merge dev to dev096" 2015-06-20 01:50:29 +08:00
vowstar 3430e5f826 Add __attribute__((optimize("O2"))) to ws2812 module. 2015-06-20 01:40:45 +08:00
vowstar 87341547d7 Update DHTlib, supported DHT11 or DHTxx automatic detection.
Using @MarsTechHAN 's method.
New usage:
status, temp, humi, tempdec, humidec = dht.read( id )
print( dht.read( id ) )
= dht.read( id )
2015-06-18 20:53:52 +08:00
vowstar af56aea1e8 Update dhtlib api, support both integer and float version. 2015-06-18 17:19:55 +08:00
vowstar 899935e60b Add DHT Lua Module for interfacing with the DHTxx sensors (xx = 11-21-22-33-44). 2015-06-18 16:31:40 +08:00
Mike Wen 7df0a45b07 add 433MHz transmission 2015-06-11 18:05:27 -04:00
Mike Wen a8622795a7 add 433MHz transmission 2015-06-11 18:05:18 -04:00
Vowstar 8044014f96 Merge pull request #471 from nodemcu/dev
Merge dev into dev096
2015-06-08 14:04:28 +08:00
cal 9dc71cfec0 Trying to fix
Problem with multiple MQTT subscriptions #459
	https://github.com/nodemcu/nodemcu-firmware/issues/459

Fix possible wrong buffer pointer increment.
2015-06-07 12:45:55 +02:00
Vowstar ef4e6fa95f Merge pull request #467 from DiUS/newcrypto
Crypto module improvements
2015-06-05 13:01:38 +08:00
Johny Mattsson 7867fd083c Move crypto things to irom0.text segment.
This releases 1168 bytes back to the heap.
2015-06-05 13:03:08 +10:00
cal fdcb982351 Trying to fix
Problem with multiple MQTT subscriptions #459
	https://github.com/nodemcu/nodemcu-firmware/issues/459

Fix possible wrong buffer pointer increment.
2015-06-04 11:46:20 +02:00
HuangRui 3cd5a6a1ed Merge branch 'master' of https://github.com/bruceme/nodemcu-firmware into dev
Conflicts:
	app/modules/net.c
2015-06-04 15:04:12 +08:00
Johny Mattsson 2d1e69151e Extended Lua crypto module with hash & hmac. 2015-06-02 18:17:30 +10:00
dnc40085 353209fb4e Change comments for wifi.sta.getap 2015-05-31 22:45:43 -07:00
dnc40085 a5fe3d0146 Added option to wifi.sta.getap to allow changing output format between
new style and old style
2015-05-31 21:43:03 -07:00
Vowstar d8a8746b9e Merge pull request #447 from creationix/dev
Add crypto module.
2015-05-29 15:05:37 +08:00
= 2128c42f02 Add headers for discovered rom functions 2015-05-28 15:10:12 -05:00
= 59df376a3a Rename base64Encode to toBase64 and hexEncode to toHex 2015-05-28 09:00:13 -05:00
= c8145434c3 Add crypto.hexEncode and crypto.mask 2015-05-28 07:47:09 -05:00
= ca78b9ea2c Add crypto module initially containing sha1 and base64_encode. 2015-05-28 07:46:57 -05:00
makefu c29edf7a22 app/modules/ws2812.c: re-add ws2812.write()
Add the original ws2812.write() function which does not scramble the
buffer while preserving the 'new' ws2812.writergb.

With this everybody should be happy again
2015-05-26 23:12:38 +02:00
Vowstar f7a6183853 Merge pull request #437 from dnc40085/dev096_adc.vdd33_fix
Added fix to adc.readvdd33() to prevent crashing in station mode
2015-05-24 07:23:16 +08:00
Vowstar 2d0689142c Merge pull request #438 from dnc40085/dev096_wifi.getchannel
added wifi.getchannel
2015-05-24 07:23:07 +08:00
dnc40085 6477f5f389 added wifi.getchannel 2015-05-22 19:42:21 -07:00
dnc40085 dd00e31027 Added fix to adc.readvdd33() to prevent crashing in station mode while
connected
2015-05-22 18:01:05 -07:00
dnc40085 7244d51b38 Fixed bug in wifi_scan_done 2015-05-20 02:21:46 -07:00
HuangRui fc8fa2cc91 Fixed readvdd33 bug. 2015-05-19 20:11:15 +08:00