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
-----

#44897 NTP Time howto call with SDK 4.3

Posted by supra on 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.




#39755 For sale:

Posted by supra on 20 November 2012 - 08:15 PM

I havent seen a dedicated "for sale" area of the forums (if it exists, I apologize for being too clumsy to find it)

But if anyone is interested, I have the following essentially new items on ebay at the moment (or for sale) for significantly below regular price

Nwazet LCD Touch Screen Module (I have 2, Only selling 1)
Netduino Plus (I have a Go! and decided to use that)
Parallax Propeller Board of Education (8-core super dev board in a BOE form factor)

I will also note that I am including random goodies with each thing.

If posts of this kind are frowned upon, or need to be moved elsewhere, please let me know.

-Mike



Yeah! I was considering going to sell mine too. Everything for $2 including Go and Nwazet LCD and ShieldBase and some other accessories tooPosted Image


#39457 Netduino Plus 2 - I2C not working

Posted by supra on 16 November 2012 - 01:47 PM

I just got my NP2! :) thanks for making such an awesome update!

I'm not able to get the I2C to work with my ADXL345 connected to the new SC/SD connectors?

I'm running the following code:

Byte[] _data = new byte[1] { 0 };

I2CDevice adxl345 = new I2CDevice(new I2CDevice.Configuration(0x53, 400));
I2CDevice.I2CWriteTransaction write = I2CDevice.CreateWriteTransaction(new Byte[] { 0x00 });
I2CDevice.I2CReadTransaction read = I2CDevice.CreateReadTransaction(_data);
I2CDevice.I2CTransaction[] actions = new I2CDevice.I2CTransaction[] { write, read };
adxl345.Execute(actions, 1000);
Debug.Print(_data[0].ToString());

I'm running the same code on my NP1 connecting to A4/A5 pins and the device is working but not on the NP2.

HELP PLEASE!


tutorial

Mylink


#38775 Introducing Netduino Plus 2

Posted by supra on 08 November 2012 - 05:55 PM

Shipping to Canada for $2.50......Done and Done!


First time arrived 2 days and last time arrived 15 days. I paid for Can$2.50


#38744 Introducing Netduino Plus 2

Posted by supra on 08 November 2012 - 01:43 PM

There is one big problem is Nwazet LCDPosted Image


#37082 How to reset button on NGo

Posted by supra on 12 October 2012 - 02:47 PM

@stefan
it is ok with this?
InterruptPort button = new InterruptPort(Pins.Button,false, Port.ResistorMode.Disabled, Port.InterruptMode.InterruptEdgeBoth);


#36886 Nwazet Go Pro Kit

Posted by supra on 09 October 2012 - 06:12 PM

Supra, and ruin the nice shiny black acrylic plates?! I guess if you wanted to you could add your own Dymo labels after the fact. To each his own I guess :)

Steve


HHHMMMnnnPosted Image That cost me around US$250 + $$$$(Dymo labels) total around $US300Posted ImagePosted ImagePosted Image


#36413 How to write Shield Base Digital I/O

Posted by supra on 02 October 2012 - 03:05 PM

Since I got Shield base 1 mnth ago, but haven't play around yet. On breadboard, I have common cathode connected to Power GND and 330 ohms with anode's led connected to digital i/o pin 4 of shield base.
My question, how do i write code to shield base digital i/o pin 4?

Output leds = new output(pins_gpio_pin_5,false)
<== I'm not sure if this write to shield base

Shield Base connected to sck5 of NGo..

Thank.


#36251 The GoBus Upgrade

Posted by supra on 29 September 2012 - 11:58 AM

How did u connected 8x8 dotmatrix to GoBus? Can i do 8x32


#36062 Cannot upgrade Netduino Go firmware

Posted by supra on 27 September 2012 - 02:09 PM

Did u try this link?
what_to do


Mine is working already and had no pb .

U better c him(gutworks)


#36013 Where is shield base upgrading......

Posted by supra on 26 September 2012 - 02:19 PM

Hi supra,


Download the application in Stefan's link and run it on your Netduino Go.
http://forums.netdui...e-v4201-beta-1/

This will update your Shield Base to 4.2.0.1.

Chris


That is not the link I'm looking for.

But i found the link i'm lookingPosted ImagePosted ImagePosted ImagePosted ImagePosted Image


#35745 Where is shield base upgrading......

Posted by supra on 22 September 2012 - 01:14 AM

@stefan

That is wrong forum u posted on linkPosted ImagePosted ImagePosted Image


#35709 Where is shield base upgrading......

Posted by supra on 21 September 2012 - 03:13 PM

@Chris:

I can't find it on netduino go forums that shown u how to upgrading shield base. I lost it 2 days ago.Posted Image

I just got my shield basePosted ImagePosted ImagePosted Image 3 days ago.


#34967 An early look at the RS-232 GoModule specs...

Posted by supra on 10 September 2012 - 04:12 PM

@chris

Y do u want to build RS232? We already have USB 3.0 on market.
Mostly pc, laptop and ipad doesn't comes with RS232. Posted Image


#34730 Introducing GoBus 1.5

Posted by supra on 06 September 2012 - 10:18 AM

@ChrisU said , With Shield Base, we also introduced the GoBus Virtual I/O concept. With GoBus 1.5, we're performance-optimizing that same Virtual I/O and bringing it to all GoBus modules.Posted Image

So i ordered last tuesday. My item will be arriving todayPosted Image. Do i have to get new shield base v1 .5?Posted Image

Btw, I was reading gobus protocol specification. ThankPosted Image




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.