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.

knut.tveitane's Content

There have been 18 items by knut.tveitane (Search limited from 21-April 23)


By content type

See this member's

Sort by                Order  

#59137 netduino IDE's

Posted by knut.tveitane on 10 July 2014 - 07:45 AM in Netduino Plus 2 (and Netduino Plus 1)

Let's keep things separate: C# is a programming language - it is NOT an IDE. The IDE used for programming the NetDuino is the same IDE used for programming .Net solutions for Windows and Web - it is called Visual Studio (VS). Using VS, you have a choice of languages, but for Netduino development the selection is limited to C# and Visual Basic (I think... but I haven't tried to use any other). Both languges are used also for Windows and Web development, and currently not all language features are available in the downscaled .Net Micro Framework which is used for NetDuino development.

 

-knut




#59094 Enum to string - is there a convenient way in the MF?

Posted by knut.tveitane on 08 July 2014 - 06:57 AM in Visual Studio

Elizabeth, did you really try this? I think you didn't, because although this is what the documentation says and how it works in .Net, in my experience it does NOT work like this in .NetMF. That is also the reason this question came up in the first place.

 

.ToString() gives you the string representation of the integer value of the enum element: I.e. if you have an enum

    public enum MyEnum { First, Second, Third }, then MyEnum.First.ToString() will return "0". In .Net, it would be "First".

 

Same the other way around, .NetMF does NOT parse strings to enum values like .Net - the Enum.Parse() method is not supported.
 




#58614 A problem with HttpWebRequest in VS Express for C#

Posted by knut.tveitane on 07 June 2014 - 07:12 AM in Visual Studio

In the micro framework, these classes are found in the assembly System.Http, so you need to add a reference to that one. The namespace is System.Net.




#58315 trying to flash an LED and pluse a piezo in error state

Posted by knut.tveitane on 21 May 2014 - 07:29 AM in Netduino 2 (and Netduino 1)

knut.tveitane, thought. Would it be better to use i++ or ++i? I realize what the difference is between the specific lines, but thinking about application.

Used as a statment on its own, the result is the same. The difference in semantics is only significant if used as part of an expression, where you reference the variable: ++i increments the variable before it is referenced, i++ after. (Actually, i = ++i would work in your case - and in this case, the assignment is plain redundant).

 

As a standalone statment, i++ is used more often - but this is only a convention. Following conventions is not a bad habit, though.




#58282 trying to flash an LED and pluse a piezo in error state

Posted by knut.tveitane on 20 May 2014 - 02:27 PM in Netduino 2 (and Netduino 1)

 

First, this line is redundant:

  1. i = i++;

Note - it is not just redundant, it is not doing what you (probably) want to achieve. The i++ construct increments the variable i *after* it has been referenced, but *before* the assignment is fullfilled. In other words, i will have the same old value after this statement as it had before.




#57837 NP2 SD IO strange problem, bug ??

Posted by knut.tveitane on 29 April 2014 - 01:31 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi Arno,

Difficult to tell without seeing the code where the exception happens. Are you trying to read your numbers as integers?(The value 22.12 is not an int but a real... 2212 however is int)

 

-knut




#57013 Help with netduino Networking

Posted by knut.tveitane on 23 March 2014 - 08:48 AM in Netduino Plus 2 (and Netduino Plus 1)

You are completely right of course - any TCP/IP-based protocol will do, according to the assignment. But even with Telnet the client has to initiate the queries.




#57010 Help with netduino Networking

Posted by knut.tveitane on 23 March 2014 - 06:15 AM in Netduino Plus 2 (and Netduino Plus 1)

Hi,

 

I will give you a hint:

 

It is not so strange that you don't know how to send and receive data from the server to the client - because this is not possible. It is the client that sends and requests data to/from the server, using HTTP requests. The server listens for requests from clients, and responds to them.




#57001 HC-05 Bluetooth Module Problem

Posted by knut.tveitane on 22 March 2014 - 06:35 PM in General Discussion

Looks like I found the solution... it was the CLASS setting, and with AT+CLASS=0 the module finds some devices  by their Bluetooth addresses - probably mine, I hope. Next exercise is to find out which device has which address.

 

Case closed for now.




#56991 Dedicated clock CPU vs thread on an N2+?

Posted by knut.tveitane on 22 March 2014 - 09:59 AM in General Discussion

If you synchronise the Netduino's clock with NTP at startup time, and then use a Timer object to trigger updates to the Nixie tubes/SPI signal (from the Timer event handler) as often as it is needed, you will have plenty of capacity for doing other work on the Netduino. No need to use a hardware RTC as long as you have Internet access and the NTP gives you sufficient accuracy.




#56987 HC-05 Bluetooth Module Problem

Posted by knut.tveitane on 22 March 2014 - 07:26 AM in General Discussion

Yes, the devices are discoverable. The headset is always discoverable, and the phone is set to discoverable in the Bluetooth setup.

 

I have tried different settings for the AT+CLASS= setting, I suspect this could possibly have something to do with it. Ufortunately, the available documentation for this setting is impenetrable to me, to put it mildly - at least the documents I have been able to find. If anyone has an understanding of how this setting works, and how it co-operates with the AT+INQ command, I would be grateful for an introduction on "for dummies" level :-)




#56980 HC-05 Bluetooth Module Problem

Posted by knut.tveitane on 21 March 2014 - 10:18 PM in General Discussion

I have tried to set up my first Bluetooth project with my Netduino 2 plus, but I am banging my head into a problem.

 

I got myself an HC-05 Bluetooth module. Not a very user-friendly module with its 1.5mm pitch edge contacts, but despite my limited soldering experience I got the necessary wires successfully connedted. Basically, the unit works and the serial interface side is responsive - I can enter command mode, send AT-commands to the unit and get the expected response back. Except...

 

According to the documentation I found on the net, when the unit is in in Master mode, the AT+INQ command should return a list of other devices within reach of the HC-05 (within a minute or so). I have put my Android phone as well as a Bluetooth headset close to my project workspace, but AT+INQ returns nothing exept from an OK (after a minute).

 

On my smartphone, I can see and even connedt to the HC-05 module, so the radio communication side also works. But probably there is a configuration issue which I cant figure out.

 

Is there anybody out there experienced in Bluetooth configuration who could lead me in the right direction?

 

-knut

 

 




#56713 Enum to string - is there a convenient way in the MF?

Posted by knut.tveitane on 08 March 2014 - 08:16 PM in Visual Studio

Seems like converting between string and enum - both ways - is unsupported in micro framework. I ended up using a hashtable for converting string to enum, this could be used the other way as well. Verbose, but it works.




#56648 SPI Buffer

Posted by knut.tveitane on 05 March 2014 - 03:16 PM in Netduino 2 (and Netduino 1)

Hi Oren,

 

As you can see from your VS project, the SPI class resides in the Microsoft.SPOT.Hardware namespace. So, on the Codeplex page you should go to your version (f.ex. Client_v4_3), then under CLR and Libraries you will find SPOT_Hardware below which you will find the SPI code files.

 

However, note that the .Net Micro Framework is _NOT_ written in C#....

 

-knut




#56123 USB port malfunction

Posted by knut.tveitane on 16 February 2014 - 03:33 PM in Netduino Plus 2 (and Netduino Plus 1)

Yes, I have tried the Netduino other USB ports, even on another computer. So, the problem is definitely on the Netduino side.

-knut




#56112 USB port malfunction

Posted by knut.tveitane on 16 February 2014 - 06:27 AM in Netduino Plus 2 (and Netduino Plus 1)

Thanks for your quick reply, Chris!

 

OK, that sounds like a couple of challenging exercises which will be fun to try when I get more proficient - I will definitely save the board for later. For now, I have ordered a new board - and an antistatic mat for my work desk.




#56106 Compile error

Posted by knut.tveitane on 15 February 2014 - 08:21 PM in Netduino Plus 2 (and Netduino Plus 1)

Difficult to tell without seeing the code. The only thing I notice is that somehow the System.Collections.Generic namespace is referenced in your code - and generics are not supported in the .net midro framework.




#56105 USB port malfunction

Posted by knut.tveitane on 15 February 2014 - 07:46 PM in Netduino Plus 2 (and Netduino Plus 1)

I was just about to connect the USB cable to my NetDuino plus 2 to download a new experiment, when I noticed a small spark... an electrostatic discharge. The discharge happened between the outer metal shells on the plug and socket - which I believe is unconnected on the Netduino side. Nevertheless, something broke. Result: My computer does no longer recognise the Netduino as an USB device.

 

Except from the malfunctioning USB port, the board seems to work - the last program I dowmloaded, stll performs as it did before, the reset button works and the onboard LEDs work as they should. But without the USB port I am not able to reprogram my Netduino. Or... is there any way I could program it via serial communication (through UART1/pins d0/d1)?

 

If not... there is probably no hope for the board?

 





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.