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.

Novice Alex's Content

There have been 39 items by Novice Alex (Search limited from 28-April 23)


By content type

See this member's


Sort by                Order  

#20878 RC3: CInt("0") fails

Posted by Novice Alex on 22 November 2011 - 11:39 PM in Visual Basic Support

Hi Moskus,

Can you please post a bug report on this at netmf.codeplex.com?

There are a number of post-release bugfixes being checked into the .NET MF 4.2 codebase. We're hoping to pull a bunch of them in at once and make a Netduino 4.2 RC4 firmware update...so it would be great to get this one in too.

Chris


Hi Chris,

Any timeline for the RC4 firmware?
Please advise.

Novice Alex



#21326 ^ Exponent Operator doesn't exists in VB?

Posted by Novice Alex on 04 December 2011 - 11:36 PM in Visual Basic Support

Make a call to Math.Pow( a, b )


Do note that latest version does not work for this function.



#23850 Convert string to integer

Posted by Novice Alex on 06 February 2012 - 02:24 PM in Visual Basic Support

Hi,

At the first moment, thanks for your time....


I have tryed with


try
Dim a As String = "10"
Dim h As New System.DateTime(1900, 1, 1, CInt(a), CInt(a), 0)
catch e as exception
Debug.print e.message
end try

and i have the next in debug...

Exception was thrown: System.NotImplementedException


I work with

DeviceInfo:
HAL build info: 4.2.0.0, Netduino Plus (v4.2.0.0 RC3) by Secret Labs LLC
OEM Product codes (vendor, model, SKU): 34, 177, 4097
Serial Numbers (module, system):
00000000000000000000000000000000
0000000000000000
Solution Build Info: 4.2.0.0, Netduino Plus (v4.2.0.0 RC3) by Secret Labs LLC
AppDomains:
Assemblies:
mscorlib,4.2.0.0
Microsoft.SPOT.Native,4.2.0.0
Microsoft.SPOT.Hardware,4.2.0.0
Microsoft.SPOT.Net,4.2.0.0
System,4.2.0.0
Microsoft.SPOT.Hardware.SerialPort,4.2.0.0
Microsoft.SPOT.IO,4.2.0.0
System.IO,4.2.0.0
Microsoft.SPOT.Hardware.Usb,4.2.0.0
Microsoft.SPOT.Hardware.PWM,4.2.0.0
SecretLabs.NETMF.Hardware,4.2.0.0
SecretLabs.NETMF.Diagnostics,4.2.0.0
Without SD Card,1.0.0.0
Microsoft.VisualBasic,1.0.0.0
classFecha,1.0.0.0

I have solved this problem with an function in c#, but may be good i can found a better solution.s

thanks in advance.


Just wonder has the 4.2 RC4 solved the VB parse problem.



#23851 RC3: CInt("0") fails

Posted by Novice Alex on 06 February 2012 - 02:27 PM in Visual Basic Support

Does Interger.Parse("0") not work ?


Does any try out the above using the 4.2 RC4?



#32198 Netduino Firmware v4.2.0 RC5 (Netduino + Netduino Plus)

Posted by Novice Alex on 18 July 2012 - 01:46 PM in Beta Firmware and Drivers

Hi Chris, Just like to know if it is possible to release more code space if I would to drop the network portion, since for my project, I don't really need it. But I am using Netduino+ because of the SD card reader onboard. If so, how can I go about on loading the firmware, which once should I use? Please advise. Thanks in advance.



#32221 Netduino Firmware v4.2.0 RC5 (Netduino + Netduino Plus)

Posted by Novice Alex on 18 July 2012 - 07:43 PM in Beta Firmware and Drivers

Hi Novice Alex,


You can safely use the regular Netduino firmware on your Netduino Plus.

To do this you will want to: erase your board by applying 3V3 power to the gold erase pad underneath D0; flash TinyBooter using Atmel SAM-BA; flash the NETMF runtime using MFDeploy.

Full instructions are available on the Wiki.

Once you flash the regular Netduino firmware on your Netduino Plus, you can use the SecretLabs StorageDevice class to ".MountSD" and re-enable SD card access.

Chris


Hi Chris,

Thanks for your quick response.
I will try and revert if there is any problem.

So after this flashing, I suppose I have 128KB code storage size together with 60KB RAM, right?



#32400 VS2010 Crash after declaring Const date

Posted by Novice Alex on 21 July 2012 - 05:05 AM in Visual Basic Support

Hi Guys,

Anyone try to the following declaration in VB using VS2010.

Public Const INFINITE_DATE As Date = #12/31/9999#

I am using the above declaration for my program to do comparison. But once I declare it, the VS2010(VB) will crash and need to restart.

I have also tried to set the date to today date, example #07/21/2012#, it will still restart the VS.



#32448 Netduino Firmware v4.2.0 RC5 (Netduino + Netduino Plus)

Posted by Novice Alex on 22 July 2012 - 03:14 AM in Beta Firmware and Drivers

Hi Novice Alex,


You can safely use the regular Netduino firmware on your Netduino Plus.

To do this you will want to: erase your board by applying 3V3 power to the gold erase pad underneath D0; flash TinyBooter using Atmel SAM-BA; flash the NETMF runtime using MFDeploy.

Full instructions are available on the Wiki.

Once you flash the regular Netduino firmware on your Netduino Plus, you can use the SecretLabs StorageDevice class to ".MountSD" and re-enable SD card access.

Chris


Hi Chris,

Just like to double confirm. I have successfully update the Netduino firmware onto my Neduino+. So when I start a project, do I set it as Netduino/Netduino+ project? Also in my case, do you have any sample code on mounting the SD card.
Also by using Netduino firmware on access SD card, will i be giving up any digital pins access?

Separately, do I need to mount & un-mount the SD card everything I use? Or only for once during system power up?

Thanks in advance.



#32465 VS2010 Crash after declaring Const date

Posted by Novice Alex on 22 July 2012 - 01:51 PM in Visual Basic Support

That's an interesting find!
Could you please make an issue at http://netmf.codeple...item/list/basic ?
I can indeed reproduce this and it should never happen.


Hi Stefan,

good to know that you too is facing the same problem.
As suggested, I have make an issue @ codeplex.

Thanks.



#32555 VS2010 Crash after declaring Const date

Posted by Novice Alex on 23 July 2012 - 05:18 PM in Visual Basic Support

Thanks, I voted for the issue too :)

Hi Stefan,

They have taken up the issue and fixes is schedule for NETMF 3.0



#32608 Date.subtract function

Posted by Novice Alex on 24 July 2012 - 12:38 PM in Visual Basic Support

Hi Guys, in VB.net, when I need to find the time difference between 2 dates, all I need is to use the function DateDiff. But in NetMF, I can only use date.subtract method and it returns a Timespan object. The problem here is that, in a TimeSpan object, how can I get the total number of minutes between 2 dates? In the NetMF, the totalMinutes method is removed. Only left with the Minutes property which does not serve my purpose. So I have to fall back to use the following statements: if (Date.Now.substract(m_dteLastGPSInfo).tick/TimeSpan.TicksPerMinute )> 30 then .... Any good idea on how to deal with this? Thanks in advance.



#32614 Date.subtract function

Posted by Novice Alex on 24 July 2012 - 01:26 PM in Visual Basic Support

What is the issue with your work around?

Seems like it would do what you want, if you use the code a lot you may benefit from wrapping it as a static method

//C#
public static int MinutesDifference(DateTime lastGPSInfo){
 return (DateTime.Now.Subtract(lastGPSInfo).Ticks/TimeSpan.TicksPerMinute);
}

//VB.Net - My VB is very rusty example is from memory so may not work at all ;-)
Public Shared Function MinutesDifference(ByVal lastGPSInfo As DateTime) As Int
 Return (DateTime.Now.Subtract(lastGPSInfo).Ticks/TimeSpan.TicksPerMinute)
End Function

Nak.


Hi Guys,

There is nothing wrong with my workaround, except that it needs more code to do as compare to DateDiff method. As you know code size for our little Netduino is precious. :)



#32617 Release COM2 (CTS, RTS)

Posted by Novice Alex on 24 July 2012 - 01:40 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi Guys, Need your advice on how to release COM2(CTS, RTS) pins for more GPIO purpose? Currently for my project, I need 2 COM port, but we usually use 3-wire interface, so just like to check how can I release CTS and RTS pins for my other GPIO purpose. Thanks in advance. Regards, Novice Alex



#32672 Release COM2 (CTS, RTS)

Posted by Novice Alex on 25 July 2012 - 11:47 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi Nobby, Below is my statement. m_objCommMgr = New cCommManager("COM2", 9600, Ports.Parity.None, 8, Ports.StopBits.One) so far, I have not connected RTS and CTS since i am only using 3 wire interface. Since on the board layout, for COM2 it comes with RTS and CTS (derived from GPIO pins), I just wonder if we can disable these RTS and CTS when using COM2. Thus giving my project the much needed GPIO to measure the pulse input. Care to share how do you initialise your COM2 without RTS & CTS? Thanks in advance.



#32676 Release COM2 (CTS, RTS)

Posted by Novice Alex on 26 July 2012 - 01:23 AM in Netduino Plus 2 (and Netduino Plus 1)

The general rule-of-thumb with microcontrollers is that pin assignments aren't always restricted to their architectural labelling. For example, a pin maybe labelled as PWM(Pulse Width Modulator) which would normally tie-in with a hardware clock and hardware interrupts. By default, the pin doesn't function as a PWM unless you actually configure it to be.

Much the same with the CTS and RTS pins, you can configure them as OutputPorts or InterruptPorts. If you try to use them for two purposes, you'll get a runtime exception when trying to initialise the pin for a second use. Example of using the RTS pin as a GPIO pin

SerialPort comPort = (SerialPorts.COM2, 9600, Parity.None, 8, StopBits.One); //Initialise COM2
OutputPort oPort = new OutputPort(Pins.GPIO_PIN_D7, false); //initialise the RTS pin as an output port with logic low as initial value;


Hi Nobby,

wonderful... That clears my doubts.
Just for knowledge, how can I configure PIND7 as RTS, do you have the code for it?

Thanks in advance.



#32679 Analog Pins for drive LEDs

Posted by Novice Alex on 26 July 2012 - 02:54 AM in Netduino Plus 2 (and Netduino Plus 1)

Hi Guys, As I have exhausted all the Digital Pins for all my pulse counter and communication, now only left with the Analog pins untouched. May I know is there any way I can use the Analog pins for driving a LED (for machine status) purpose? also can it be configure to use to detect button press input? Thanks in advance.



#32733 Circuit example for 4-20mA measurement

Posted by Novice Alex on 26 July 2012 - 11:44 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi Guys, Separately, do you have any sample circuit to connect to N+ for measuring 4-20mA Analog input? Together with sample code will be great. Currently I am using VB.net to handle the 12V pulse input through opto-coupler circuit. Thanks in advance.



#32779 Analog Pins for drive LEDs

Posted by Novice Alex on 27 July 2012 - 10:22 AM in Netduino Plus 2 (and Netduino Plus 1)

Hi Guys, thanks for your sharing. Now I managed to light up my LEDs as per normal by setting the Analog pins as output, but as mentioned by Stefan, the output current is limited, so it may not be too bright. Anyway is a good step.



#33118 Debug info output?

Posted by Novice Alex on 04 August 2012 - 03:34 PM in Beta Firmware and Drivers

Upgraded to 4.2(RTM) and appropriate firmware on my N+.
Everything went fine, but now in my debug sessions I'm missing the RAM/ROM/META messages, which I really liked since I'm doing a lot of reflection, and it's nice to know how big the assemblies are that I'm loading.

Do I need to do anything differently now that I'm on the 4.2 SDK?


Hi H07R0D,

I too looking at using reflection to set the debug statement printout during exception being thrown out. Can you share with me how to use the reflection methods to extract the name of the method (within the class) that is causing the exception?

In VB.NET, I always include these statements in my catch statement.
Dim f As New StackFrame
cErrorHandler.LogError(f.GetMethod().DeclaringType.FullName & "." & System.Reflection.MethodBase.GetCurrentMethod().Name, ex)

Wonder how can I do the same in .NetMF 4.2

Thanks in advance.



#33119 Drilling down to the StackFrame

Posted by Novice Alex on 04 August 2012 - 03:35 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi Bendage, Have you managed to find the solution to your above problem? Care to shared? Thanks in advance.



#33344 Detect Eject SD card in VB.net

Posted by Novice Alex on 10 August 2012 - 01:30 AM in Visual Basic Support

Hi Guys,

Anyone familiar with VB.net can help with some code on how to detect the SD card been ejected?
I am following this topic, but I can do the same in VB.net. Please help and thanks in advance.

Links on how to detect presence of SD card



#33408 Detect Eject SD card in VB.net

Posted by Novice Alex on 11 August 2012 - 08:19 AM in Visual Basic Support

That code won't work in VB.NET since it works differently with events. This would work:

Module Module1

    Sub Main()
        AddHandler Microsoft.SPOT.IO.RemovableMedia.Eject, AddressOf RemovableMedia_Eject
        AddHandler Microsoft.SPOT.IO.RemovableMedia.Insert, AddressOf RemovableMedia_Insert
        Thread.Sleep(Timeout.Infinite)
    End Sub

    Sub RemovableMedia_Eject(sender As Object, e As Microsoft.SPOT.IO.MediaEventArgs)
        Debug.Print("Ejected")
    End Sub

    Sub RemovableMedia_Insert(sender As Object, e As Microsoft.SPOT.IO.MediaEventArgs)
        Debug.Print("Inserted")
    End Sub

End Module


Hi Carb & Stefan,

Thank you for your great helps.

Cheers!



#33496 Resources usage

Posted by Novice Alex on 12 August 2012 - 11:34 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi Guys, I am in a project to monitor some flow meters at the same time doing some remote monitoring. In my project, I have a class object for flow meters which is controlled and monitored by the main program loop that will send back current flow meters pulse counters on every 5 seconds. The question is which of the following method require more resource from N+? 1. On timer (5 seconds) interrupt in the each of flow meter object, I will raise a NewData event (passing back the current flow meter pulse counter) for my main program to handle them separately. 2. On timer (5 seconds) interrupt in my main program, i will called the public property in each flow meter to get the current flow meter pulse counter. Then handle them accordingly. Generally, just wonder is it better to use raise event method or pull method? Thanks in advance. Regards, Novice Alex



#33558 Resources usage

Posted by Novice Alex on 13 August 2012 - 11:52 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi Alex,


They're both valid approaches and consume roughly the same number of MCU cycles. Threads are lightweight so I would go with option #1 purely because it simplifies your code. In effect, you just become a consumer of NewData...and as the way that that data is gathered changes your main code can stay the same.

If there's additional logic to your operation (such as needing to always read flow measurements in a certain order) then #2 becomes a good option.

Chris


Hi Chris,

Well noted.



#33606 Announcing: .NET MF 4.2 upgrade for all Netduino hardware

Posted by Novice Alex on 14 August 2012 - 03:16 PM in General Discussion

Chris, Bingo and Thanks for the great news. Can't wait to get my hands on the upgrade. Care to share when will the >2G SD being integrated for 4.2? Any schedule?




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.