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.

Ellen's Content

There have been 65 items by Ellen (Search limited from 29-April 23)


By content type

See this member's


Sort by                Order  

#30678 Thermometer Reading, 3rd App using VB

Posted by Ellen on 14 June 2012 - 10:18 AM in Visual Basic Support

Thanks Stefan, did not thought of that. Cool, going to try this code immediately.


I am a newbee and I know, it is an old post.

Is it right to do it like this, rounding up.?.

dim dblSecsAndMsecs as Double = 12345.6789
Debug.Print(dblSecsAndMsecs.ToString("N0"))

N = numeric and the zero is for no decimals, so 2 decimals = N2



#31046 The best calculation between 2 times

Posted by Ellen on 22 June 2012 - 06:26 AM in Visual Basic Support

Hello, I am working on a small home project and need the very best calculation between a time interval. Now i have programmed: dtStartTime = DateTime.Now 'start 'do other things and then.... dtEndTime = DateTime.Now 'endtime 'extracting the seconds and millisecs sSeconds = (dtEndTime.TimeOfDay - dtStartTime.TimeOfDay).Seconds.ToString sMilliSeconds = (dtEndTime.TimeOfDay - dtStartTime.TimeOfDay).Milliseconds.ToString 'and put it back together dblSecsAndMsecs = CType((sSeconds + "." + sMilliSeconds), Double) My question is : Is there a better way to do this.?. Ellen



#31521 The best calculation between 2 times

Posted by Ellen on 03 July 2012 - 07:31 AM in Visual Basic Support

I'm not going to claim that it's "better", but I THINK it is...

        Dim dtStartTime As DateTime = DateTime.Now
        'Do stuff
        Dim tsEndTime As TimeSpan = DateTime.Now.Subtract(dtStartTime)
        Debug.Print(tsEndTime.Seconds & "." & tsEndTime.Milliseconds)


After a lot of tests, this works indead very well.
Thank you.



#37467 Socket Problem Again?

Posted by Ellen on 20 October 2012 - 11:45 AM in Netduino Plus 2 (and Netduino Plus 1)

Am Still Gettings Exceptions i think it is related to internal problem call, i tried polling read and write and still gives me exception any solutions to the problem?

huummm. It sounds like a wrong config.
What is the reason for port 90. tried another port with forwarding?
Deploy a static IP to your netduino and quote ' Interface.EnableStaticIP
Look at your router, ? port forwarding, mac address, DHCP (maybe DHCP reservation on the mac address)?



#36513 Socket exception

Posted by Ellen on 04 October 2012 - 09:50 AM in Netduino Plus 2 (and Netduino Plus 1)

Hello You all,
I have copy and paste a code snippet example of a N+ server and change it a bit for own use.

We use portForwarding in the router.

When I execute this code and use the browser with a intern address 192.168.1.55:66777/ledon then the code works perfect.

But when I execute the code and use the browser with my extern ip address [IPADDRESS]:66777/ledon then I must 2 times enter the browser, the code will then execute but after I get a error exception in the code: Using socketConnection As Socket = socketServer.Accept()

When I change .Poll(-1, ... In .Poll(50000,... then it works perfect.

Now my question:
I do not know why I get an error and what's the difference between, Is there any difference in handling local and external calls?
Thank You Ellen.


Using socketServer = New Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)    
   socketServer.Bind(New IPEndPoint(IPAddress.Any, intPort))
   socketServer.Listen(1)

   While True
 
     Try

         Using socketConnection As Socket = socketServer.Accept()

            If socketConnection.Poll(-1, SelectMode.SelectRead) Then



#36527 Socket exception

Posted by Ellen on 04 October 2012 - 03:27 PM in Netduino Plus 2 (and Netduino Plus 1)

here is link:
Mylink

Hello Supra, thank you for the link. I had already read the MSDN description of Poll. But can you answer my question why Poll(-1 methode do not work and generates an error when the N+ has a external request? Is it maybe a anomalistic behavior?
Ellen



#34718 Sending mail with a Netduino Plus

Posted by Ellen on 06 September 2012 - 07:51 AM in Project Showcase

Hi :)


Now it's possible to send mails through an SMTP server. The class doesn't have authentication yet, but it works! :D


Stefan, when do you think that authentication will be implement in this class.
I need to sent once a day some data with the netduino but the mail server ask for authentication.
Ellen



#31871 Sending data to the Cosm server.

Posted by Ellen on 11 July 2012 - 07:54 PM in Visual Basic Support

Still working on a small learning project out of the book Internet and things and want to send data to the Cosm.com server. (it was Pachube) Have found some code here and on other sites.

I am wondering if it can be programmed a little bit better so it will work faster.
Now i send for every item/feed a new request but i want to sent more then 1 item to the datastream in 1 request. I have tried a few possibilities but without any success. :blink:
Thank you.

Now my code is:


'all the items have the same connection, apiKey and feedId
'Sending the items every 30 seconds


Item1 = "Volt,23"
Item2 = "Ampere,3"
Item3 = "Direction,34.2" 

Do While True

   Using connection As Socket = Connect(URi, 5000)
      SendRequest(connection, apiKey, feedId, Item1) 
      SendRequest(connection, apiKey, feedId, Item2)
      SendRequest(connection, apiKey, feedId, Item3)
   End Using

   'do other things for 30 seconds and read the new data in the items

loop


Private Function Connect(ByVal host As String, ByVal timeout As Integer) As Socket
        ' look up host's domain name to find IP address(es)
        Dim hostEntry As IPHostEntry = Dns.GetHostEntry(host)
        ' extract a returned address
        Dim hostAddress As IPAddress = hostEntry.AddressList(0)
        Dim remoteEndPoint As New IPEndPoint(hostAddress, 80)

        Dim connection = New Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)
        connection.Connect(remoteEndPoint)
        connection.SetSocketOption(SocketOptionLevel.Tcp, SocketOptionName.NoDelay, True)
        connection.SendTimeout = timeout
        Return connection
    End Function

    Private Sub SendRequest(ByVal s As Socket, ByVal apiKey As String, ByVal feedId As String, ByVal content As String)
        Dim contentBuffer As Byte() = Encoding.UTF8.GetBytes(content)
        Dim CRLF As String = Constants.vbCr & Constants.vbLf
        Dim requestLine = "PUT /v2/feeds/" & feedId & ".csv HTTP/1.1" & CRLF
        Dim requestLineBuffer As Byte() = Encoding.UTF8.GetBytes(requestLine)
        Dim headers = "Host: api.pachube.com" & CRLF & "X-PachubeApiKey: " & apiKey & CRLF & "Content-Type: text/csv" & CRLF & "Content-Length: " & contentBuffer.Length & CRLF & CRLF
        Dim headersBuffer As Byte() = Encoding.UTF8.GetBytes(headers)
        s.Send(requestLineBuffer)
        s.Send(headersBuffer)
        s.Send(contentBuffer)
    End Sub






#32074 Sending data to the Cosm server.

Posted by Ellen on 16 July 2012 - 08:01 PM in Visual Basic Support

Well it could speed up a little by sending all the items at once.

dim strAllItems as string
strAllItems = Item1 & Constants.vbCr & Constants.vbLf & Item2 & Constants.vbCr & Constants.vbLf & Item3

Using connection As Socket = Connect(URi, 5000)      
   SendRequest(connection, apiKey, feedId, strAllItems)       
End Using



#34117 PWN classes after 4.2 firmware upgrade

Posted by Ellen on 23 August 2012 - 07:45 PM in Netduino Plus 2 (and Netduino Plus 1)

But the SecretLabs.NET.Hardware.PWM.dll is NOT compatible with the RC5 ( the version before the official release).

I have this code, and the behavior is much different.



Namespace Servo_Control
    Public Class ServoControl

        Private servo As PWM
        Public inverted As Boolean = True

        Public Sub New(ByVal pin As Cpu.Pin, ByVal toInvert As Boolean)

            inverted = toInvert
            servo = New PWM(pin)
            servo.Dispose()
        End Sub

        Public Sub ServoToNul()
            servo.SetDutyCycle(0)
        End Sub

        Public Sub DisposeServo()
            servo.Dispose()
        End Sub

        Public WriteOnly Property ServoPulse() As Double
            Set(ByVal value As Double)
                ' Range checks'
                If value > 2000 Then
                    value = 2000
                End If

                If value < 0 Then
                    value = 0
                End If

                ' Are we inverted?'
                If inverted Then
                    value = 2000 - value
                End If

                servo.SetPulse(20000, CUInt(value + 600))

            End Set
        End Property

    End Class
End Namespace






#34828 PWN classes after 4.2 firmware upgrade

Posted by Ellen on 07 September 2012 - 05:55 PM in Netduino Plus 2 (and Netduino Plus 1)

If you are stupid?, I do not know... :P The problem could also be a dirty windows register with pointers to old or non existing file's or program arguments. Also the quality of your equipment could be a factor. It is very hard to tell from a distance whats the problem. I say always No Plug and Play but Plug and Pray. B) For me, the install steps earlier described in other sticky posts were sufficiently. Ellen I hope the PWM class will repaired soon.



#34359 PWN classes after 4.2 firmware upgrade

Posted by Ellen on 29 August 2012 - 08:14 AM in Netduino Plus 2 (and Netduino Plus 1)

This morning I have tested the Servo very good. As i expected as in earlier tests the behavior was different.

Did the tests with this servo:
http://www.pieterflo...p?id_product=38


In the earlier version 4.2 QFE(1):
servoWatt.ServoPulse = 0 result: to zero point
servoWatt.ServoPulse = 1000 result: to half way (90 degrees rotation)
servoWatt.ServoPulse = 2000 result: to full (180 degrees rotation)

In latest version 4.2 QFE(2):
servoWatt.ServoPulse = 0 result: to zero point
servoWatt.ServoPulse = 1000 result: to (90+ to 100 degrees rotation)
servoWatt.ServoPulse = 2000 result: back (0 degrees rotation)

Imports Microsoft.SPOT
Imports Microsoft.SPOT.Hardware
Imports SecretLabs.NETMF.Hardware
Imports SecretLabs.NETMF.Hardware.NetduinoPlus
Imports SecretLabs.NETMF.Hardware.PWM


Module Module1

    Sub Main()

        Dim servoWatt As New Servo_Control.ServoControl(Pins.GPIO_PIN_D9, True)

        servoWatt.ServoPulse = 0
        Thread.Sleep(3000)
        Debug.Print("0")

        servoWatt.ServoPulse = 1000
        Thread.Sleep(3000)
        Debug.Print("1000")

        servoWatt.ServoPulse = 2000
        Thread.Sleep(3000)
        Debug.Print("2000")

        servoWatt.ServoPulse = 0
        Thread.Sleep(3000)
        Debug.Print("0")


    End Sub

End Module


Namespace Servo_Control
    Public Class ServoControl

        Private servo As SecretLabs.NETMF.Hardware.PWM
        Public inverted As Boolean = True

        Public Sub New(ByVal pin As Cpu.Pin, ByVal toInvert As Boolean)

            inverted = toInvert
            servo = New SecretLabs.NETMF.Hardware.PWM(pin)

        End Sub

        Public Sub ServoToNul()
            servo.SetDutyCycle(0)
        End Sub


        Public WriteOnly Property ServoPulse() As Double
            Set(ByVal value As Double)
                ' Range checks'
                If value > 2000 Then
                    value = 2000
                End If

                If value < 0 Then
                    value = 0
                End If

                ' Are we inverted?'
                If inverted Then
                    value = 2000 - value
                End If

                servo.SetPulse(20000, CUInt(value + 600))

            End Set
        End Property

    End Class
End Namespace





#34610 PWN classes after 4.2 firmware upgrade

Posted by Ellen on 03 September 2012 - 06:28 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi Chris!
Could you verify my problem on your equipment?

Greetings

Manfred


Manfred,
I had to go back to the earlier version 4.2 QFE(1). That release works better and recommend you to do also.
Ellen



#33322 PV Solar logging. with source code.

Posted by Ellen on 09 August 2012 - 11:14 AM in Visual Basic Support

Hi you all,
We want to contribute our program sources for Solar data logging.
I know it is not the most streamlined sources but with a little imagination and patience.....
Found some code here and there and edit it.

With 2 servo's for Watt and KWH Like a clock.
A display for Time, Temperature of the Solar panels, Watt and KWH.
2 LED for write to internet and read the Electric SO port. http://www.groepenka...kel-tarief.html


Write to 3 internet servers , Cosm.com, ThingSpeak and PVoutput.
Read the time from internet into the Netduino

and the Google Gauges ThingSpeak HTML file.
Just run the html file.

Thanks to everybody especially Stefan for his help.

Attached Files




#33356 PV Solar logging. with source code.

Posted by Ellen on 10 August 2012 - 06:00 AM in Visual Basic Support

Ohh that's awesome! Luckely you'll get a lot of sun in the next few days :)

Hi Stefan, I am looking forward to the nice weather, we did have a long raining period and we are almost depressed by the bad weather. But after rain there is .....
greeting Ellen



#38434 P1 & S0 Port monitoring with Netduino Plus

Posted by Ellen on 03 November 2012 - 04:06 PM in Netduino Plus 2 (and Netduino Plus 1)

Hello to All, As a member of the Tweaker forum club (I do the coffee for my father and my friend who do.....nothing) i want to inform you that there is quality software available on Codeplex for monitoring PV power and home boards. It is all in Beta status but I think (as student VB) from a high quality. Here is the link: http://p1netduinoplus.codeplex.com/ Thank you and enjoy.



#33157 OnBoard MicroSD

Posted by Ellen on 06 August 2012 - 07:19 AM in Netduino Plus 2 (and Netduino Plus 1)

Most 1 or 2 GB ones work. There was a beta version that the 4 & 8 GB worked, but that code is not in 4.2 that I know of, so you are stuck with 1 & 2 GB.

For me, the SD card also is not working because I bought a 8 gieg. (bigger counts :-))
I think the store (mediamarkt) will not exchange the card for a smaller one.

Is there any chance that the SD Card 4&8 Gb support will be implemented in the version 4.2
Because I program in VB, I am stuck on version 4.2
BTW, VB and 4.2 works very well.
Ellen



#36061 New issue apparently found with 4.2.0

Posted by Ellen on 27 September 2012 - 02:08 PM in Netduino Plus 2 (and Netduino Plus 1)

I had to load the separate secretlabs .dll in the reference to work with the A_ports in version 4.2



#33913 Netduino Plus Firmware v4.2.0

Posted by Ellen on 19 August 2012 - 06:50 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi Ellen,


The .NET MF team updated the SD card drivers in .NET MF 4.2. If there are any cards which worked with 4.1.1 but aren't working with the official 4.2 release, we want to make sure we get those supported.

Can you please provide the manufacturer and model number of your card, and we'll try to get one here to test against?

Chris

It took a while....
Chris, Stefan, I start with the bottom line, There is no way that we could read or write from the mini SDcard. I think there is a lot to re-write and test in the system.dll
What we did: purchased a second N+ and a second 4 gieg mini SDcard. Just to exclude that the first N+ or card was broken.
We did test it in the most unthinkable way and code, mixed...in ...out...power recycle...format....other computer, ....you name it, we did it.
Those who have a working SDcard must see themselves as the lucky ones. If there is someone who can tell ... with these steps and program code it must go well...
Ellen



#33747 Netduino Plus Firmware v4.2.0

Posted by Ellen on 16 August 2012 - 08:04 AM in Netduino Plus 2 (and Netduino Plus 1)

Is there in this version 4.2.0.1 support for the SD HC 8 gieg card? Dim fs As FileStream = File.Create("\jj.txt") error: An unhandled exception of type 'System.IO.IOException' occurred in System.IO.dll If there is not than i can stop with finding out. gr Ellen



#33712 Netduino Plus Firmware v4.2.0

Posted by Ellen on 15 August 2012 - 07:59 PM in Netduino Plus 2 (and Netduino Plus 1)

Chris, You did not tell that also Netduino SDK 4.2.0.1 and .NET Micro Framework SDK v4.2Q2 is needed Without windows can not recognize the Netduino. Ellen



#33931 Netduino Plus Firmware v4.2.0

Posted by Ellen on 20 August 2012 - 07:42 AM in Netduino Plus 2 (and Netduino Plus 1)

Hi Ellen,

I just checked with Chris and tested it on my own Netduino Plus.
SDHC is not yet supported in 4.2. The only firmware it is supported in right now is 4.1.1.1 beta.

Community member Kodedaemon worked on the SDHC support in the previous release, but Microsoft has made some major changes to SD support so they must be re-evaluated.

I must say I sympathize with you, I wished SDHC support would be in this release too, but until then, you are stuck with <=2GB cards (which are still widely available and cheap btw!)

Thanks Stefan, Chris,
Now we have clearness in this case. Now i can stop thinking about what did I wrong, what didn't I see. I buy a 2gieg and let you know.
Ellen



#38488 Netduino Plus 1 Firmware v4.2.0 (update 1)

Posted by Ellen on 04 November 2012 - 10:48 AM in Netduino Plus 2 (and Netduino Plus 1)

Hello Chris may I have your attention. We have notice that the Netduino Plus hangs when the socket.Connect is called when the internet connection is down after the N+ starts up. The only option was a reset. I have placed a full working example here: http://forums.netdui...es/page__st__20 You can run the code and on the same time stop the internet connection in your router. Then you see the error. My question, can you confirm this "bug" and do you have a workaround for it because writing to the Internet is het core of my program. Sometimes the internet connection is down here for a few minutes. I did a attempt with 4.3 beta but deploying to the N+ was without any succes.



#35966 Netduino Plus 1 Firmware v4.2.0 (update 1)

Posted by Ellen on 25 September 2012 - 02:35 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi Chris, PWM problem solved in the update, servo is working fine now. Thank you. Ellen



#38543 Netduino Plus 1 Firmware v4.2.0 (update 1)

Posted by Ellen on 05 November 2012 - 08:55 AM in Netduino Plus 2 (and Netduino Plus 1)

Hi Ellen,


The best option is to use the new NETMF 4.3 release. You can use the beta SDK--but it won't change the firmware on your board. The first NETMF 4.3 beta firmware should be available this month.

Chris

Thank you Chris, we are waiting for the 4.3 beta this month. We hope the internet glitch is than solved.

@Travor, you did not install (correct) the Netduino driver, please read all the steps to install at the begin.




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.