Terminal Wrapper - tool for building web interfaces

Hello everybody,

This weekend I’ve built a web terminal that can be used to query any spark core from the web.

Link: http://spark.pascalculator.be/terminal/

Here is how it works:

  1. define a pubicly callable function in the Spark Cloud (ie. Spark.function( "moistLevel", moistLevel ); )
  2. Go to the web terminal and fill in the credentials of your core
  3. Type in the function in the terminal you want to query (ie. moistLevel( ) ) and the terminal will reply with the return value of the function. You can also pass variables (ie. write( D1,HIGH ) )

It only has been tested in Chrome (+ mobile) so it might behave a bit quirky since it’s been hacked together just to get the job done. I don’t have an SSL certificate, so your credentials are being passed to my server unencrypted, keep that in mind when using this

It’s written in PHP (bit of an odd choice) and you can download the source code on the GitHub repository https://github.com/pascalculator/sparkio-terminal if you want to run your local version.

4 Likes