Testing Sensor Mech

We collect and interpret live data from the same sensors used by the Datalog plugin. We've done this with an html script by hard-coding for a particular sensor. script

http://found.ward.fed.wiki/assets/pages/check-the-weather/billboard.html HEIGHT 60

This time we separate this task into blocks and include options for what was once inflexible. Watch the hourglass flip as each step proceeds.

FROM found.ward.fed.wiki/esp8266-datalog SENSOR garage REPORT

We can combine these blocks with others that we have seen before. Here we wait for a click to get data from two more sensors. Click again to repeat the later steps.

FROM found.ward.fed.wiki/esp8266-datalog CLICK SENSOR desk REPORT SENSOR office REPORT

.

Our block-based implementation takes more lines of javascript as we detect and check each option. We test this behavior with a sequence of Mechs with progressively fewer mistakes.

Nothing to report.

REPORT

No page to look for sensors.

SENSOR office REPORT

Wrong page to look for sensors.

FROM found.ward.fed.wiki/check-the-weather SENSOR office REPORT

No sensor name.

FROM found.ward.fed.wiki/esp8266-datalog SENSOR REPORT

No sensor by that name.

FROM found.ward.fed.wiki/esp8266-datalog SENSOR porch REPORT

Everything just right.

FROM found.ward.fed.wiki/esp8266-datalog SENSOR garage REPORT