September 2019 Update

New! We're moving to the new forum!

ALL new Blog posts will be on the forum.

Please join us there.

This Blog will no longer be updated...

Wednesday, August 21, 2019

Keeping track of ideas...

Posted: 3:00am

This is a different sort of post.  I've mentioned before that I keep a text file open in my Visual Studio IDE while I'm coding, so if I have an idea I can jot it down immediately...  It's absolutely true what they say about smoking pot, and short term memory...  and I smoke a lot of pot... lol

This acts as my to-do list, although it often contains thoughts that haven't quite coalesced into a coherent idea.  It's like my "idea incubator", I often just glance through it, add new thoughts, update previous ones.. it is entirely free-form, grammar and spelling aren't important. 

I'll even use it when I am trying to solve a problem, as I find that either writing it down, or describing it to another person (my wife is a good listener) I think it makes you go into more detail, and gives you insight you don't get by just thinking about it, at least I find that...

So, I said this post was a little different than the others, here's why...

My THOUGHTS.TXT file contents at the moment (it changes, lots, always)
Sorry if it doesn't format well...  if it doesn't make any sense to you, don't worry, it does to me :)

Each "thought" or "idea" is separated from the next with the line of equal signs....


if sensor test fails, it should not check alarms etc... just fail it
use new field, doNotLog - alarm code checks this before processing.


Display any errors - create array of messages, and keep a messageCounter
- in 5 second timer, increment messageCounter so next refresh (every second) will display the same message
      for 5 seconds, then the next, and so on. if counter = numberOfMessages then roll back to the first one.


8266 sends rssi with all payloads now, good... but if no payloads, then no updates.
need "lastpayloadtime" = millis when payload sent, if > X then send rssi

payload contains WAITFORACK tags?  <ACKME> :)

Only First four digital ports (17, 18, 19, and 20) will support DHT22
17=dht1 IF sensorTypeId=4
18=dht2 IF sensorTypeId=4
19=dht3 IF sensorTypeId=4
20=dht4 IF sensorTypeId=4
This makes it easy to know which dht object based on the sensorId
sensorId is mapped to a portNumber

clone mister - auto adjust over time,  day 1-3 every 5 min, day 4-7 every 10 min, etc
database is a mess, must clean it up!
Serial Terminal needs to be looked at, it locks up too often, 
and then bursts ahead. Would also like to process 1 char at a time instead of a line at a time but its so jerky

Switch module - should log clone misting so it can be confirmed.
- create table, any time a switch is "switched" it will be updated.
- maintenance module can monitor to ensure critical actions happen
Serial Terminal - tail debug log - get rid of autorefresh, add 
button to refresh. Load more lines, add scroll bars if needed
I'm thinking a table defining common math functions

1) A+B
2) A-B
3) B-A
4) A*B
5) A/B

So in the configuration for the sensors calibration, say for the LM35 Temperature Sensor, who's calculation is 

 Result = (X/1024.0) * 5000) / 10   where X is the Raw value read from the sensor.

Using multiple lines, this can be rewritten as:

Result = X/1024.0
Result = Result * 5000
Result = Result / 10

So if our configuration table allowed multiple lines per sensor, the record might look like:

wireless sensors for outdoor plants
solar charge battery oprerated
how long 9v battery last?

Even better, a battery powered sensor module in a weatherproof enclosure
to place in garden.
small solar panel to trickle charge
Lines of code Aug 8, 2019

autoWater2560 1960
autoWater8266 1488
maintenance 8266 2429
sensor 2560 3017
sensor 8266 3020
Switch 2560 2053
Switch 8266 1496
Webserver 8266 5301
Maint module
- min/max can be sped up by only looking at NEW data since last scan and compare to stored min/max
min/max table should include last logid of record scanned for min and max, so next time, 
we can scan > logid get the min a dn max, and compare those to the running min/max amounts.
Side effect of starting fresh log table, watering estimates no longer work until enough data is collected :(
Keep data in skinny table?
VPD: How Can Vapour Pressure Deficit Boost Cannabis Yields?
rpc server table - list each, with ip and rpc port...  assign id via commandline
add rpcServerId, and rpcServerComPort to module_ip table
If the existing com port is not valid, or points to wrong module, then option to choose another, 
and once connected, the module will update it
switch - mistSprayer
what about results or confirmation?  maybe water remaining? - can use water depth sensors I bought
Servo on switch module need more options...
Should be able to do the following
void servo.minus(degrees)
int   // degrees?

No comments:

Post a Comment

Any comments deemed off topic or offensive will be removed