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...

Monday, September 2, 2019

Daily Review Sept 2, 2019

Posted: 2:55am

I just attempted to create a library with all the ESP8266 specific routines from my code, so each module just uses the library. 

After a couple hours, I realized that I really  do not understand how to create a library. Oh I can create a basic library, but make it more complex, I get caught up in where and how I can or can't access methods and variables, should it be static or not,  all that stuff. 

It's time to go back to school :)  I'm going to take a break from the Switch Module, and educate myself regarding arduino libraries - sidetracked again!

Posted: 3:50am

There are tons of tutorials on how to create the most basic library, but not so many covering more complex things like callbacks, which if I can implement, would mean that the XML processor can go into the library, and just call back to the module code with data for it to consume.

So I've been reading, and think I'm ready to give it a shot, but I'm gonna go off for a nap first. I only sleep an hour or two at a time usually, a couple times a day, I love all the time it gives me for working on Grow By Wire!

Update 6:55am

I'm still trying to wrap my head around callbacks from an arduino library.  In fact, I'm not even sure I need to do a callback, I guess I haven't really thought about my options here.

Update: 12:00pm

Turns out there is very little of the xml code that can be shared due to the extreme differences in the data being received. While keeping the code in the main file will include some code that is duplicated in all modules, the amount of customization makes putting it in a library a rather large task, for no real savings in speed or memory usage.  So I was back to upgrading the Switch Module to the V2 format.

Then I got sidetracked AGAIN!  My wifes computer died, and she can''t get to her facebook games! Big Emergency... Turns out it's the monitor, so I hooked her up to the 50" HDTV (I'm using a 42" HDTV) and she's happy again, and my back is killing me, big time!

Update: 6:30pm

I have the shell of the ESP8266 firmware working now, so I copied the code to a text file, saving it as the 8266 Template, so when I create, or upgrade, any Mega/Esp modules, I can cut and paste and be partly done...

Now I'm starting on the 2560 code, and will do the same thing.

Update: 10:40pm

Not much progress, but I had a rest, so I'm ready to go tonight...  As well as coding, I also want to spend a little bit of time going back and revisiting my Dual Level Soil Moisture Sensors. Initially I was quite excited to be able to measure the soil moisture at two different levels within the pot, but after a while, I realized the readings weren't accurate, in fact, I didn't even see a pattern.

Now that I'm using the 17L pails, they are quite deep, I would love to have these sensors working. I have two that I made, they are I2C devices, so they don't take up analog ports, however, each sensor requires an arduino pro/mini as the I2C Slave which reads the sensors on its own analog ports. I'll likely create a separate post for the whole process of testing and fixing...

No comments:

Post a Comment

Any comments deemed off topic or offensive will be removed