Old version works on NodeMCU 2.2. New version on 3.0. project based on web-server https://github.com/bondrogeen/web-server
code example
Code: Select all
<table>
<thead>
<tr>
<th>sensor</th>
<th><?lua if bmx280.mode == 1 then return("bmp280") elseif bmx280.mode == 2 then return("bme280") else return("no device") end ?></th>
</tr>
</thead>
<tbody>
<tr>
<td>temperature</td>
<td><?lua return(bmx280.temp) ?> C</td>
</tr>
<tr>
but if you shorten the " if elseif " then there is no damage
Code: Select all
<th><?lua if bmx280.mode == 1 then return("bmp280") elseif bmx280.mode == 2 then return("bme280") end ?></th>