Hi. Has anyone implemented Socket.io on a N+2? Thanks.
- Netduino Forums
- → Viewing Profile: Topics: AndrejsM
Community Stats
- Group Members
- Active Posts 18
- Profile Views 7782
- Member Title Member
- Age Age Unknown
- Birthday Birthday Unknown
-
Gender
Male
-
Location
Atlanta
User Tools
Friends
AndrejsM hasn't added any friends yet.
Latest Visitors
Topics I've Started
Has anyone implemented Socket.io on a N+2?
07 March 2013 - 01:24 PM
Is there a TcpClient class for the N+2?
21 February 2013 - 03:53 PM
Hi. Is there a TcpClient class for the N+2? If there is, I couldn't find it. If not, what is the method used to send a data stream other than http? Anyone know? Thanks for your help.
STM32 Bootloader tip
12 February 2013 - 01:17 PM
Hi. I thought I would post this in case anyone else was having the same problem.
I was having the hardest time getting the correct driver installed so that I could use STDFU Tester v3.0.1 correctly and flash my N+2 to 4.3 firmware. Either I already had, or the installer was installing a 2009 version of STTub30.sys in my WindowsSystem32drivers directory. I was unable to flash the firmware according to the instructions in the forum. On my third attempt on a third computer, a 2012 version of STTub30.sys appeared in the directory (don't know how, all three laptops are Windows 7, and I thought all were set up the same, I guess not). Anyway, To fix my problems on the other two machines, I installed STDFU Tester v3.0.1, then copied and replaced the attached 2012 version of the file over the 2009 version, and tada, the software all worked and I was able to flash the firmware. I hope this can help someone.
DS18B20 problems, please help.
31 January 2013 - 03:53 PM
using System;using System.Net;using System.Net.Sockets;using System.Threading;using Microsoft.SPOT;using Microsoft.SPOT.Hardware;using SecretLabs.NETMF.Hardware;using SecretLabs.NETMF.Hardware.Netduino;using Microsoft.SPOT.Net.NetworkInformation;namespace TemperatureTest_01{ public class Program { public static void Main() { OutputPort portZero = new OutputPort(Cpu.Pin.GPIO_Pin0, false); OneWire sensorOne = new OneWire(portZero); while (true) { sensorOne.TouchReset(); //<--Reset DS18B20 sensorOne.WriteByte(0xCC); //<--Skip ROM sensorOne.WriteByte(0x44); //<--Convert T while (sensorOne.ReadByte() == 0); //<--Wait while DS18B20 gets the temperature (about 750ms) sensorOne.TouchReset(); //<--Reset DS18B20 sensorOne.WriteByte(0xCC); //<--Skip ROM sensorOne.WriteByte(0xBE); //<--Read Scratchpad // Read just the temperature (2 bytes) var tempLo = sensorOne.ReadByte(); var tempHi = sensorOne.ReadByte(); var temp = ((short)((tempHi << 8) | tempLo))/16F; sensorOne.TouchReset(); //<--Reset DS18B20 Debug.Print("Temperature: " + temp); Thread.Sleep(5000); } } }}
MY DEBUG OUTPUT (parasite power):
PARASITE POWERCreate TS. Loading start at 806a328, end 808443cAssembly: mscorlib (4.2.0.0)Assembly: Microsoft.SPOT.Native (4.2.0.0)Assembly: Microsoft.SPOT.Hardware (4.2.0.0)Assembly: Microsoft.SPOT.Net (4.2.0.0)Assembly: System (4.2.0.0)Assembly: Microsoft.SPOT.Hardware.SerialPort (4.2.0.0)Assembly: Microsoft.SPOT.IO (4.2.0.0)Assembly: System.IO (4.2.0.0)Assembly: Microsoft.SPOT.Hardware.PWM (4.2.0.1)Assembly: Microsoft.SPOT.Hardware.Usb (4.2.0.0)Assembly: SecretLabs.NETMF.Diagnostics (4.2.0.0)Assembly: SecretLabs.NETMF.Hardware.Netduino (4.2.1.0)Assembly: Microsoft.SPOT.Hardware.OneWire (4.2.0.0)Assembly: Microsoft.SPOT.Time (4.2.0.0)Loading Deployment Assemblies.Attaching deployed file.Assembly: SecretLabs.NETMF.Hardware (4.2.0.0)Attaching deployed file.Assembly: TemperatureTest_01 (1.0.0.0)Resolving.The debugging target runtime is loading the application assemblies and starting execution.Ready.'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:Program Files (x86)Microsoft .NET Micro Frameworkv4.2Assemblieslemscorlib.dll', Symbols loaded.'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:Program Files (x86)Microsoft .NET Micro Frameworkv4.2AssembliesleMicrosoft.SPOT.Native.dll', Symbols loaded.'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:Program Files (x86)Microsoft .NET Micro Frameworkv4.2AssembliesleMicrosoft.SPOT.Hardware.dll', Symbols loaded.'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:Program Files (x86)Microsoft .NET Micro Frameworkv4.2AssembliesleMicrosoft.SPOT.Net.dll', Symbols loaded.'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:Program Files (x86)Microsoft .NET Micro Frameworkv4.2AssembliesleSystem.dll', Symbols loaded.'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:Program Files (x86)Microsoft .NET Micro Frameworkv4.2AssembliesleMicrosoft.SPOT.Hardware.SerialPort.dll', Symbols loaded.'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:Program Files (x86)Microsoft .NET Micro Frameworkv4.2AssembliesleMicrosoft.SPOT.IO.dll', Symbols loaded.'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:Program Files (x86)Microsoft .NET Micro Frameworkv4.2AssembliesleSystem.IO.dll', Symbols loaded.'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:Program Files (x86)Microsoft .NET Micro Frameworkv4.2AssembliesleMicrosoft.SPOT.Hardware.PWM.dll', Symbols loaded.'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:Program Files (x86)Microsoft .NET Micro Frameworkv4.2AssembliesleMicrosoft.SPOT.Hardware.Usb.dll', Symbols loaded.'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:Program Files (x86)Secret LabsNetduino SDKAssembliesv4.2leSecretLabs.NETMF.Diagnostics.dll', Symbols loaded.'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:Program Files (x86)Secret LabsNetduino SDKAssembliesv4.2leSecretLabs.NETMF.Hardware.Netduino.dll', Symbols loaded.'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:Program Files (x86)Microsoft .NET Micro Frameworkv4.2AssembliesleMicrosoft.SPOT.Hardware.OneWire.dll', Symbols loaded.'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:Program Files (x86)Microsoft .NET Micro Frameworkv4.2AssembliesleMicrosoft.SPOT.Time.dll', Symbols loaded.'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:Program Files (x86)Secret LabsNetduino SDKAssembliesv4.2leSecretLabs.NETMF.Hardware.dll', Symbols loaded.'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'c:UsersAndrejsDocumentsVisual Studio 2010ProjectsTemperatureTest_01TemperatureTest_01binDebugleTemperatureTest_01.exe', Symbols loaded.The thread '<No Name>' (0x2) has exited with code 0 (0x0).Temperature: -0.0625Temperature: -0.0625Temperature: -0.0625Temperature: -0.0625Temperature: -0.0625The program '[15] Micro Framework application: Managed' has exited with code 0 (0x0).
MY DEBUG OUTPUT (regular, non-parasite power)
REGULAR, NO PARISITE POWERCreate TS. Loading start at 806a328, end 808443cAssembly: mscorlib (4.2.0.0)Assembly: Microsoft.SPOT.Native (4.2.0.0)Assembly: Microsoft.SPOT.Hardware (4.2.0.0)Assembly: Microsoft.SPOT.Net (4.2.0.0)Assembly: System (4.2.0.0)Assembly: Microsoft.SPOT.Hardware.SerialPort (4.2.0.0)Assembly: Microsoft.SPOT.IO (4.2.0.0)Assembly: System.IO (4.2.0.0)Assembly: Microsoft.SPOT.Hardware.PWM (4.2.0.1)Assembly: Microsoft.SPOT.Hardware.Usb (4.2.0.0)Assembly: SecretLabs.NETMF.Diagnostics (4.2.0.0)Assembly: SecretLabs.NETMF.Hardware.Netduino (4.2.1.0)Assembly: Microsoft.SPOT.Hardware.OneWire (4.2.0.0)Assembly: Microsoft.SPOT.Time (4.2.0.0)Loading Deployment Assemblies.Attaching deployed file.Assembly: SecretLabs.NETMF.Hardware (4.2.0.0)Attaching deployed file.Assembly: TemperatureTest_01 (1.0.0.0)Resolving.The debugging target runtime is loading the application assemblies and starting execution.Ready.'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:Program Files (x86)Microsoft .NET Micro Frameworkv4.2Assemblieslemscorlib.dll', Symbols loaded.'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:Program Files (x86)Microsoft .NET Micro Frameworkv4.2AssembliesleMicrosoft.SPOT.Native.dll', Symbols loaded.'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:Program Files (x86)Microsoft .NET Micro Frameworkv4.2AssembliesleMicrosoft.SPOT.Hardware.dll', Symbols loaded.'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:Program Files (x86)Microsoft .NET Micro Frameworkv4.2AssembliesleMicrosoft.SPOT.Net.dll', Symbols loaded.'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:Program Files (x86)Microsoft .NET Micro Frameworkv4.2AssembliesleSystem.dll', Symbols loaded.'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:Program Files (x86)Microsoft .NET Micro Frameworkv4.2AssembliesleMicrosoft.SPOT.Hardware.SerialPort.dll', Symbols loaded.'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:Program Files (x86)Microsoft .NET Micro Frameworkv4.2AssembliesleMicrosoft.SPOT.IO.dll', Symbols loaded.'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:Program Files (x86)Microsoft .NET Micro Frameworkv4.2AssembliesleSystem.IO.dll', Symbols loaded.'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:Program Files (x86)Microsoft .NET Micro Frameworkv4.2AssembliesleMicrosoft.SPOT.Hardware.PWM.dll', Symbols loaded.'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:Program Files (x86)Microsoft .NET Micro Frameworkv4.2AssembliesleMicrosoft.SPOT.Hardware.Usb.dll', Symbols loaded.'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:Program Files (x86)Secret LabsNetduino SDKAssembliesv4.2leSecretLabs.NETMF.Diagnostics.dll', Symbols loaded.'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:Program Files (x86)Secret LabsNetduino SDKAssembliesv4.2leSecretLabs.NETMF.Hardware.Netduino.dll', Symbols loaded.'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:Program Files (x86)Microsoft .NET Micro Frameworkv4.2AssembliesleMicrosoft.SPOT.Hardware.OneWire.dll', Symbols loaded.'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:Program Files (x86)Microsoft .NET Micro Frameworkv4.2AssembliesleMicrosoft.SPOT.Time.dll', Symbols loaded.'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:Program Files (x86)Secret LabsNetduino SDKAssembliesv4.2leSecretLabs.NETMF.Hardware.dll', Symbols loaded.'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'c:UsersAndrejsDocumentsVisual Studio 2010ProjectsTemperatureTest_01TemperatureTest_01binDebugleTemperatureTest_01.exe', Symbols loaded.The thread '<No Name>' (0x2) has exited with code 0 (0x0).Temperature: -0.0625Temperature: -0.0625Temperature: -0.0625Temperature: -0.0625Temperature: -0.0625The program '[16] Micro Framework application: Managed' has exited with code 0 (0x0).
THE WIRING MODEL I USED
MY ACTUAL WIRING
Is there any proper documentation for OneWire class?
26 January 2013 - 10:05 PM
Hi. I have found many examples of how to use a DS18B20 and exactly what code to write. However, I don't understand the why. Microsoft has some documentation for the Microsoft.SPOT.Hardware.OneWire class, however there are no descriptions. It mentions all of the methods, but there is no hint to exact implementation. What I specifically need help with is something like this;
[color=rgb(40,40,40);font-family:helvetica, arial, sans-serif;]ow.WriteByte(0xBE)[/color]
[color=rgb(40,40,40);font-family:helvetica, arial, sans-serif;]I know the 'ow' is the onewire object and the WriteByte() is the method, but why am I using '0xBE'? What is that?[/color]
[color=rgb(40,40,40);font-family:helvetica, arial, sans-serif;]ow.WriteByte(0xCC)[/color]
[color=rgb(40,40,40);font-family:helvetica, arial, sans-serif;]Same here, what is the '0xCC' ?[/color]
When do I ReadByte() or WriteByte() or TouchReset()? What exactly do the methods mean and which ones do you use, and when? I am a .NET engineer for my day job, however I am used to having SDK docs for everything I code. Writing standard software to be run on Windows 7 or 8 I understand. The lack of documentation for the OneWire class has me very frustrated!
Can anyone please help and point me in the right direction? Thanks.
- Netduino Forums
- → Viewing Profile: Topics: AndrejsM
- Privacy Policy