- Netduino Forums
- → Novice Alex's Content
Novice Alex's Content
There have been 39 items by Novice Alex (Search limited from 29-April 23)
#39176 Introducing Netduino Plus 2
Posted by Novice Alex on 12 November 2012 - 03:33 PM in Netduino Plus 2 (and Netduino Plus 1)
#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.
#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?
#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
#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
#33928 Netduino Firmware v4.2.0
Posted by Novice Alex on 20 August 2012 - 05:27 AM in Netduino 2 (and Netduino 1)
Just to share with you guys on my experience on the upgrading to 4.2.
After flashing my Netduino+ I execute the MFDeploy, it does not show the device when I select USB connection.
Then I realize i did not install the latest .NET Micro Framework v4.2 SDK (QFE2).
You may download from here
After installation, reset your netduino and plug it it, you should see the device in the MFDeploy application and continue your firmware upgrade.
Good luck.
Regards,
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.
#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!
#33344 Detect Eject SD card in VB.net
Posted by Novice Alex on 10 August 2012 - 01:30 AM in Visual Basic Support
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
#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)
#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.
#32608 Date.subtract function
Posted by Novice Alex on 24 July 2012 - 12:38 PM in Visual Basic Support
#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.
#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
#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?
#34182 Ways to read large (>12Kb) text files from SD card
Posted by Novice Alex on 25 August 2012 - 12:29 AM in Netduino Plus 2 (and Netduino Plus 1)
What are you doing with the file once you have read it?
Regards,
Mark
Hi Mark,
These data files (daily) are records of the engine consumption that sample every 1 mins.
Currently the record format is as follows: [mins since today's 00:00] | [Double variable with 3 decimal places]
Regards,
Alex
#34183 Ways to read large (>12Kb) text files from SD card
Posted by Novice Alex on 25 August 2012 - 12:36 AM in Netduino Plus 2 (and Netduino Plus 1)
Hi Stefan,It all depends on the file format. Since you're writing daily stats? You could do several things:
- Make records an X amount of bytes large
- Create a file format that works with data blocks
- Create an index
I have too little information right now to really be able to help you out.
That's sound like a good idea. Since each records is fit by the format [mins since 00:00 of the day] | [Double value with 3 decimal place]. I can fix string format for both. And use ReadBlock to do it. However, need to do some testing to see whether it improve in processing.
in fact, currently when I read back the full content, I will then pass the full file content (as string) back to the caller for further parsing and then determine the require range (report time start to end) and accumulate the total value in the field (2) - Double.
Regards,
Alex
#34148 Ways to read large (>12Kb) text files from SD card
Posted by Novice Alex on 24 August 2012 - 02:37 PM in Netduino Plus 2 (and Netduino Plus 1)
#34146 Ways to read large (>12Kb) text files from SD card
Posted by Novice Alex on 24 August 2012 - 02:02 PM in Netduino Plus 2 (and Netduino Plus 1)
#34251 PWM Setup
Posted by Novice Alex on 27 August 2012 - 04:03 AM in Netduino 2 (and Netduino 1)
I am trying to setup a PWM to generate constant pulse for my monitoring project.
Below are the codes.
Public WithEvents Supply As InterruptPort Public PWM_Supply As New SecretLabs.NETMF.Hardware.PWM(Pins.GPIO_PIN_D5) Supply = New InterruptPort(Pins.GPIO_PIN_D0, False, Port.ResistorMode.PullUp, Port.InterruptMode.InterruptEdgeHigh) Dim period As UInt32 = 1 * 1000 * 1000 '1 seconds Dim duration As UInt32 = 5 * 100 * 1000 '0.5 seconds PWM_Supply.SetPulse(period, duration)
After executing the last command "SetPulse", the below exception will be trigger
A first chance exception of type 'System.InvalidOperationException' occurred in Microsoft.SPOT.Hardware.PWM.dll
Can anyone highlight the problem in this declaration?
Thanks in advance.
Regards,
Novice Alex
#35929 SD File corrupted
Posted by Novice Alex on 24 September 2012 - 11:29 PM in Netduino Plus 2 (and Netduino Plus 1)
#35898 SD File corrupted
Posted by Novice Alex on 24 September 2012 - 02:56 PM in Netduino Plus 2 (and Netduino Plus 1)
I have done up a commercial project and now doing the "burn test".
This project suppose to do data logging of the fuel consumption from different flow meters on a 5 mins interval.
However, I found that randomly the log file could be corrupted and it will cause the whole N+ to hang when accessing it.
I have tried to access the SD card using my PC and can see that that particular "problem" file exists but I am not able to access it and I can't delete it from my PC. So the only way is to reformat my SD card and start fresh. This gives me some sense of "uncertainty".
Does anyone know how can we handle such cases to avoid the N+ to hang? By the way, when I say hang, it means not even when I short the reset pin to ground or press the reset can restart N+, the only way is to power it down completely.
Below is my SD card class library.
Imports System.IO Imports SecretLabs.NETMF.Hardware.Netduino Imports SecretLabs.NETMF.Hardware Imports Microsoft.SPOT Public Class cSDCard #Region "Enumeration" #End Region #Region "Declaration" Public Shared Event LastError(ex As Exception) Public Shared Event SDEject() Private Shared m_bSDEjected As Boolean = True #End Region #Region "Property" Public Shared Property SD_Ejected() As Boolean Get Return m_bSDEjected End Get Set(value As Boolean) m_bSDEjected = value End Set End Property #End Region #Region "Method" Public Shared Function MountSD() As Boolean MountSD = False SD_Ejected = True Try SecretLabs.NETMF.IO.StorageDevice.MountSD("SD", Microsoft.SPOT.Hardware.SPI.SPI_module.SPI2, 21, 57) Dim dirinfo As New DirectoryInfo("\SD") If (dirinfo.Exists) Then MountSD = True SD_Ejected = False End If Catch ex As Exception SD_Ejected = True End Try End Function Public Shared Function UnMountSD() As Boolean Try If SD_Ejected = True Then Exit Function End If SecretLabs.NETMF.IO.StorageDevice.Unmount("SD") Catch ex As Exception End Try End Function Public Shared Function ReadFile(sFilename As String, ByRef sContent As String, Optional bReadLastLineOnly As Boolean = False) As Boolean ReadFile = False Try Dim lFileSize As Long = 0 Dim sTmp As String = "" sContent = "" If SD_Ejected = True Then Exit Function End If If File.Exists(sFilename) Then Dim myFile As New StreamReader(New FileStream(sFilename, FileMode.Open, FileAccess.Read)) If bReadLastLineOnly = True Then While (1) sTmp = myFile.ReadLine If Not sTmp Is Nothing Then sContent = sTmp Else Exit While End If End While Else sContent = myFile.ReadToEnd End If myFile.Close() Else Debug.Print(sFilename & " not found!!!") End If ReadFile = True Catch ex As Exception RaiseEvent LastError(ex) End Try End Function Public Shared Function WriteFile(sFilename As String, sContent As String, Optional bAppend As Boolean = True) As Boolean WriteFile = False Try If SD_Ejected = True Then Exit Function End If Dim myFile As StreamWriter If bAppend = True Then myFile = New StreamWriter(New FileStream(sFilename, FileMode.OpenOrCreate, FileAccess.Write)) Else DeleteFile(sFilename) myFile = New StreamWriter(New FileStream(sFilename, FileMode.CreateNew, FileAccess.Write)) End If myFile.WriteLine(sContent) myFile.Close() WriteFile = True Catch ex As Exception RaiseEvent LastError(ex) End Try End Function Public Shared Function DeleteFile(sFilename As String) As Boolean DeleteFile = False Try If SD_Ejected = True Then Exit Function End If If File.Exists(sFilename) Then File.Delete(sFilename) End If DeleteFile = True Catch ex As Exception RaiseEvent LastError(ex) End Try End Function #End Region End Class
Thanks in advance.
Regards,
Alex Chan
#32555 VS2010 Crash after declaring Const date
Posted by Novice Alex on 23 July 2012 - 05:18 PM in Visual Basic Support
Hi Stefan,Thanks, I voted for the issue too
They have taken up the issue and fixes is schedule for NETMF 3.0
#32400 VS2010 Crash after declaring Const date
Posted by Novice Alex on 21 July 2012 - 05:05 AM in Visual Basic Support
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.
#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.
- Netduino Forums
- → Novice Alex's Content
- Privacy Policy