A lack of reading in the first place unfortunately led to me making a few ordering errors. I now know that the xbee wireless module is not wireless in the way I was expecting, it communicates on 2.4GHz, BUT it is 802.15 and not 802.11 making it incompatible with wifi internet devices. I also discovered I would have saved a fair bit of cash and required fewer addons if I had known about the netduino plus. The netduino plus has ethernet on the board, its not wireless but it allows for a web connection out of the box. Also it has an micro SD slot on the board, meaning I wouldn't have needed the SD shield.
Since these belated discoveries I have returned the xbee module and adapter shield. My original plan was for wireless and I have looked at this briefly, however initial reading shows that this is somewhat problematic with the netduino. The wifly has a lot of issues and has no official drivers, it also requires external power to the netduino and a bit of pin rerouting. At this time, this doesn't sound like a practical option, so I am going to leave it until I have the board sensing and controlling. One possible option is to get the netduino plus, but for now I will still with the netduino until I have learnt a little more.
So I am getting to grips with C# slowly, managed to edit a little code and made my first break through and fatality at the same time. I found some code for one wire support http://forums.netduino.com/index.php?/topic/230-onewire-alpha/page__p__1505__hl__ds18b20__fromsearch__1#entry1505, again a feature not currently officially supported, and I managed to get a temperature reading eventually. I am using a DS18B20 and re-flashed the netduino with v4.1.1 beta with one wire. This was an experience and an encouraging learning curve in its self. I have now used SAMBA and MFDEPLOY which I have a feeling will become more and more necessary. This went well and I got my LED blink test running with a little help. The beta firmware can also be found on the link above.
I used the example program.cs code of the afore mentioned thread as well as the DS18B20.cs class from the example project. I need to reference the LE OneWire.dll from the zip and also the System.Threading reference to allow for degree characters.
This is my working code:
public class Program
public static void Main()
var oneWire = new OneWire(Pins.GPIO_PIN_D0); // Adjust the pin if necessary
// DS18B20 Thermometer
oneWire.WriteByte(OneWire.SkipRom); // Address all devices
Thread.Sleep(750); // Wait Tconv (for default 12-bit resolution)
// Read just the temperature (2 bytes)
var tempLo = oneWire.ReadByte();
var tempHi = oneWire.ReadByte();
var temp = DS18B20.GetTemperature(tempLo, tempHi); // ((short)((tempHi << 8) | tempLo))/16F
Debug.Print(temp.ToString() + " \u00b0" + "C");
// Copyright 2010 Stanislav "CW" Simicek
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/// DS18B20 Programmable Resolution 1-Wire Digital Thermometer
public static class DS18B20
public const byte FamilyCode = 0x28;
public const byte ConvertT = 0x44;
public const byte CopyScratchpad = 0x48;
public const byte WriteScratchpad = 0x4E;
public const byte ReadPowerSupply = 0xB4;
public const byte RecallE2 = 0xB8;
public const byte ReadScratchpad = 0xBE;
public static float GetTemperature(byte tempLo, byte tempHi)
return ((short)((tempHi << 8) | tempLo)) / 16F;
This gave me single temperature read outs that seemed very accurate from my testing with a digital thermometer. What I did next was the fatality......
Eager to get this in the fish tank I went about making my submersible temperature probe as per: http://www.practicalmaker.com/sensor/diy-waterproof-ds18b20-temperature-sensor. However I managed to snap a leg off the DS18B20. Since then I have decided to order a pre-made probe, I'm all for DIY but these look really good and safe for in the tank: http://www.earthshineelectronics.com/components/18-ds18b20-digital-temperature-probe.html
I have built a little connection device on some protoboard, essentially just some angled headers, a resistor and some normal headers, allowing me to connect the probe to the netduino easily with a resistor. I will upload a picture soon.
My next plan is to have another go at personalising the code so that I can get a reading once every 5 seconds and then will be to get this logged some how. I will also have a go at getting temperature reading to display on the the LCD.