O'Reilly logo

Mastering Internet of Things by Peter Waher

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding simple Markdown content to the actuator project

We also want to add a simple web interface to the actuator. It will just display the current state and provide a button we can use to toggle the state of the output. Note that we can embed HTML seamlessly into the Markdown to accomplish this. We embed the current value in a SPAN element with an id attribute, so that we can access it easily from JavaScript:

Title: Actuator Author: Peter Waher Description: This page displays the current state of the actuator. Cache-Control: max-age=0, no-cache, no-store CSS: Main.css Javascript: ToggleOutput.js Current state ============================ Output is currently turned **<span id='OutputState'>{ActuatorHttp.App.Output}</span>** <button onclick='ToggleOutput();'>Toggle ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required