readme update
readme update

file:a/config.lua -> file:b/config.lua
--- a/config.lua
+++ b/config.lua
@@ -29,7 +29,7 @@
 sData.humidity = 0
 sData.dew_point = 0
 sData.altitude = 0
-sData.pageName = "Weather stations"
+sData.pageName = "Comana weather station"
 sData.pageId = 50
 sData.widget = "data"
 sData.title = "Summer kitchen temperature"

file:a/init.lua -> file:b/init.lua
--- a/init.lua
+++ b/init.lua
@@ -12,14 +12,14 @@
 function init()
     -- configure wifi reset button
     gpio.trig(3, "down", pin3cb)
-    
+
     -- initialize display
     init_spi_display()
-    
+
     disp:begin(ucg.FONT_MODE_TRANSPARENT)
     disp:clearScreen()
     disp:setRotate90()
-    
+
     disp:setFont(ucg.font_helvB18_hr)
     disp:setColor(255, 255, 255);
     disp:setPrintPos((disp:getWidth() - disp:getStrWidth(deviceTitle)) / 2, 25)
@@ -29,14 +29,14 @@
     printText("Humidity", 18, 5, 120)
     printText("Pressure", 18, 5, 150)
     printText("50", 10, 292, 47)
-    printText("-20", 10, 290, 204)    
-    
+    printText("-20", 10, 290, 204)
+
     --disp:drawFrame(20, 93, 42, 102)
-    
+
     -- initialize BME280
     i2c.setup(0, sda, scl, i2c.SLOW) -- call i2c.setup() only once
     bme280.setup()
-    
+
     if wifiEnabled then
         local def_sta_config=wifi.sta.getdefaultconfig(true)
         if def_sta_config.ssid ~= "" then
@@ -48,7 +48,7 @@
         else
             lcdPrint("No wifi config found on flash. Turning on IoT Setup")
         end
-    
+
         -- configure wifi via enduser setup
         --wifi.setmode(wifi.STATIONAP)
         --wifi.ap.config({ssid="IoTSetup_" .. wifi.sta.getmac(), auth=wifi.OPEN})
@@ -83,7 +83,7 @@
                 lcdPrint("enduser_setup: Err #" .. err .. ": " .. str)
             end
         );
-    
+
         tmr.alarm(0, 3000, 1, function()
             if wifi.sta.getip()==nil then
                 def_sta_config=wifi.sta.getdefaultconfig(true)
@@ -93,16 +93,16 @@
             end
         end)
     end
-    
+
     -- run update at start
     update()
-    
+
     cron.reset()
     cron.schedule("* * * * *", function(e)
         print("----------------Every minute----------------")
         update()
     end)
-    
+
     -- restart every hour
     cron.schedule("1 * * * *", function(e)
         --node.restart()

file:a/readme.txt -> file:b/readme.txt
--- a/readme.txt
+++ b/readme.txt
@@ -1,15 +1,48 @@
-NodeMCU/BME280 Weather station
+# NodeMCU/BME280 Weather station
 
-Features : 
-- integrated with IotCC using mqtt
-- display on SPI TFT LCD
-- NTP time sync
-- debug un serial and LCD
+## Features
+* integrated with IoTCC using mqtt
+* display on SPI TFT LCD
+* NTP time sync
+* debug un serial and LCD
 
-WIP
-- integration with PWS
-- forcast
+## WIP
+* integration with PWS
+* forcast
 
-NodeMCU modules required
-bit,bme280,bmp085,cron,enduser_setup,file,gpio,i2c,mqtt,net,node,rtctime,sjson,sntp,spi,tmr,uart,ucg,wifi,tls
+## SPI setup to connect display in func.lua
+Initialize the matching driver for your display. All available are here http://nodemcu.readthedocs.io/en/master/en/modules/ucg/#display-drivers
 
+                disp = ucg.ili9341_18x240x320_hw_spi(cs, dc, res)
+
+## Connect it to NodeMCU
+* Hardware SPI CLK  = GPIO14
+* Hardware SPI MOSI = GPIO13
+* Hardware SPI MISO = GPIO12 (not used)
+* Hardware SPI /CS  = GPIO15 (not used)
+* CS, D/C, and RES can be assigned freely to available GPIOs
+* local cs  = 8 -- GPIO15, pull-down 10k to GND
+* local dc  = 4 -- GPIO2
+* local res = 0 -- GPIO16
+
+## NodeMCU modules required
+* bit
+* bme280
+* bmp085
+* cron
+* enduser_setup
+* file
+* gpio
+* i2c
+* mqtt
+* net
+* node
+* rtctime
+* sjson
+* sntp
+* spi
+* tmr
+* uart
+* ucg
+* wifi
+* tls

comments