Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.

Bainesbunch

Member Since 17 Jul 2011
Offline Last Active Nov 14 2017 08:30 PM
-----

Topics I've Started

Mifare RFID Example Code With I2C LCD Output

18 January 2012 - 05:15 PM

Hello Folks, Here we have another piece of code that may be of use to other developers. It is basically a class that abstracts the basic functionality of an Mifare RFID reader. The device I have used (YHY502CTG) is self-contained and talks using UART level serial data and reads/writes to all Mifare cards. I have included the data sheet in the zip for reference. The sample application that it is a part of the download simply connects to the reader and requests its software revision and reader ID. It also uses the card present pin to trigger an interrupt that causes the device to start to read the present card. The class raises events when a card id read passing the card ID as a parameter. It also raises events for other things like error trapping and data transfer. It displays the data is reads onto 3 lines of a 4x20 LDC with the adafruites backpack attached talking via the I2C bus. I have used a re-compiled cut down version of the "MicroLiquidCrystal" library that I have included for completeness. It uses the "MCP23008LcdTransferProvider" to interface to tee LCD. The reader I have chosen has a lot more functionality than I have included in my abstraction. I only exposed the bits I needed. Please feel free to use this and if you have a need expand on the additional functions of the reader like electronic purse etc. and post it back. If you have any question please ask me and I will try and answer. Cheers Pete.

Plus no deploying any projects with 4.2 rc3

16 January 2012 - 09:05 PM

Hello Folks,

I have a mystery to solve.

I have just got my first plus and flashed it to 4.2 rc3 and since then it has refused to deploy any projects at all in either vb or c#.

So as a little experiment I re-flashed it with the 4.2 rc3 for non plus Netduinos. Now it will allow me to deploy projects in both vb and c#.

Just to be sure I was not going completely crazy I then flashed the 4.2 rc3 for plus back onto it and once again it refused to deploy any projects at all.

This is driving me crazy, can someone point me to the 4.1 release firmware so I can try rolling it back to see what happens please.

Cheers Pete.

4.2 VB.net String to double conversion

16 January 2012 - 03:12 PM

Hello Folks,

I am having some issues converting a string into a double using the CDbl(...) method. It is throwing a System.NotImplementedException.

How do we convert a string into a double without this method ?

I have a configuration file stored on the SD card where i save and retrieve values in an eye readable format so that the user can "edit" them in notepad etc. I.E. 100,10.000,2.5,6 these need to be read back into the application and converted into either bytes integers doubles etc. any help gratefully received.

the offending code looks like this


dim ErectParkDecerlationPoint as double = CDbl("10.000")


Here is the output trace for the call.



Step into: Stepping over non-user code 'Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble'
Step into: Stepping over non-user code 'Microsoft.VisualBasic.CompilerServices.Conversions.IsHexOrOctValue'
Step into: Stepping over non-user code 'Microsoft.VisualBasic.CompilerServices.Conversions.IsHexOrOctValue'
Step into: Stepping over non-user code 'Microsoft.VisualBasic.CompilerServices.Conversions.IsHexOrOctValue'
Step into: Stepping over non-user code 'Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble'
Step into: Stepping over non-user code 'Microsoft.VisualBasic.CompilerServices.Conversions.ParseDouble'
Step into: Stepping over non-user code 'Microsoft.VisualBasic.CompilerServices.Conversions.GetCultureInfo'
Step into: Stepping over non-user code 'System.Globalization.CultureInfo.CurrentUICulture.get'
Step into: Stepping over non-user code 'System.Globalization.CultureInfo.CurrentUICulture.get'
Step into: Stepping over non-user code 'Microsoft.VisualBasic.CompilerServices.Conversions.GetCultureInfo'
Step into: Stepping over non-user code 'Microsoft.VisualBasic.CompilerServices.Conversions.ParseDouble'
Step into: Stepping over non-user code 'System.Globalization.CultureInfo.NumberFormat.get'
Step into: Stepping over non-user code 'Microsoft.VisualBasic.CompilerServices.Conversions.ParseDouble'
Step into: Stepping over non-user code 'Microsoft.VisualBasic.CompilerServices.Conversions.GetNormalizedNumberFormat'
Step into: Stepping over non-user code 'System.Globalization.NumberFormatInfo.NumberDecimalSeparator.get'
Step into: Stepping over non-user code 'System.Globalization.CultureInfo.EnsureStringResource'
Step into: Stepping over non-user code 'System.Globalization.NumberFormatInfo.NumberDecimalSeparator.get'
Step into: Stepping over non-user code 'Microsoft.VisualBasic.CompilerServices.Conversions.GetNormalizedNumberFormat'
Step into: Stepping over non-user code 'System.Globalization.NumberFormatInfo.NumberGroupSeparator.get'
Step into: Stepping over non-user code 'System.Globalization.CultureInfo.EnsureStringResource'
Step into: Stepping over non-user code 'System.Resources.ResourceManager.GetObjectFromId'
Step into: Stepping over non-user code 'System.Resources.ResourceManager.GetObjectFromId'
Step into: Stepping over non-user code 'System.Globalization.CultureInfo.EnsureStringResource'
Step into: Stepping over non-user code 'System.Globalization.NumberFormatInfo.NumberGroupSeparator.get'
Step into: Stepping over non-user code 'Microsoft.VisualBasic.CompilerServices.Conversions.GetNormalizedNumberFormat'
Step into: Stepping over non-user code 'System.Globalization.NumberFormatInfo.NumberDecimalSeparator.get'
Step into: Stepping over non-user code 'System.Globalization.CultureInfo.EnsureStringResource'
Step into: Stepping over non-user code 'System.Globalization.NumberFormatInfo.NumberDecimalSeparator.get'
Step into: Stepping over non-user code 'Microsoft.VisualBasic.CompilerServices.Conversions.GetNormalizedNumberFormat'
Step into: Stepping over non-user code 'Microsoft.VisualBasic.CompilerServices.Conversions.GetNormalizedNumberFormat'
Step into: Stepping over non-user code 'System.Globalization.NumberFormatInfo.NumberGroupSeparator.get'
Step into: Stepping over non-user code 'System.Globalization.CultureInfo.EnsureStringResource'
Step into: Stepping over non-user code 'System.Globalization.NumberFormatInfo.NumberGroupSeparator.get'
Step into: Stepping over non-user code 'Microsoft.VisualBasic.CompilerServices.Conversions.GetNormalizedNumberFormat'
Step into: Stepping over non-user code 'Microsoft.VisualBasic.CompilerServices.Conversions.GetNormalizedNumberFormat'
Step into: Stepping over non-user code 'Microsoft.VisualBasic.CompilerServices.Conversions.ParseDouble'
Step into: Stepping over non-user code 'Microsoft.VisualBasic.CompilerServices.Conversions.ToHalfwidthNumbers'
Step into: Stepping over non-user code 'Microsoft.VisualBasic.CompilerServices.Conversions.ParseDouble'
Step into: Stepping over non-user code 'double.Parse'
Step into: Stepping over non-user code 'System.Convert.ToDouble'
Step into: Stepping over non-user code 'System.Convert.ToDouble'
Step into: Stepping over non-user code 'System.Convert.ToDouble'
Step into: Stepping over non-user code 'System.Convert.ToDouble'
Step into: Stepping over non-user code 'System.Convert.ToDouble'
Step into: Stepping over non-user code 'System.Convert.ToDouble'
Step into: Stepping over non-user code 'System.Convert.ToDouble'
Step into: Stepping over non-user code 'System.Convert.GetDoubleNumber'
Step into: Stepping over non-user code 'System.Convert.ToDouble'
A first chance exception of type 'System.NotImplementedException' occurred in mscorlib.dll
Step into: Stepping over non-user code 'Microsoft.VisualBasic.CompilerServices.Conversions.ParseDouble'
A first chance exception of type 'System.NotImplementedException' occurred in Microsoft.VisualBasic.dll
Step into: Stepping over non-user code 'Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble'
Step into: Stepping over non-user code 'System.Exception.Message.get'
Step into: Stepping over non-user code 'System.Exception.Message.get'
Step into: Stepping over non-user code 'System.Exception.Message.get'
Step into: Stepping over non-user code 'System.Exception.Message.get'
Step into: Stepping over non-user code 'Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble'
Step into: Stepping over non-user code 'System.InvalidCastException.InvalidCastException'
Step into: Stepping over non-user code 'System.SystemException.SystemException'
Step into: Stepping over non-user code 'System.Exception.Exception'
Step into: Stepping over non-user code 'System.Exception.Exception'
Step into: Stepping over non-user code 'System.SystemException.SystemException'
Step into: Stepping over non-user code 'System.InvalidCastException.InvalidCastException'
Step into: Stepping over non-user code 'Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble'
A first chance exception of type 'System.InvalidCastException' occurred in Microsoft.VisualBasic.dll
Step into: Stepping over non-user code 'System.IO.TextReader.Dispose'
Step into: Stepping over non-user code 'System.IO.StreamReader.Dispose'
Step into: Stepping over non-user code 'System.IO.Stream.Close'
Step into: Stepping over non-user code 'System.IO.FileStream.Dispose'
Step into: Stepping over non-user code 'System.IO.FileStream.Dispose'
Step into: Stepping over non-user code 'System.IO.FileSystemManager.RemoveFromOpenList'
Step into: Stepping over non-user code 'System.IO.FileSystemManager.RemoveFromOpenList'
Step into: Stepping over non-user code 'System.Collections.ArrayList.Remove'
Step into: Stepping over non-user code 'System.Array.IndexOf'
Step into: Stepping over non-user code 'System.Array.IndexOf'
Step into: Stepping over non-user code 'System.Collections.ArrayList.Remove'
Step into: Stepping over non-user code 'System.Collections.ArrayList.Remove'
Step into: Stepping over non-user code 'System.IO.FileSystemManager.RemoveFromOpenList'
Step into: Stepping over non-user code 'System.IO.FileStream.Dispose'
Step into: Stepping over non-user code 'System.IO.Stream.Close'
Step into: Stepping over non-user code 'System.IO.Stream.Close'
Step into: Stepping over non-user code 'System.IO.StreamReader.Dispose'
Step into: Stepping over non-user code 'System.IO.TextReader.Dispose'
Step into: Stepping over non-user code 'System.IO.TextReader.Dispose'
Step into: Stepping over non-user code 'System.IO.Stream.Dispose'
Step into: Stepping over non-user code 'System.IO.Stream.Close'
Step into: Stepping over non-user code 'System.IO.FileStream.Dispose'
Step into: Stepping over non-user code 'System.IO.Stream.Close'
Step into: Stepping over non-user code 'System.IO.Stream.Close'
Step into: Stepping over non-user code 'System.IO.Stream.Dispose'
Step into: Stepping over non-user code 'Microsoft.VisualBasic.CompilerServices.ProjectData.SetProjectError'


home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.