Home > Brew gear, BrewzNET 2.0, Tech geeks > Unholy Alliance

Unholy Alliance

I did it. I’ve been considering it for a week or two, and I finally did it. I took the ApiFrameBuilder class out of the Grommet XBee library and fused it into the MFToolkit Xbee library. I have never been overly happy with how the original MFToolkit XBee class handled receiving data in on the serial port, and I did like the Grommet method – so I combined the best of both libraries. In short, it seems to work REALLY well. It even handles the crazy packet dump problem that was occuring before my Netduino reset every time. Yeah, the Netduino doesn’t seem to be rebooting anymore.

Xbee debugging 20140207

Cue the rays of light and the chorus of angels…

This also means that my code is no longer a direct port of EITHER of the libraries to VB, but I did leave the original header comments in the classes so full credit for those sections of code is traceable back to the original authors.

The other interesting side-effect of having a program that no longer reboots is I found additional issues with the original MFToolkit library, mainly that it doesn’t manage disposing of resources too well, so after 20 or so minutes of running, the program threw a “OutOfMemoryException” when trying to create new objects. I guess I am not surprised because there is a significant quantity of byte manipulation going on in memory using the MemoryStream object… so I ended up having to re-code 20-30 classes with Using / End Using blocks to try to force proper resource disposal. For PC-based .NET programs you probably would never see this, but on these smaller embedded platforms it appears that efficient and explicit use of Dispose() is critical. Or I need to buy a newer Netduino with more memory *GRIN*.

I still intend on trying to track down what is causing the byte dumps shown in the screenshot above, probably through the DIGI support forum, but for now I’m going to breathe a sigh of relief that my programs don’t crash and the Netduino keeps running. I opened a thread on the issue so hopefully someone will have some ideas.

I did finally get that replacement stainless float switch for the sparge arm assembly – check it out. It’s much smaller and provides significantly more vertical position adjustment options. I need to come up with a plan to keep the braided wires from becoming gross / discolored from repeated exposure to the wort (maybe I’ll just heat-shrink tubing the whole deal), but that’s a minor issue.


  1. No comments yet.
  1. June 22, 2014 at 7:28 am

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: