Commit Graph

487 Commits

Author SHA1 Message Date
Johny Mattsson 7d0b13df81 Bumped version string to stop confusing myself. 2015-10-12 13:26:04 +11:00
Johny Mattsson 8bdde6e28d Sorted out linker scripts & options.
Now boots to Lua prompt, but promptly reboots itself before input.
2015-10-12 13:26:04 +11:00
Johny Mattsson 91ee5c088c Wifi module update to new smartconfig API.
Needs testing.
2015-10-12 13:26:04 +11:00
Johny Mattsson 38cc84d2fc Removed gpio pulldown references.
The ESP never supported internal pulldowns, and the SDK now matches reality.
2015-10-12 13:26:04 +11:00
Johny Mattsson f1552605d9 Change os_update_cpu_freq... to ets_update_cpu_freq...
Again, the os_xxx version has been removed from the SDK.
2015-10-12 13:26:04 +11:00
Johny Mattsson d2ac5f1712 Changed os_intr_xxx to ets_intr_xxx.
The os_intr_xxx macros no longer exist in the SDK.
2015-10-12 13:26:04 +11:00
Johny Mattsson 3b9a42e254 Updated #includes to work on new SDK.
Both "c_types.h" and "lwip/ip_addr.h" don't get included indirectly anymore.
2015-10-12 13:26:04 +11:00
Johny Mattsson cc220d9201 Moved TEXT_SECTION_ATTR macro to its own header. 2015-10-12 13:26:04 +11:00
Johny Mattsson 8dff84e0a2 Missing file from the LWIP upgrade/import. 2015-10-12 13:26:04 +11:00
Johny Mattsson c674d191e4 Upgraded open-source LWIP.
From Espressif's lwip_open_src_template_proj_for_v1.3.0.zip
2015-10-12 13:26:04 +11:00
Johny Mattsson c1cd58e096 Build using 1.4.0 SDK + remove old SDK includes/libs.
Leaving the linker scripts intact for now, as they're quite customised.
2015-10-12 13:00:38 +11:00
chris 140bcee2e0 comment cleanup 2015-10-08 20:44:19 -07:00
chris cf079fa333 Basic hx711 functionality 2015-10-08 20:34:24 -07:00
devsaurus 093a895980 Merge pull request #678 from devsaurus/dev-hspi_clockdiv
Add divider for arbitrary HSPI clock frequencies, resolves #674
2015-10-06 21:05:17 +02:00
Johny Mattsson 5e19b8488f Merge pull request #644 from robertfoss/enduser_setup
Added ENDUSER_SETUP module.
2015-10-05 19:18:18 +11:00
devsaurus 4cf5f37450 address SPI_CLKDIV_PRE requirements
* respect N-1
* avoid range overflow
2015-10-04 16:57:50 +02:00
devsaurus ac50f9c6a5 add divider for arbitrary HSPI clock frequencies 2015-10-04 00:40:21 +02:00
Robert Foss 8683ea4f1b Fixed previous POST patch. Also cleaned up HTTP request handling. 2015-10-01 14:22:45 -04:00
Robert Foss 90f770412d Switched from HTTP GET to HTTP POST. 2015-09-30 14:11:43 -04:00
Robert Foss ee82b2ad12 Moved SSID define to user_config.h 2015-09-30 13:24:18 -04:00
Robert Foss 721fadfd14 Changed SSID to be suffixed by MAC. 2015-09-27 14:02:25 -04:00
Robert Foss a15097659b Disabled enduser_setup module 2015-09-19 15:22:01 -04:00
Robert Foss cd85e50e73 Added support for connected, error and debug callbacks. 2015-09-19 15:06:56 -04:00
devsaurus a6c9ba8004 disable UCG module per default 2015-09-17 22:43:59 +02:00
devsaurus 154b456f11 extend ucg example with ST7735 display 2015-09-17 22:37:31 +02:00
devsaurus db1162015d prefix local routines in ucg_polygon 2015-09-17 21:53:49 +02:00
devsaurus a2bca463a0 establish parametrization via ucg_config.h 2015-09-17 21:53:48 +02:00
devsaurus fde4843a75 implement all remaining function bindings 2015-09-17 21:53:48 +02:00
devsaurus f0d581223f UcgLogo example - fix drawGlyph and drawString 2015-09-17 21:53:48 +02:00
devsaurus 5c93ba017e finish GraphicsTest.lua 2015-09-17 21:53:48 +02:00
devsaurus ac1b5a1173 extend ucg module 2015-09-17 21:53:48 +02:00
devsaurus 75041a32b5 initial setup of ucg module
Hello World example is working
2015-09-17 21:53:48 +02:00
devsaurus 9b384b4bda fix u8g->ucg prefix 2015-09-17 21:53:48 +02:00
devsaurus 0f1a168525 add ucg module 2015-09-17 21:53:48 +02:00
devsaurus 6dc0dfc068 import ucglib v1.3.3
https://github.com/olikraus/Ucglib_Arduino
2015-09-17 21:53:47 +02:00
Robert Foss 8982d370f2 Removed #define for forcing storage on flash 2015-09-17 14:30:46 -04:00
Jonathan Karras 5161081c1c Updated comment for mqtt.client parameters. 2015-09-15 23:11:20 -06:00
Robert Foss 3d5c54cef7 Moved all debug prints into the NODE_DEBUG macro. 2015-09-14 18:43:09 -04:00
Robert Foss 3a05c3e402 Moved CONST data to occupy flash, and remove storage instructions for functions. 2015-09-12 12:07:53 -04:00
Robert Foss e2ada487f3 Added ENDUSER_SETUP module.
The module will start a SoftAP, DNS, HTTP server acting as a captive portal.
The portal will have the SSID SetupGadget and will serve a website where
credentials for the end users WLAN can be submitted.

Once valid credentials have been submitted and used to connect to the
local WLAN this module will stop.

This module requires USE_DNS to enabled in dhcpserver.h
2015-09-10 18:40:39 -04:00
Jonathan karras 524cec539f Added mqtt clean session support. 2015-09-05 12:54:13 -06:00
Jakub 52ef3c9102 Fixed bug WIFI AUTH_OPEN #623
Fixed a bug which prevented from setting unprotected AP
2015-08-31 17:53:38 +02:00
aeprox 537cd68078 Made device package and address configurable at runtime 2015-08-23 15:59:49 +02:00
aeprox 0f6a0c59a1 Documentation update 2015-08-23 14:52:15 +02:00
aeprox fd93a09a88 Code formatting fixes 2015-08-23 02:29:52 +02:00
aeprox 0caf745d8e Improve lua API interface 2015-08-23 01:42:39 +02:00
aeprox 29ee02f680 Revert version change 2015-08-22 22:34:54 +02:00
aeprox 4df5d5c166 Fix channel1 reading
Give sensor more time to integrate (400ms => 404ms)
2015-08-22 21:43:29 +02:00
aeprox 7095c42477 Attempt to fix reading of registers 2015-08-22 21:19:27 +02:00
aeprox 159e9c6ace make modulename lowercase 2015-08-22 17:55:07 +02:00
aeprox d1758aee1b return correct number of variables 2015-08-22 17:54:26 +02:00
aeprox 483dbebe24 Return error when calling functions before init
TSL2561_ERROR_NOINIT
2015-08-22 14:26:42 +02:00
aeprox 335ea87964 Glue to integrate with nodeMCU
makefiles etc
2015-08-22 14:25:47 +02:00
aeprox 223a1c8b86 Small change 2015-08-22 12:46:53 +02:00
aeprox 6cb90ea924 First commit 2015-08-22 00:15:28 +02:00
Johny Mattsson 346251dca6 1-Wire power fix, by Thomas Shaddack. 2015-08-20 11:09:12 +10:00
Konrad Beckmann 1287a8cdd6 BMP085: Fix B5 calculation
B5 was calculated with some precision loss before.
2015-08-16 11:57:12 +02:00
Vowstar 40111c1046 Merge pull request #600 from devsaurus/dev-node_compile
Add write error detection in node_compile()
2015-08-11 09:36:35 +08:00
devsaurus d0e6ab38df add write error detection in node_compile() 2015-08-11 00:08:49 +02:00
devsaurus ca1bc2cb18 clean u8g 2015-08-09 16:38:08 +02:00
devsaurus 02294955c5 Merge remote-tracking branch 'upstream/dev' into dev 2015-08-05 21:55:35 +02:00
devsaurus 9d8c3a7b82 fix u8g device destructor
don't free unallocated memory
2015-08-05 21:52:56 +02:00
Vowstar ad49c5dd3b Merge pull request #589 from kbeckmann/pr_bmp085
Implemented BMP085 module
2015-08-05 23:21:03 +08:00
Vowstar d97d7df8ec Merge pull request #588 from robertfoss/dev
Use #if instead of #ifdef.
2015-08-05 23:20:38 +08:00
Vowstar a1bb3a6ad8 Merge pull request #586 from DiUS/ram-saving
Reclaim ~1.5k RAM by tuning down SPIFFS cache, use dynamic DNS table names
2015-08-05 23:19:24 +08:00
Johny Mattsson 00527237f9 Remove now-unnecessary alignment constraints in SPIFFS.
With platform_s_flash_read() now properly handling unaligned destination
buffers, there is no need to shim SPIFFS any more.
2015-08-04 16:30:58 +10:00
Johny Mattsson 9f9b323fb5 Ensure flash write bounce buffer is used if source is also flash.
When using the flash write API, the flash is unmapped/uncached, and as
such it's not possible to source data directly from flash (e.g. string
literals).
2015-08-04 16:30:54 +10:00
Bernd Meyer 1259f8d776 Deal with unaligned destination parameter to flash read
(Occurs e.g. when SPIFFS cache is disabled.)

Implementation mirrors the existing handling in the write path.
2015-08-04 16:30:46 +10:00
Konrad Beckmann 0b28056959 Implemented BMP085 module 2015-08-03 17:07:56 +02:00
Robert Foss 579dc27ee0 Use #if instead of #ifdef. 2015-08-03 01:09:49 +02:00
zeroday c19596cae8 Merge pull request #581 from robertfoss/dev
Added USE_DNS define.
2015-08-02 23:40:37 +08:00
zeroday 53a035411e Merge pull request #584 from DiUS/cjson-lua-mem-wrap
Improvements to cjson memory handling, Note that when cjson fails a memory allocation, it leaks a bit of memory, it's possible to detect that it did fail, and schedule a restart.
2015-08-02 23:38:13 +08:00
Johny Mattsson 125db6595d Use dynamic memory for DNS table names, saving ~1k RAM. 2015-07-31 18:15:18 +10:00
Johny Mattsson 4a47813e20 Reduced SPIFFS cache, freeing ~0.5k RAM.
Also made the cache on/off configurable via user_config.h. Uncached writes
are not a very good idea, but for read-only deployments a further ~0.5k RAM
can be gained by disabling the cache.

Tweaked the file.read() workhorse to read large chunks at a time rather
than use getc(), to compensate for potential unavailability of cache.
2015-07-31 18:15:18 +10:00
Johny Mattsson b583af94a5 Fixed long key bug in HMAC calculation. 2015-07-31 14:11:09 +10:00
Johny Mattsson eae72699d0 Fixed broken linear growth allocation in cjson. 2015-07-31 13:17:05 +10:00
Bernd Meyer 595509a7f3 More sensible cjson realloc strategy. 2015-07-31 11:36:46 +10:00
Johny Mattsson 719abca418 Stop cjson from killing the node on out-of-mem. 2015-07-31 11:36:46 +10:00
Robert Foss 1b8e015f33 Removed some whitespace. 2015-07-28 16:34:25 +02:00
Robert Foss 5822d4c4ed Add define for advertising DNS in the DHCP OFFER message. 2015-07-28 16:32:38 +02:00
Vowstar 00e1e6bcbe Merge pull request #572 from devsaurus/dev
Upgrade u8g module and add display bindings
2015-07-26 22:55:52 +08:00
devsaurus f4f62fb255 fix display table construction 2015-07-21 20:37:44 +02:00
devsaurus 6fd106afac added more displays:
sh1106_128x64_i2c
    ssd1306_64x48_i2c
    ssd1309_128x64_i2c
    ssd1327_96x96_gr_i2c
    uc1611_dogm240_i2c
    uc1611_dogxl240_i2c
    ld7032_60x32_hw_spi
    pcd8544_84x48_hw_spi
    pcf8812_96x65_hw_spi
    sh1106_128x64_hw_spi
    ssd1306_64x48_hw_spi
    ssd1309_128x64_hw_spi
    ssd1322_nhd31oled_bw_hw_spi
    ssd1322_nhd31oled_gr_hw_spi
    ssd1325_nhd27oled_bw_hw_spi
    ssd1325_nhd27oled_gr_hw_spi
    ssd1327_96x96_gr_hw_spi
    ssd1351_128x128_332_hw_spi
    ssd1351_128x128gh_332_hw_spi
    ssd1351_128x128_hicolor_hw_spi
    ssd1351_128x128gh_hicolor_hw_spi
    ssd1353_160x128_332_hw_spi
    ssd1353_160x128_hicolor_hw_spi
    st7565_64128n_hw_spi
    st7565_dogm128_hw_spi
    st7565_dogm132_hw_spi
    st7565_lm6059_hw_spi
    st7565_lm6063_hw_spi
    st7565_nhd_c12832_hw_spi
    st7565_nhd_c12864_hw_spi
    uc1601_c128032_hw_spi
    uc1608_240x128_hw_spi
    uc1608_240x64_hw_spi
    uc1610_dogxl160_bw_hw_spi
    uc1610_dogxl160_gr_hw_spi
    uc1611_dogm240_hw_spi
    uc1611_dogxl240_hw_spi
    uc1701_dogs102_hw_spi
    uc1701_mini12864_hw_spi
2015-07-20 23:11:13 +02:00
devsaurus b837726013 simplify device/display macros 2015-07-20 22:07:59 +02:00
devsaurus 05e3267f24 update to u8glib 1.18.1 2015-07-19 23:22:50 +02:00
devsaurus 8bd3d7d2bf introduce lua_api_name parameter when building the display table
keeps the API as before and gets rid of hw_spi vs sw_spi topics
2015-07-19 21:57:14 +02:00
Johny Mattsson 8d68ad7e15 Updated SPIFFS to 0.3.2, plus alignment fix. 2015-07-17 13:40:55 +10:00
devsaurus 1bc156e4d1 move display constructors into template-based functions
+ uniform generaration
+ addition of further displays
- slight unneccesary heap allocation when display drivers are included but not used
2015-07-16 23:23:43 +02:00
devsaurus 02d473dab0 revert local changes to u8glib 2015-07-16 21:31:00 +02:00
Vowstar 239008d5b9 Merge pull request #553 from nodemcu/dev096
Merge Dev096 to Dev
2015-07-14 15:02:37 +08:00
dnc40085 0020c1d167 added code to check if in softap mode before continuing event monitor
callback
2015-07-13 22:12:16 -07:00
dnc40085 be79d1d3b6 added wifi station event monitor 2015-07-13 21:13:26 -07:00
Konrad Beckmann 6538d22d1f Improved ws2812 implementation
- Fixes the "first led problem" (#534 #487).
- Adds support for 160MHz mode.
- Optimized timings. Time to write pixels is reduced by about 25%
  This is useful when having a large amount of chained LEDs (>500).
2015-07-12 13:43:33 +02:00
Vowstar 98b2bffa75 Merge pull request #545 from DiUS/rtc
RTC and advanced timekeeping
2015-07-11 12:17:51 +08:00
Johny Mattsson dd38a0a0e6 Imported reworked rtctime support. 2015-07-10 16:16:25 +10:00
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
Johny Mattsson 6ad2666182 Declare wifi.ap.getconfig() in the right map. 2015-07-10 14:01:38 +10:00