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.

supra

Member Since 14 Apr 2012
Offline Last Active Sep 11 2013 12:02 PM
-----

Posts I've Made

In Topic: Fingerprint scanner & Netduino 2

14 February 2013 - 07:37 PM

Here is new one...very cheap.

https://www.sparkfun...products/11651?

 

Here is video demo:


In Topic: NTP Time howto call with SDK 4.3

04 February 2013 - 05:44 PM

hello, We are upgrading to 4.3 but now we get a error bitwise shifting in Visual Basic to get the time from a NTP time server. This is old code and always worked in 4.2

 

 

 

Dim lIntPart As Long = 0 Dim lFractPart As Long = 0

For i As Integer = 0 To 3 lIntPart = (lIntPart << 8) Or ntpData(bOffsetTransmitTime + i) Next   For i As Integer = 4 To 7 lFractPart = (lFractPart << 8) Or ntpData(bOffsetTransmitTime + i) Next  

 

Error 1 Type 'System.Nullable(Of )' is not defined. (The error is under the << 8)

 

Does anyone knows why and also there is a buildin function in the SDK 4.3 for calling the time server.

How can we call this function?  

 

You cannot use Or inside looping;

Only block IF/then ELSE condition.

 

SUpra.


In Topic: NTP Time howto call with SDK 4.3

04 February 2013 - 05:32 PM

hello, We are upgrading to 4.3 but now we get a error bitwise shifting in Visual Basic to get the time from a NTP time server. This is old code and always worked in 4.2

 

 

 

Dim lIntPart As Long = 0 Dim lFractPart As Long = 0

For i As Integer = 0 To 3 lIntPart = (lIntPart << 8) Or ntpData(bOffsetTransmitTime + i) Next   For i As Integer = 4 To 7 lFractPart = (lFractPart << 8) Or ntpData(bOffsetTransmitTime + i) Next  

 

Error 1 Type 'System.Nullable(Of )' is not defined. (The error is under the << 8)

 

Does anyone knows why and also there is a buildin function in the SDK 4.3 for calling the time server.

How can we call this function?  

Public Shared Function GetNetworkTime() As DateTime	Dim ep As New IPEndPoint(Dns.GetHostEntry("time-a.nist.gov").AddressList(0), 123)	Dim s As New Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp)	s.Connect(ep)	Dim ntpData As Byte() = New Byte(47) {}	' RFC 2030	ntpData(0) = &H1b	For i As Integer = 1 To 47		ntpData(i) = 0	Next	s.Send(ntpData)	s.Receive(ntpData)	Dim offsetTransmitTime As Byte = 40	Dim intpart As ULong = 0	Dim fractpart As ULong = 0	For i As Integer = 0 To 3		intpart = 256 * intpart + ntpData(offsetTransmitTime + i)	Next	For i As Integer = 4 To 7		fractpart = 256 * fractpart + ntpData(offsetTransmitTime + i)	Next	Dim milliseconds As ULong = (intpart * 1000 + (fractpart * 1000) / &H100000000L)	s.Close()	Dim timeSpan__1 As TimeSpan = TimeSpan.FromTicks(CLng(milliseconds) * TimeSpan.TicksPerMillisecond)	Dim dateTime As New DateTime(1900, 1, 1)	dateTime += timeSpan__1	Dim offsetAmount As TimeSpan = TimeZone.CurrentTimeZone.GetUtcOffset(dateTime)	Dim networkDateTime As DateTime = (dateTime + offsetAmount)	Debug.Print(networkDateTime.ToString())	Return networkDateTimeEnd Function

 

Supra.


In Topic: SPI Configuration and the various Modes

26 January 2013 - 01:19 PM

What does parameter do?

spi[color=rgb(102,102,0);].[/color][color=rgb(102,0,102);]Write[/color][color=rgb(102,102,0);]([/color][color=rgb(0,0,136);]new[/color] [color=rgb(0,0,136);]byte[/color][color=rgb(102,102,0);][][/color] [color=rgb(102,102,0);]{[/color] [color=rgb(0,102,102);]1[/color][color=rgb(102,102,0);],[/color] [color=rgb(0,102,102);]2[/color][color=rgb(102,102,0);],[/color] [color=rgb(0,102,102);]3[/color] [color=rgb(102,102,0);]});[/color]

 

[color=rgb(102,102,0);]Supra[/color]


In Topic: Shield Base Firmware (beta 6)

26 January 2013 - 11:06 AM

Thank you, Chris.

 

NO more "checkiing your hardware". Worry free. :)  :)  :)  :)


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.