- Netduino Forums
- → Viewing Profile: Likes: KiwiDev
Community Stats
- Group Members
- Active Posts 100
- Profile Views 14645
- Member Title Advanced Member
- Age Age Unknown
- Birthday Birthday Unknown
-
Gender
Male
-
Location
New Zealand
#64900 How to retrieve Assembly Version?
Posted by KiwiDev
on 19 February 2016 - 09:43 AM
#64511 I2C strange behavior
Posted by KiwiDev
on 15 November 2015 - 03:28 AM
Hi
Try strobing the SDA line just before you open the port
using (OutputPort i2cPort = new OutputPort(Pins.GPIO_PIN_SDA, true)) { i2cPort.Write(false); Thread.Sleep(100); }
I think the earliest reference to this issue may have been
http://forums.netdui...5-barometer-i2c
@KiwiBryn
blog.devmobile.co.nz
#64360 Azure EventHub Service Gateway for nRF24 Equipped *duino Devices
Posted by KiwiDev
on 23 October 2015 - 06:46 AM
Hi all,
I have a few *duino devices around my house collecting information from a bunch of different types of sensors. The *duino devices all have nRF24 capability and this looked like a good way to get data upto an Azure EventHub.
The software uses AMQPNetLite which provides a lightweight implementation of the AMQP protocol and the Nordic nRF24L01 Net Micro Framework Driver from codeplex.
On application start up the nRF24L01, Azure Event Hub and network settings are loaded from the MicroSD card. If there is no configuration file on the MicroSD card an empty template is created.
The software is reasonably reliable, when my internet connection fails it recovers gracefully and resumes uploading events when connectivity is restored. The only issue is when the wireless access point is restarted, when the device reconnects it locks up and doesn’t continue.
I have been looking at rebooting the device in the NetworkChange_NetworkAvailabilityChanged handler when connectivity is restored.
@KiwiBryn
blog.devmobile.co.nz
#64040 Microsoft Ignite NZ session with Netduino devices
Posted by KiwiDev
on 05 September 2015 - 09:52 PM
Hi all,
Last week I did a session about devices at Microsoft Ignite (Formerly TechEd) New Zealand.
All your device are belong to us
So much hype, so many different devices, so many protocols, so much data, so little security, welcome to the Internet of Things. Come and see how you can build an affordable, securable, scalable, interoperable, robust & reliable solution with embedded devices, Windows 10 IoT and Microsoft Azure. By 2020 there will be 26 Billion devices and 4.5 million developers building solutions so the scope is limitless
I had a lot of kit on stage with 3 Netduinos, 3 Arduinos, and 2 Raspberry PI devices (running Windows 10 IoT Core) featuring in my 3 sets of demos.
First Demo
This demo was about connecting sensors. I showed the different programing models used to read data from an ADXL345 accelerometer
Arduino Uno R3
Netduino 3
Raspberry PI WIndows 10 IoT Core
Second Demo
This was about hobbyist devices, wireless connectivity and cloud data services (I used Xively). I had 3 devices, two of which I passed into the audience for them to have a closer look at.
Netduino 3 Ethernet - Running my nRF24L01 Field gateway
devDuino 1.3 + temperature & Humidity sensor
devDuino 2.0 + temperature & Humidity sensor
Third Demo
An Azure ServiceBus EventHub (for telemetry) and a ServiceBus queue (for commands). My scenario was a vineyard managing frost fans to stop the crop getting damaged when it gets really cold.
Netduino 3 Wifi + DS18B20 temperature sensor uploading readings to an EventHub
Raspberry PI running Windows 10 IoT Core receiving messages from a queue and turning a small fan on/off
The code for Netduino 3 & RPI was built using Azure Service Bus Lite which worked really well.
I spent too much time preparing & testing but all my demos worked....
@KiwiDev
blog.devmobile.co.nz
Attached Files
-
FrostFan.png 262.48KB 4 downloads
- TechnoGuy likes this
#63423 Netduino 3 Wifi nRF24L01 Xively Home Monitoring Gateway
Posted by KiwiDev
on 08 July 2015 - 11:17 AM
Hi all,
Currently I'm plottingthe temperature & humidity of the 3 bedrooms in our house on Xively using a selection of Arduino, devDuino & Netduino devices connected using nRF24L01 wireless modules.
The power consumption data feed is coming, the code is finished, I have just got to install the sensor on the main feed from the street but it's mid winter here and it's sleeting outside so I am not in a hurry.
The *duino devices upload sensor data to the Netduino 3 Wifi which is equipped with an nRF24L01 shield from
The Arduino Uno R3 device also uses an Embedded Coolness shield.
The devDuino V1.3, V2& V3devices have on-board nRF24L01 connectivity.
The temperature and humidity sensors are all Silicon Labs Si7005 devices so the results are consistent.
The power consumption monitor is Netduino based and using a devicter Energy Monitoring Shield which I have modified to work with 3v3 Netduino devices. For more detail about how to program the energy monitor shield see these posts about the Nokia 5110 display, nrf24L01 wireless link, and non invasive current sensor algorithm optimisations.
The Netduino 3 Wifi ran for a week without stopping, and would have gone for longer but I had to update the software.
All the configuration is stored on the MicroSD card so a gateway can be configured with MFDeploy and a text editor (I was looking at putting the network settings on the MIcroSD card as well if possible).
Next deployment will be using a Netduino 2 Plus and the new TCP-IP stack
For more info see http://blog.devmobil...f24l01-gateway/
Bryn
@KiwiBryn
Attached Files
-
Netduino3WifiXivelynRF24GatewayClients.jpg 169.05KB 3 downloads
- FourT2 likes this
#62410 Netduino 3 Wifi Azure Event Hub Client
Posted by KiwiDev
on 03 May 2015 - 05:37 AM
Hi all,
I do a bit of Azure IoT dev and wanted to see how easy it would be to get a N3 uploading data to a Microsoft Azure Event Hub.
My Arduino & Netduino 2 Plus devices can't do https so I had built a lightweight field gateway (a self installing windows service) to upload data from sensors around my home.
An Azure Event hub can cope with millions of events per second so I figured my single device with a couple of DS18B20 temperature sensors, uploading every 15 sec shouldn't be a problem.
The N3 uses a TI CC3100 wifi module which has on board SSL 3.0 and TLS 1.2 so I was hoping this would be more reliable than the native NetMF SSL stack.(I had problems with a memory leak)
So far things are looking positive, the N3 has been running for a couple of days and recovered gracefully from brief connectivity dropouts.
Have a look at the blog posting which has the code etc.
@KiwiBryn
blog.devmobile.co.nz
Attached Files
-
Netduino3WifiFridge.jpg 60.55KB 1 downloads
- FourT2 likes this
#61858 Azure EventHub Service Gateway for Netduino Devices
Posted by KiwiDev
on 14 March 2015 - 02:58 AM
Hi All,
I do a bit of Azure development and I was keen to see how hard it would be to upload some sensor data from my Netduino devices to an Azure Event Hub so I could monitor the water and power consumption of my house. The Netduino doesn't (currently) support HTTPS so (inspired by Clemens Vasters @clemensv) I built a light weight Service Gateway to forward the data to Azure.
The service gateway runs as a Windows Service so it could be installed on pretty much any PC (e.g. I could host it on my WIndows PVR which is on 24x7). For testing I have been using one of my CodeClubnon-invasive current clamp boxes The design and code assumes that the devices and gateway will be running on a secure LAN and the volume of traffic will not be high.
For more info see my blog where the source can be downloaded.
The Windows Service has 4 command line parameters
- Install - install the service
- Uninstall - uninstalls the service
- Debug - runs the service in interactive mode
- Name - allows you to specify the name of the service in the Services Manager
It's a proof of concept which I will enhance as time allows. Next steps most probably an installer using the Wix# tooling.
- herbsti72 likes this
#61028 Cant get an IP address
Posted by KiwiDev
on 20 December 2014 - 07:05 AM
Hi Terrence,
Trying setting the device MAC address using the MFDeploy tool so you don't have to hard code it in your app.
Here is some code I use for showing network config, connectivity status changes etc.
Bryn
blog.devmobile.co.nz
using System; using System.Net; using System.Threading; using Microsoft.SPOT; using Microsoft.SPOT.Net.NetworkInformation; public class Program { public static void Main() { NetworkInterface networkInterface = NetworkInterface.GetAllNetworkInterfaces()[0]; // Comment in/out as required or us MF Deploy networkInterface.EnableDhcp(); networkInterface.EnableDynamicDns(); NetworkChange.NetworkAvailabilityChanged += NetworkChange_NetworkAvailabilityChanged; NetworkChange.NetworkAddressChanged += NetworkChange_NetworkAddressChanged; // Display network config for debugging DisplayNetworkInformation(); while (NetworkInterface.GetAllNetworkInterfaces()[0].IPAddress == IPAddress.Any.ToString()) { Debug.Print("Waiting for an IP Address..."); Thread.Sleep(1000); } Thread.Sleep(Timeout.Infinite); } static void NetworkChange_NetworkAvailabilityChanged(object sender, NetworkAvailabilityEventArgs e) { Debug.Print("NetworkChange_NetworkAvailabilityChanged " + e.IsAvailable.ToString()); } static void NetworkChange_NetworkAddressChanged(object sender, EventArgs e) { Debug.Print("NetworkChange_NetworkAddressChanged"); DisplayNetworkInformation(); } public static void DisplayNetworkInformation() { NetworkInterface networkInterface = NetworkInterface.GetAllNetworkInterfaces()[0]; // Display network config for debugging Debug.Print("Network configuration"); Debug.Print(" Network interface type: " + networkInterface.NetworkInterfaceType.ToString()); Debug.Print(" MAC Address: " + BytesToHexString(networkInterface.PhysicalAddress)); Debug.Print(" DHCP enabled: " + networkInterface.IsDhcpEnabled.ToString()); Debug.Print(" Dynamic DNS enabled: " + networkInterface.IsDynamicDnsEnabled.ToString()); Debug.Print(" IP Address: " + networkInterface.IPAddress); Debug.Print(" Subnet Mask: " + networkInterface.SubnetMask); Debug.Print(" Gateway: " + networkInterface.GatewayAddress); } public static string BytesToHexString(byte[] bytes) { string hexString = string.Empty; // Create a character array for hexidecimal conversion. const string hexChars = "0123456789ABCDEF"; // Loop through the bytes. for (byte b = 0; b < bytes.Length; b++) { if (b > 0) hexString += "-"; // Grab the top 4 bits and append the hex equivalent to the return string. hexString += hexChars[bytes[b] >> 4]; // Mask off the upper 4 bits to get the rest of it. hexString += hexChars[bytes[b] & 0x0F]; } return hexString; } }
- mregen likes this
#60979 To Chris Walker
Posted by KiwiDev
on 15 December 2014 - 10:05 AM
Hi David,
It's late here 11:00pm so just had a quick look at the solution\project.
I noticed not all the project reference assemblies have the same NetMF version.
SecretLabs.NETMF.Hardware is 4.1 the rest are 4.2 try updating the reference and see what happens.
Bryn
blog.devmobile.co.nz
- david98xp likes this
- Netduino Forums
- → Viewing Profile: Likes: KiwiDev
- Privacy Policy