New to Visual Studio and C#
#1
Posted 18 January 2012 - 05:11 AM
#2
Posted 18 January 2012 - 08:21 AM
As you are new to all this, I advise to check these 3 tutorials: Getting started with Netduino, Button tutorial and Using event handlers. Most parts of the library are also documented by Microsoft in the API Reference for .NET Micro Framework.
Good luck!
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs
#3
Posted 18 January 2012 - 10:15 AM
Scary, isn't it ? I own a netduino for about a year but haven't done anything with it yet. I don't know C# and looking at code snippets posted here, I'm always wondering: "Is this code or a novel ?" I'm digging into msp430s now, that's plain C. Good luck.and looked at a bit of code...
#4
Posted 18 January 2012 - 11:11 AM
Scary? It's another language, like English and Mandarin are different languages. It's up to the user if (s)he wants to learn another language. I found out that it can be very useful to speak multiple languages. English isn't my main language, but I learned to speak it since it's a commonly used language.Scary, isn't it ? I own a netduino for about a year but haven't done anything with it yet. I don't know C# and looking at code snippets posted here, I'm always wondering: "Is this code or a novel ?" I'm digging into msp430s now, that's plain C. Good luck.
You could also try to use Visual Basic by the way, also works on a Netduino
And if you really like C or C++, the Netduino can work for you. It can run native code; the firmware is written in it. If you want to go on this track, some useful resources can be found at http://wiki.netduino....ashx?HL=native
Although, in my humble opinion, it would take the .NET out of the Duino.
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs
#5
Posted 18 January 2012 - 11:32 AM
It's not that I really like C, I have just gone a little bit further than Hello World in C already. With C# only Console.WriteLine, well Mono actually... and haven't tried VB yet.You could also try to use Visual Basic by the way, also works on a Netduino
And if you really like C or C++
"Scary" was referring to the (novel-like) size of the code. Of course does everything you don't know look strange.
#6
Posted 18 January 2012 - 12:51 PM
It leads you through step by step. Based on this I decided to buy a Netduino plus and get started.
There is also Chris's book Getting stated with Netduino. But I don't have a copy myself. (Maybe he'll send me a copy free for recommending it. )
The book I bought was not a full .Net / C# course, but it was enough to do the simple stuff and get the confidence to move on.
I sometimes cringe when I see the great chunks of code people paste into forum posts, but its usually appropriate as to get help you often need to give a lot of detail. Often you will find that the person posting has put a lot of effort into using classes properly to make their code re-usable, had they not done this, there was probably a simple one or two line method they could have used to get started.... looking at code snippets posted here, I'm always wondering: "Is this code or a novel ?"
Paul
#7
Posted 19 January 2012 - 07:09 AM
Hi Ryder,
As you are new to all this, I advise to check these 3 tutorials: Getting started with Netduino, Button tutorial and Using event handlers. Most parts of the library are also documented by Microsoft in the API Reference for .NET Micro Framework.
Good luck!
Thanks ever so much, Stefan... I have already done the entire GSIOT, and even set my 'duino up as a web server, so those tutorials didn't add much...
What I am missing is what I mentioned right from the start... there are, or so I hear, thousands of "functions" or objects or whatever they are, available as part of .NETMF / Netduino. Assuming this is true... they are entirely invisible to me.
When I start Visual Studio, obviously there is what is essentially a "blank page", yet the programming environment seems to somehow know quite a lot about the bazillions of Netduino objects that it so patiently waits for me to use.
This beggs the question... since I am starting from nothing, inside a brilliant programming environment that knows so much about the specific functionality of the Netduino... isn't there some sort of "bridge" or "window" from the vastness of the white empty canvas first presented, to the functionality available to the programmer?
I guess what I am asking, is there any way to convince this brilliant programming environment to share something about what it knows wrt Netduino? It seems to know about syntax... it seems to know about functions and the arguments for each... (or I should probably say objects and methods)
When I select "help" I go to a microsoft page that wants to talk about generic c#, which is not what I need at all.
I need netduino specific functions, so that I can try them. Can I not at least get Visual C# 2010 Express to show me a list of the functions or objects it has that relate directly to Netduino?
If I had a list, at least that would be something... I could select a few things at random, and play with them.
As it stands, I have nothing really. A blank page. I certainly don't want to guess the names of objects or their methods, and I don't want to keep typing in other peoples code verbatim. Time to discover everything... and try it.
I remember using the macro language help in MS Excel, and that help ***rocked*** it gave you lists and summaries of functions based on category, for example. Of course it too was a microsoft product, so I hold out hope.
So again, this specifically relates to the resources *within the programming environment*.
Thank you!
#8
Posted 19 January 2012 - 07:44 AM
Not thousands, and most are part of the .NETMF. Those are all described on the link I gave you; API Reference for .NET Micro FrameworkWhat I am missing is what I mentioned right from the start... there are, or so I hear, thousands of "functions" or objects or whatever they are, available as part of .NETMF / Netduino. Assuming this is true... they are entirely invisible to me.
But if it may help you, open a new netduino project, press and hold the Ctrl key, and press W and C. Then release the Ctrl key. A new window 'Class View' pops up. With this window you can browse through all references that are available at that time.
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs
#9
Posted 19 January 2012 - 09:01 AM
#10
Posted 19 January 2012 - 09:15 AM
Not thousands, and most are part of the .NETMF. Those are all described on the link I gave you; API Reference for .NET Micro Framework
But if it may help you, open a new netduino project, press and hold the Ctrl key, and press W and C. Then release the Ctrl key. A new window 'Class View' pops up. With this window you can browse through all references that are available at that time.
Sorry, one final thing... you said "most" of the objects are in the API
What are the others? How does one discover more about them and their use?
Regards,
Ryder
#11
Posted 19 January 2012 - 09:19 AM
The .NETMF documentation only covers the objects in the .NETMFSorry, one final thing... you said "most" of the objects are in the API
What are the others? How does one discover more about them and their use?
The key combo I just explained shows them all.
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs
#12
Posted 20 January 2012 - 02:13 AM
The .NETMF documentation only covers the objects in the .NETMF
The key combo I just explained shows them all.
Ok, just to be sure... everything is seen in the class view window, not just the libraries(?) that are indicated with the "using" command?
How does the IDE know about all of these objects?
Thanks!
#13
Posted 20 January 2012 - 05:26 PM
Everything is in libraries. It knows about it since the libraries explains themselves. For example, check out this code (part of a library written by me): Toolbox.NETMF.Hardware.SpeakerOk, just to be sure... everything is seen in the class view window, not just the libraries(?) that are indicated with the "using" command?
How does the IDE know about all of these objects?
Thanks!
I'll put out a few lines:
/// <summary> /// Generates a sound through your speaker. /// </summary> /// <param name="Frequency">The frequency of the sound in hertz; a value in the range 37 through 32,767</param> /// <param name="Duration">The number of ticks the sound should last; a value in the range 0 through 65,535. There are 18.2 ticks per second.</param> public void Sound(float Frequency, float Duration) {You'll see a method declaration, called Sound. With the XML comments I wrote above it in the source code, the Visual Studio IDE recognises the method and knows which parameters are accepted, and can guide you using them.
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs
#14
Posted 23 January 2012 - 07:26 AM
Everything is in libraries. It knows about it since the libraries explains themselves. For example, check out this code (part of a library written by me): Toolbox.NETMF.Hardware.Speaker
I'll put out a few lines:/// <summary> /// Generates a sound through your speaker. /// </summary> /// <param name="Frequency">The frequency of the sound in hertz; a value in the range 37 through 32,767</param> /// <param name="Duration">The number of ticks the sound should last; a value in the range 0 through 65,535. There are 18.2 ticks per second.</param> public void Sound(float Frequency, float Duration) {You'll see a method declaration, called Sound. With the XML comments I wrote above it in the source code, the Visual Studio IDE recognises the method and knows which parameters are accepted, and can guide you using them.
Ok, I can see how that works *within* a library... but how does Visual Studio even know the library exists? That is what I am getting at.
Thank you!
R
#15
Posted 23 January 2012 - 09:04 AM
Because you said soOk, I can see how that works *within* a library... but how does Visual Studio even know the library exists? That is what I am getting at.
When you start a new project, you'll start with a template, for example "Netduino Application", a few references exist within the template. With this specific template it has a few netduino specific references.
This is not Netduino specific by the way. This is how the C# language works.
Perhaps you should start here if you're not familiar with C#: http://msdn.microsof...y/ms228593.aspx
I mus say, I have the feeling you're trying to comprehend everything at once. Just try a bit, experiment. And learn over time. Nothing, especially not a programming language, can be learned in a few days, and you should just try to use it.
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users