My code is no where near a final product, this is still proof of concept stage, but will get me by for a little while.
Eventually I would like to see:
Moving the code from the void loop() and calling it as a sub routine like it should be.
L option added to the list of commands, this would toggle on/off the Log Output subroutine.
A config sub menu (something simple like when you SSH into a router) where it would automatically turn of Log output and have a simple menu like this:
1 [5] Log Interval Time in Seconds
2 [**Fementer#1**,] Header to be display at left of each string (blank is ok)
3 [x] Current Temperature
4 [, SP=] Delimiter
5 [x] Current Setpoint
6 [ ] Delimiter
...
Resulting string would be:
**Fermenter#1**,75.0, SP=74.5
If you type the number on each row, you get a simple prompt to change the contents of each row. When you make a change the entire list repopulates with an example output at the bottom, so you build as you go. So we can have a static list of log parameters, with configurable delimiters between each. When you type exit, you get back to the normal level and can toggle L back on for log output.
I would like to move away from single word based communication and read the entire variable table regardless of what is selected in the menu above, that only controls the print to log output. It could be stored as a table and output each part as required. A simple error checking scheme could be to compare to the last communication table (So store 2 tables), using While loop, to check if there is a difference, ask again for confirmation. Could repeat 2-5 times else fail. The data should not be changing that much between communication intervals. Based on what I looked at this would solve most of my current problems.
I think we really need a CRC check on both read and write communications, but this would require changes on the both Arduino and STC ends.
I need to build a layer on the write functions, I want the write function to read back what it just wrote, to confirm nothing was lost in communications. Should not be to hard to store the Address and Data, perform a read post successful write and compare the Data. Finally we can echo the OK and add a true confirmation of data written. Last thing I want when sending a SP of 73 and get 173 or something stupid because of noise or what ever communication fault.
My coding on Arduino is pretty basic right now, but this C stuff will comeback to me I hope. Maybe after 20 years, it's going to be like learning it all over again...
Lee
Eventually I would like to see:
Moving the code from the void loop() and calling it as a sub routine like it should be.
L option added to the list of commands, this would toggle on/off the Log Output subroutine.
A config sub menu (something simple like when you SSH into a router) where it would automatically turn of Log output and have a simple menu like this:
1 [5] Log Interval Time in Seconds
2 [**Fementer#1**,] Header to be display at left of each string (blank is ok)
3 [x] Current Temperature
4 [, SP=] Delimiter
5 [x] Current Setpoint
6 [ ] Delimiter
...
Resulting string would be:
**Fermenter#1**,75.0, SP=74.5
If you type the number on each row, you get a simple prompt to change the contents of each row. When you make a change the entire list repopulates with an example output at the bottom, so you build as you go. So we can have a static list of log parameters, with configurable delimiters between each. When you type exit, you get back to the normal level and can toggle L back on for log output.
I would like to move away from single word based communication and read the entire variable table regardless of what is selected in the menu above, that only controls the print to log output. It could be stored as a table and output each part as required. A simple error checking scheme could be to compare to the last communication table (So store 2 tables), using While loop, to check if there is a difference, ask again for confirmation. Could repeat 2-5 times else fail. The data should not be changing that much between communication intervals. Based on what I looked at this would solve most of my current problems.
I think we really need a CRC check on both read and write communications, but this would require changes on the both Arduino and STC ends.
I need to build a layer on the write functions, I want the write function to read back what it just wrote, to confirm nothing was lost in communications. Should not be to hard to store the Address and Data, perform a read post successful write and compare the Data. Finally we can echo the OK and add a true confirmation of data written. Last thing I want when sending a SP of 73 and get 173 or something stupid because of noise or what ever communication fault.
My coding on Arduino is pretty basic right now, but this C stuff will comeback to me I hope. Maybe after 20 years, it's going to be like learning it all over again...
Lee