Sunroom Logger Part 6 – A Small Rabbit Hole

In our last episode, we were going to actually get temperature measurements! Until we had a Unhandled Exception: System.ArgumentOutOfRangeException: Specified argument was out of the range of v alid values. Parameter name: processor at Raspberry.IO.GeneralPurpose.MemoryGpioConnectionDriver.GetProcessorBaseAddr ess (Raspberry.Processor processor) [0x00020] in <39616ab275014559a5b975fe859e9a d9>:0 To the internet! Between looking at various Github Issues and Pull Requests, I discovered a few things: I have an older Model B (Hardware Rev 0010) The main raspberry sharp projects have not updated in 11+ months Lots of other people have been forking and improving the project Figuring out which fork to follow is kind of a pain (It’s great that people can make forks and improvements, yes, but if those improvements don’t get pulled back to a core trunk of code, then piecing them together becomes impossible if you want features from two distant branches) At this point I needed to decide whether I was going […]

Read more

Sunroom Logger Part 5

Data Structures I spent some time with MySQL Workbench setting up a data structure that should allow an unlimited number of sensors to be logged to a generic structure. This database structure was deployed to a local server on my windows development machine, the Pi (running MariaDB, which appears to work with MySQL Workbench with only minor complaints), and also to my webhost. This is similar to a structure I use at work. Each ‘device’ can then have a local DB that is always available. Then some (so far unwritten) task can copy the data up to the webhost, which is used as a warehouse for the data. If for some reason the pi loses its network connection, it still can record locally with no data loss. There is a stored procedure on the DB that the program can use to determine what kind of device it is (not hard […]

Read more

Sunroom Logger Part 4

Mono just works. Hello World was up and running on the first try. Now to read about using the I/O and look at examples for the DHT11 Temperature/humidity sensor. Raspberry.IO.GeneralPurpose is available via nuget, but the Raspberry.IO.Components project is not. I pulled down a local copy of the repository, created a quick nuspec file (based on the provided nuspec for the GeneralPurpose), and built a nupkg. I also had to turn on the XML Documentation checkbox for Release and Debug configurations in the Build Properties. I then added a local nuget source in VS pointing to my Github folder, and was able to install Raspberry.IO.Components to my project. I also downloaded MySQL on my development computer and on the Pi, as well as configuring a new DB on my webhost. I’ve been learning a lot of SQL at work lately, so am trying to apply that here as well. I’ve created […]

Read more