@allObjects the testing part of WebIDE is a cool thing to use. I gave it a try with @Wilberforce's code and after fiddling with the testing buttons managed to get it to plot a graph of the process.
Seems in my haste to try @Wilberforce's module, I violated the rule of object access. Use methods to read/write object properties. Not a big thing if you are just fooling around trying to understand a piece of code, but a big deal if you build with it because a rewrite of the module can break your code. I'm wondering if there is a method to enforce that when using the keyword "export"? C++ classes have private and public keywords that can be applied to class properties.
My testing so far has been using an analog output connected by a 100k resistor to a 10 uF capacitor to ground, and the resistor-capacitor junction connected to an analog input. The other option would be to dig out some chemE textbooks and write some code to simulate a process. My head still hurts thinking about simulating the control of a 20 plate fractioning column with three different control loops on a 286 computer. So slow I had to buy a math coprocessor and even then it was slow. Such things are a lot faster today.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
@allObjects the testing part of WebIDE is a cool thing to use. I gave it a try with @Wilberforce's code and after fiddling with the testing buttons managed to get it to plot a graph of the process.
Seems in my haste to try @Wilberforce's module, I violated the rule of object access. Use methods to read/write object properties. Not a big thing if you are just fooling around trying to understand a piece of code, but a big deal if you build with it because a rewrite of the module can break your code. I'm wondering if there is a method to enforce that when using the keyword "export"? C++ classes have private and public keywords that can be applied to class properties.
My testing so far has been using an analog output connected by a 100k resistor to a 10 uF capacitor to ground, and the resistor-capacitor junction connected to an analog input. The other option would be to dig out some chemE textbooks and write some code to simulate a process. My head still hurts thinking about simulating the control of a 20 plate fractioning column with three different control loops on a 286 computer. So slow I had to buy a math coprocessor and even then it was slow. Such things are a lot faster today.