Giter Club home page Giter Club logo

tclab-web-demo's People

Contributors

eric-hedengren avatar

Stargazers

 avatar  avatar

Watchers

 avatar

tclab-web-demo's Issues

Add Both Heaters

Currently, the code only utilizes heater 1, and returns the value of the same. If the value return is stable, you could also add the second one, which would give more variety to the graph and give users the full functionality of their TCLab.

TCLab Package to PyScript

This will most likely be the bulk of the project. Because of PyScript's limitations concerning external packages outside of the standard library, many things in the TCLab Package need to be rewritten, to allow for full functionality.

Navigation Links

A simple header should be added to the top of the page to give users useful links to be redirected to, including the GitHub repository, TCLab main page, courses, and other important pages.

Reading Data from Serial Port

Reading values from a serial port using the Web Serial API is foundationally different as compared to the Python Serial Package. The Web Serial API uses asynchronous calls for data requests, as opposed to the Python Serial Package, which is called synchronously. In order to preserve the original structure of code which accesses the TCLab package, we need to make the backend code seem synchronous, even if it uses asynchronous code. The first issue we come across is reading values back from an asynchronous call. We can't gather the data collected by our asynchronous function because we're using PyScript, so instead we can have the asynchronous function write the data to a variable which we can pick up. This backend code also needs to be functional when it comes to looping, but if we loop the function call for reading data, it will create all of the tasks at once which will scatter our data when it is read. So in order to space out the time between calls for new data, we can create a loop that keeps running in the background, which will simply write to the variable that we had. This way, every time the user requests data, it will just grab the current value, instead of overloading the device with requests. But the problem with this method is as soon as the synchronous loop starts running, the asynchronous one must stop. This means no matter how long you try and wait for new data to come, you will still get the same value, because the background loop can't give the variable updated information. Therefore, the next step in getting the backend code to be fully functional when it comes to reading data, will be to make it compatible with looping.

Range Selector

Seeing that the graph auto deletes old data, users may want the ability to see further back on the graph to get a wider view. For this, a range selector should be implemented which would allow users to customize their graphs.

Color Picker

Add a color selector to the user interface, which will change the color of the temperature value.

Tooltip Functionality

One feature that would greatly enhance the user interface would be a tooltip for the graph, which would read the temperature of the location of where the user has their cursor laid. An example of the tooltip can be found here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.