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

New here and have a question


  • Please log in to reply
13 replies to this topic

#1 logicalstep

logicalstep

    Member

  • Members
  • PipPip
  • 21 posts

Posted 02 January 2012 - 06:05 PM

Hi All, Firstly, great forums, loads of helpful info from members. I have a Netduino Plus and am about to start a project. I am VB biased and have so far just been playing with simple C# examples. My question is: This project will be fairly complex for me in terms of the functions I need within it. There will be serial port and IP networking, but mainly string and date time comparisons. So should I stick with C# due to it's maturity, or is VB at such a stage that I should consider this? Thanks in advance. Logicalstep

#2 baxter

baxter

    Advanced Member

  • Members
  • PipPipPip
  • 415 posts

Posted 03 January 2012 - 08:29 PM

I too prefer Visual Basic. I am using MF 4.2 RC1 and I have not found anything that I cannot do in VB , except create a Class Library. If you need a DLL, just use C# to create it. My main project is a Netduino web server that accesses the functionality of the SD card, the serial port and which also has a NIST DayTime client to set the clock. I talk to it from a VB Windows client using url-encoded commands and the WebClient class for file POST and GET file requests. The only negative thing I have found is that sometimes you need a work-around, but this is mainly due to the limited functionality of the Micro Framework. Also, no unsafe code VB. Baxter

#3 logicalstep

logicalstep

    Member

  • Members
  • PipPip
  • 21 posts

Posted 04 January 2012 - 07:36 PM

Hi Baxter, Thanks for your reply. So you have found it to be stable to use for important projects? It sounds like this may be the way to go if I need to get this developed fast. I haven;t found very good references to the classes in the micro framework it does seem that MS isn't really giving this the attention is deserves, but then that probably just a matter of time. It's interesting what you say about using a time service, I had planned to use a real time clock over SPI, but I guess if I'm using networking I could just set the board clock via the web. Have you done any time comparisons in the micro framework? Also I learned the hard way about unsafe coding on VB.net Assuming by unsafe you mean basically option strict on? Thanks again! Logicalstep

#4 baxter

baxter

    Advanced Member

  • Members
  • PipPipPip
  • 415 posts

Posted 04 January 2012 - 11:20 PM

I posted some references on the Micro Framework here,

http://forums.netdui...tduino-sdk-api/

By unsafe code I meant trying force VB into doing what it does not want to do (e.g. using pointers under the hood via a C# DLL). Of course, this could be due to my flawed knowledge of pointers. I haven't done much with time calculations except for stuff like,
Dim dt As DateTime = New DateTime(2000 + CInt(s2(0)), CInt(s2(1)), CInt(s2(2)),
                                          CInt(s3(0)), CInt(s3(1)), CInt(s3(2))).AddHours(Me.UTC_offset + stdTime)
Utility.SetLocalTime(dt) 'Microsoft.SPOT.Hardware.Utility

Lookup DateTime in Object Browser for MF4.2 for Methods, Properties and Operators. it seems as though you can do arithmetic, although I haven't seen amy examples.

Baxter

#5 logicalstep

logicalstep

    Member

  • Members
  • PipPip
  • 21 posts

Posted 16 January 2012 - 08:34 PM

Thanks for the advice Baxter, At the risk of repeating myself...would you at this stage recommend VB or C# in terms of easy of use and supporting library's? It seems like VB is lacking some examples of things like using SPI and shift registers. Regards Logicalstep

#6 Stefan

Stefan

    Moderator

  • Members
  • PipPipPip
  • 1965 posts
  • LocationBreda, the Netherlands

Posted 16 January 2012 - 10:32 PM

At the risk of repeating myself...would you at this stage recommend VB or C# in terms of easy of use and supporting library's?

Well, there is more knowledge available for C# at this time, and the latest stable firmware supports only C#, but VB is fun, and if nobody starts with it, no resources will ever spawn ;)

It seems like VB is lacking some examples of things like using SPI and shift registers.

*cough* http://netmftoolbox....dware.Ic74HC595
:D
"Fact that I'm a moderator doesn't make me an expert in things." Stefan, the eternal newb!
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs

#7 logicalstep

logicalstep

    Member

  • Members
  • PipPip
  • 21 posts

Posted 22 January 2012 - 11:26 AM

Hi Stefan,

Ha, well there you go, the exact example I was asking about!

Well, there is more knowledge available for C# at this time, and the latest stable firmware supports only C#, but VB is fun, and if nobody starts with it, no resources will ever spawn



I see what you are saying, but as in your sentence, people always say things like ' but VB is fun' and it's that kind of comment that leads me to believe VB is not considered to be a 'proper' programming language. Now don;t get me wrong I've done some things on windows that would have taken me ages to learn in C#, so in that respect VB is great.

But it seems to me that C# is still considered more of a programmers language and also when working in the .NET Micro, I have a feeling because it's again more similar to the Arduino C, that it will naturally see a lot more coverage in terms of people wanting to learn it.

I think I was also getting a little confused when reading about how it setup VB on the netduino. For some stupid reason I thought you had to choose one or the other. But it looks like you can just switch between them as you choose, as long as you have the correct SDK and Firmware. Is this the case?
Also I tried to update the Board with RC3 and the latest Tinybootloader, but I get deployment issues. I'm pretty sure I followed everything to the letter, but it just shows as 'Deploying' but never does. Sometimes it'll even get to ' Ready' but in the bottom right I still see the animated build logo churning away. Is this a known issue?

Thanks for your help so far guys.

Logicalstep

#8 Stefan

Stefan

    Moderator

  • Members
  • PipPipPip
  • 1965 posts
  • LocationBreda, the Netherlands

Posted 22 January 2012 - 12:13 PM

I see what you are saying, but as in your sentence, people always say things like ' but VB is fun' and it's that kind of comment that leads me to believe VB is not considered to be a 'proper' programming language. Now don;t get me wrong I've done some things on windows that would have taken me ages to learn in C#, so in that respect VB is great.

BASIC is mostly seen as beginners language (hence it's name: Beginners All-purpose Symbolic Instruction Code). I think this helps stimulating the feeling it's not as serious as other languages.
In my humble opinion VB2010 isn't what BASIC used to be anyway, but I programmed BASIC since '89. Languages just transform by time I suppose.

I think I was also getting a little confused when reading about how it setup VB on the netduino. For some stupid reason I thought you had to choose one or the other. But it looks like you can just switch between them as you choose, as long as you have the correct SDK and Firmware. Is this the case?

I've installed the SDK, which works for both VB and C#. You can indeed just switch.

I'm pretty sure I followed everything to the letter, but it just shows as 'Deploying' but never does. Sometimes it'll even get to ' Ready' but in the bottom right I still see the animated build logo churning away. Is this a known issue?

One of the reasons it's still in beta, yes ;)
"Fact that I'm a moderator doesn't make me an expert in things." Stefan, the eternal newb!
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs

#9 logicalstep

logicalstep

    Member

  • Members
  • PipPip
  • 21 posts

Posted 22 January 2012 - 12:16 PM

Thanks for the quick reply, do you know if there is any fix for this issue. I now can;t use if for C# of VB ;) Can I go back to a previous version? Logicalstep

#10 Stefan

Stefan

    Moderator

  • Members
  • PipPipPip
  • 1965 posts
  • LocationBreda, the Netherlands

Posted 22 January 2012 - 12:20 PM

Thanks for the quick reply, do you know if there is any fix for this issue. I now can;t use if for C# of VB ;)

Can I go back to a previous version?

Logicalstep

You can always go back to the latest stable firmware. That's no problem.
Also, I found it helps unplugging the netduino before deploying again.
"Fact that I'm a moderator doesn't make me an expert in things." Stefan, the eternal newb!
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs

#11 emg

emg

    Advanced Member

  • Members
  • PipPipPip
  • 129 posts

Posted 22 January 2012 - 12:21 PM


Also I tried to update the Board with RC3 and the latest Tinybootloader, but I get deployment issues. I'm pretty sure I followed everything to the letter, but it just shows as 'Deploying' but never does. Sometimes it'll even get to ' Ready' but in the bottom right I still see the animated build logo churning away. Is this a known issue?


Yes, this is a known issue. See here:

Response: Pinging... Error: No response from device

Please upvote the 2 codeplex bug reports for Microsoft and SecretLabs to add your voice (links at the end of the above thread).

RC3 of Beta 4.2 was released in October of last year. To me (based on release history), it looks like it could be a while (months) before anything gets updated/fixed. If you are needing to start your project now, I would drop back to the last stable (C# only) release 4.1. I am in a similar position and I've decided to take a different route (RaspberryPi) I am developing my application now and will use full .Net and Mono (it also supports VB now BTW). The RaspberryPi is due to be released in February/March, which will probably still be before anything is fixed with the Netduino. I can still use the Netduino as part of my project eventually, when 4.2 gets a little more 'mature'.

#12 logicalstep

logicalstep

    Member

  • Members
  • PipPip
  • 21 posts

Posted 22 January 2012 - 01:04 PM

Hi emg, I have upvoted the issue on Codeplex. A real shame that this kind of bug has crept in, I can understand it's Beta, but that doesn't usually mean it completely breaks. I guess these things happen :rolleyes: I've been following the RasberryPi development as well. You day you will be using full .net with it? Have you any links on how that all works for the Pi? Logicalstep

#13 JerseyTechGuy

JerseyTechGuy

    Advanced Member

  • Members
  • PipPipPip
  • 870 posts

Posted 22 January 2012 - 01:05 PM

Hi All,

Firstly, great forums, loads of helpful info from members.

I have a Netduino Plus and am about to start a project. I am VB biased and have so far just been playing with simple C# examples.
My question is: This project will be fairly complex for me in terms of the functions I need within it. There will be serial port and IP networking, but mainly string and date time comparisons. So should I stick with C# due to it's maturity, or is VB at such a stage that I should consider this?

Thanks in advance.

Logicalstep


I have worked in VB oh since VB4 (way back) and have worked with VB.NET since the early betas. Most of my career I have worked for very VB centric clients never having the chance to work in C#. Working with the Netduino, I felt using C# was the way to go. It just lends itself to this technology and at the same time, it helps me brush up on my C#. So in my opinion, I would go with C# for your Netduino projects. Just my 2 cents for what it's worth.

#14 emg

emg

    Advanced Member

  • Members
  • PipPipPip
  • 129 posts

Posted 22 January 2012 - 01:36 PM

Hi emg, I have upvoted the issue on Codeplex.

A real shame that this kind of bug has crept in, I can understand it's Beta, but that doesn't usually mean it completely breaks. I guess these things happen :rolleyes:
I've been following the RasberryPi development as well. You day you will be using full .net with it? Have you any links on how that all works for the Pi?

Logicalstep


Thanks for the upvotes. I plan to use Mono which looks to support ARM/Debian (Mono on the RPi). That's the plan. Of course, you know what they say about plans... ;)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

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.