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.

Bainesbunch's Content

There have been 54 items by Bainesbunch (Search limited from 10-May 23)


By content type

See this member's


Sort by                Order  

#25343 XInput Control of Netduino Plus Across a Network

Posted by Bainesbunch on 10 March 2012 - 05:56 PM in General Discussion

HI, I am not sure I understand your statement " It seems the NETMF framework doesn't speak asynchronously" I am using the Netduino with the 2 serial ports receiving data from one port and sending it to the other using 2 different baud rates on the two serial ports and data moving asynchronously on both directions. The serial ports raise interrupts when data is available on the incoming buffer and so a non-blocking read and re-write can be coded with ease. Tell us a little more about why you think it is not asynchronous and perhaps we can help. Cheers Pete.



#25964 VS 11 & NET MF

Posted by Bainesbunch on 25 March 2012 - 02:21 PM in Visual Studio

Guess I'll have to fix my VS2010 installation then.
Cheers,Mark


Or get a free copy of "Microsift Visual C#/VB 2010 Express"

Pete.



#25937 Using Video Studio / Visual Basic to Program NetDuino Plus

Posted by Bainesbunch on 24 March 2012 - 07:18 PM in Visual Basic Support

Hello, Firstly you will need to install version 4.2 SDK and upgrade the firmware on the device.. Then you will either need VS enterprise edition which has all the languages supported or you will have to install Microsoft 2010 Visual Basic express. This is a free version downloadable from MS. You will have to install Visual basic BEFORE the SDK so that it registers all the project types correctly. Any problems please feel free to drop me a PM. Cheers Pete.



#24291 thread starts thread but 2nd thread does not finish

Posted by Bainesbunch on 16 February 2012 - 02:03 PM in General Discussion

Why does this code loop in a "while" creating new instances of the thread and then starting them. Surely if you re instantiate a thread using the same object variable it will mess with the thread created the first time through the loop. I am not a c# coder so i could be getting it all wrong. Cheers Pete.



#25902 State machine

Posted by Bainesbunch on 23 March 2012 - 05:56 PM in Netduino 2 (and Netduino 1)

Yep and the one of the things missing is delegates for cross thread event handling. But since we don’t have any UI as such his is not too much of an issue. I drive almost everything from threads. One for the state control, one to poll user inputs, one to read data in the serial stream and process etc etc. You also have all the event handling too so you don’t actually need to worry about a pin state transition it is all handled for you and an event if fired on change that can be pointed to a method to process it.



#25903 Seedstudio Keypad Module

Posted by Bainesbunch on 23 March 2012 - 06:04 PM in Netduino 2 (and Netduino 1)

Well done !! :D Now go and have some more fun



#25859 Seedstudio Keypad Module

Posted by Bainesbunch on 22 March 2012 - 05:36 PM in Netduino 2 (and Netduino 1)

Aha! Ok will I will try that.


do you have a pinout for this keyboard ?



#25852 Seedstudio Keypad Module

Posted by Bainesbunch on 22 March 2012 - 04:16 PM in Netduino 2 (and Netduino 1)

Hello,

If you look at the Arduino code that is on the webpage for this keypad it looks like a basic 3x3 multiplexed matrix


void setup() 
{
  Serial.begin(9600);
  for(i=0;i<3;i++) 	pinMode((KeyOPin + i), OUTPUT); 	
  for (i=0;i<3;i++)	pinMode(( KeyIPin + i), INPUT); 
} 	

void loop()
{
   scankey();
   if (press)
   {
	press=0;
	Serial.print("Keycode is ");
	Serial.println(oldkey,HEX);
   }
}

void scankey()
{
  reg = 1;
  for (i=0;i<3;i++)
  {
	for (n=0;n<3;n++)
	{
      if((reg>>n)&1)        digitalWrite(KeyOPin+n , HIGH); 
      else                  digitalWrite(KeyOPin+n , LOW);
	}   
	for (n=0;n<3;n++)
	{
  	if(digitalRead(KeyIPin + n))
  	{ 	
    	key = key | (1<<(4+n));	
    	key = key | reg ; 
      }                    
	}
	reg = reg << 1;
  }

  if (key & 0xf8)
  {
	if (key!=oldkey)   {   
  	press = 1;  
  	oldkey = key ; 
	}
  }
  else   	oldkey = 0;


  key = 0;
}


it is an easy task to translate this code from the Arduino C++ Variant to C# or VB

It would be useful to know the pin outs on the IDC connector they have attached to the board so you know which pins connect to the 3 ports that are outputs and which should be connected to the inputs.

If you are having problem drop me a PM or ask further here and I can do the translation for you. But it is best to try yourself first.

Cheers Pete.



#22830 SD Card With 4.2 firmware not working

Posted by Bainesbunch on 16 January 2012 - 02:07 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi Pete,

The OneWire feature needs to be compiled into the firware because it has a native code component which lives deep in the hardware layer.

For the VB crash...can you post a bug report for that on netmf.codeplex.com? We can also ping someone on the VB team and see if they have any ideas... That's no fun at all!

Chris



Hi Chris,

OK will do thanks.

For now until I can get this sorted I will have to roll back to Netduino non plus and add an external SD reader. I don’t have the time to faf about with it. I have deadlines to meet.

The USB driver is the same for both plus and no plus boards right ?

Do we have any ETA for the next revision of the firmware including the onewire stuff.

Cheers Pete



#22828 SD Card With 4.2 firmware not working

Posted by Bainesbunch on 16 January 2012 - 01:42 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi Pete,

Glad you got that sorted out :)

There is no OneWire support in the .NET MF 4.2 beta firmware (it's too big), but once the firmware goes to RTM we'll work with CW2 to incorporate his OneWire extensions into it...

Chris



Hi Chris,

well that explains why I can’t find it :)

Can you then please point me to CW2's libs so I can use them until they get implemented into the release.


Following on from my Netduino plus issues. I am having a lot of problems getting the software deployed onto the device and even more problems actually getting into debug mode. Almost every time I "run" the application from the IDE my VB 2010 Express crashes. When is does not crash it hangs about for a long time and then tells me it cannot communicate to the device, finally it sometimes just sits there saying it is rebooting... this does not happen with my other Netduinos (non Plus).


Cheers Pete



#22826 SD Card With 4.2 firmware not working

Posted by Bainesbunch on 16 January 2012 - 11:27 AM in Netduino Plus 2 (and Netduino Plus 1)

Hi Chris,

I have never tried it using the 4.1 firmware, vb is not supported ;). I can get a root folder of '\SD' from it but it will not give me a file list.

if you want to post me a bit of diagonstic code i am happy to load it up and run it to test for the error. C# or VB either is OK.


Whilst i have you attention, I am also trying the find the namespace for the "onewire" class. Where is it hiding in 4.2 ?

Cheers Pete.



PROBLEM SOLVED


OK so you know how sometimes in life you do really stupid things ..... well I am so embarrassed to have to report that this is one of them.

I have several developments going on with the netduinos at the moment and all of them except 1 are netduinos, the last is a netduino plus. I have been re-flashing them to the latest firmware and ... yeah you guesed it I flashed the plain netduino firmware onto the netduino plus.

Having worked out my stupid mistake I thought I would share my embarrassment with the community as a cautionary tale for all others.

The SAMBA tool and the MF Loader tool both remember your last file location and also the firmware is called the same for both the normal and plus versions of the netduino .... well you can work out the rest.


But .... Chris if you or anyone else is still following this thread after my confession of stupidity I still need to know the DLLs and namespaces for the onewire class.


Cheers Pete.



#22808 SD Card With 4.2 firmware not working

Posted by Bainesbunch on 15 January 2012 - 07:31 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi Bainesbunch,

If you're not seeing any directories (including no '\SD'), that means that your SD card is not mounting.

Did this work with the v4.1.1 beta release? It may be an issue with the SD cards, with your board, or with the firmware. Let's narrow it down.

[We do test SD on every board that ships...but perhaps it was damaged in shipping.]

Chris




Hi Chris,

I have never tried it using the 4.1 firmware, vb is not supported ;). I can get a root folder of '\SD' from it but it will not give me a file list.

if you want to post me a bit of diagonstic code i am happy to load it up and run it to test for the error. C# or VB either is OK.


Whilst i have you attention, I am also trying the find the namespace for the "onewire" class. Where is it hiding in 4.2 ?

Cheers Pete.



#25741 screw terminals

Posted by Bainesbunch on 19 March 2012 - 08:04 PM in General Discussion

Hi mr_sargent and welcome to the Netduino forums!

I myself used a Screw Shield, which would help you out I believe:
http://wingshieldind...ld-for-arduino/


Ha .... I use them too, a life saver sometimes :D



#28088 ReDim Preserve

Posted by Bainesbunch on 25 April 2012 - 04:53 PM in Visual Basic Support

Unfortunately at the moment there is ,as it says, no array copy functionality built in. What you have to do is create a second array the size you are trying to redim and copy one by one the values from you original array :o Cheers Pete.



#25970 PWM Input from the ground up

Posted by Bainesbunch on 25 March 2012 - 06:07 PM in Netduino 2 (and Netduino 1)

Hi Anthony, this is not as difficult as it seems since we have edge driven interrupts on the pins of our Netduinos. Basically if you have a methods that is called on both the leading (rising edge) and the falling edge of the pin then you can calculate the time between the two. This will give you your pulse width. Since you are not interested in the duty cycle then you won’t be wanting to measure time between leading edges. I can give you a snippet of code to do this in VB if you want it. Let me know. Cheers Pete.



#26039 Powering the Netduino via another Shield

Posted by Bainesbunch on 28 March 2012 - 08:14 AM in Netduino Plus 2 (and Netduino Plus 1)

Hello, and welcome to the forums I can’t answer the question directly on that shield but I have designed shields myself that put 5v back into the Netduino through the 5v pin. I have also powered my Netduinos from the 5v output of a USB to serial converter without any issues. Hope this helps. Cheers Pete.



#22891 Plus no deploying any projects with 4.2 rc3

Posted by Bainesbunch on 17 January 2012 - 10:17 PM in Beta Firmware and Drivers

Well Pete,

I guess I don't know how private email works on the forum. I am reluctant to openly post my email address for fear of it getting hijacked.

Baxter



OK no worries, I am sure it would only serve to further cloud the situation anyway :)

Cheers Pete



#22886 Plus no deploying any projects with 4.2 rc3

Posted by Bainesbunch on 17 January 2012 - 08:20 PM in Beta Firmware and Drivers

Pete,

My email address was hidden. I unchecked it so try again if you still want the SDK.

Baxter



Nope still not working see screen shot :)

Untitled.png

Cheers Pete



#22866 Plus no deploying any projects with 4.2 rc3

Posted by Bainesbunch on 17 January 2012 - 10:45 AM in Beta Firmware and Drivers

Thank you all folks,

This morning I woke up all full of hope for my plight.

I flashed the 4.1 firmware and ... yes my Netduino will now allow me to deploy again.

So the villain looks like being 4.2 rc4 for the plus.

Does anyone else have the same problem.

For all the test I used the same Hardware (Netduino Plus rev. b board) re-flashing the boot loader and the firmware each time ....

  • 4.2 rc4 Plus firmware will not allow deployment of applications.
  • 4.2 rc4 Non Plus firmware will allow deployment of applications.
  • 4.1 Plus firmware will allow deployment of applications.


Edit : Thanks to Baxter i also tried it with the 4.2 rc1. This brought me more success. This time I was able to deploy a vb application BUT the device would just sit there saying rebooting. I have to unplug and reconnect the device to emulate a re-boot before it will continue EVERY time. Coincidently the string to double problem (in another thread I have started) is also not present in the rc1.

Cheers Pete.



#22880 Plus no deploying any projects with 4.2 rc3

Posted by Bainesbunch on 17 January 2012 - 06:08 PM in Beta Firmware and Drivers

Pete,

I think you need both the RC1 firmware and the MF4.2 RC1 SDK to get going smoothly. As I noted in my post I could not upload the SDK because of its size. I searched on CodePlex, but it does not seem to be available. It is very strange that the various release candidates are not archived somewhere in case someone wants to revert. If you wish to PM me, I can try to send it to you via email.

Baxter




Hi Baxter,

I tried to send you a PM, but it is telling me you can't use it .. Very odd ..

You can sent it to me on Skype if you have it. My Skype address id LPDR.Miers. It is very fast as it is P2P. I am online 24/7 just ask to be a contact i will add you then you can send it through by dragging and dropping it into the typing window.

Chris, if you are still following this thread, can you say when we are going to be seeing the next release candidate and will it also have the string to double conversion and do you intend to do a Release candidate with the onewire bit in soon ?



Cheers Pete.



#22845 Plus no deploying any projects with 4.2 rc3

Posted by Bainesbunch on 16 January 2012 - 09:05 PM in Beta Firmware and Drivers

Hello Folks,

I have a mystery to solve.

I have just got my first plus and flashed it to 4.2 rc3 and since then it has refused to deploy any projects at all in either vb or c#.

So as a little experiment I re-flashed it with the 4.2 rc3 for non plus Netduinos. Now it will allow me to deploy projects in both vb and c#.

Just to be sure I was not going completely crazy I then flashed the 4.2 rc3 for plus back onto it and once again it refused to deploy any projects at all.

This is driving me crazy, can someone point me to the 4.1 release firmware so I can try rolling it back to see what happens please.

Cheers Pete.



#25422 Netduino Firmware v4.2.0 RC4 (Netduino + Netduino Plus)

Posted by Bainesbunch on 12 March 2012 - 08:38 PM in Beta Firmware and Drivers

Hi Chris, How far are we off seeing a release of 4.2, or another RC. Cheers Pete.



#24292 NetDuino C# or VB

Posted by Bainesbunch on 16 February 2012 - 02:10 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi Stari A few too many variables here. Try eliminating the browsers first. If it work on your PC does it work in all browsers. If the answer to that is yes then it could be a browser compatibility issue with your android tablet device. If the answer is no only some of the browsers then you have cross browser compatibility issues. Try a VERY simple HTML only hello world page and see if that work. Basically eliminate as many possibilities as you can and you will eventually get to the problem. Cheers Pete.



#30756 [Webserver] Website with password protection

Posted by Bainesbunch on 15 June 2012 - 10:11 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi there, I'm new here and just received my first netduino+.

Until now I wrote a code that provides a webserver which can get information from the browser throug the request (on loading the page). -> When you watch the request you can see there is the path which I use as command (ex. www.google.com/command1)

I start a pc over WOL by opening a special link (ex. www.mydomain.com/wolStartNow).
The problem is that EVERYBODY can open the link and start my pc!

So I would like to protect access by password.
But, (don't forget I'm a netduino and c# beginner) I can't use php on netduino+. Or do I?

So, I tried one thing: Using a javascript code that hashes a username and password from a html-form. The generated hash is the command. Nobody could remember that hash/url if he watched me sending the command.

BUT: The javascript code is so long, that I got an Out-Of-Memory-Exception on the netduino+.

Do you have some ideas how to solve that problem, or how to protect my netduino-html-page with a password?

Thank you very much!
LordOfTheFlakes




#25938 [UK] Electrical Supply help

Posted by Bainesbunch on 24 March 2012 - 07:30 PM in General Discussion

OK so trips WILL blow when a light bulb finally fails sometimes. This is cause by the surge current that is drawn at the time the element fails. In a normal incandescent light bulb the filaments are double wound. Sometimes these short out, because the bulb is knocked or the filament starts to stretch and fold back on itself. This causes a much lower resistance through the bulb. This in turn then causes a momentary high current to be drawn just before the bulb fails. A low current trip like 5 amps normally found in UK domestic lighting circuits will trip quite easily. If you are measuring the voltage in series with your LED light then it is quite possible that you are only seeing 3 volts due to the internal resistance of the LED light. Cheers Pete.




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.