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 19-April 23)


By content type

See this member's


Sort by                Order  

#43374 Multi threading

Posted by Bainesbunch on 14 January 2013 - 09:55 AM in Visual Basic Support

Same as you do in any .NET environment :)




#34291 Firmware update issue / VS issue

Posted by Bainesbunch on 27 August 2012 - 06:05 PM in Netduino Plus 2 (and Netduino Plus 1)

You did flash the Netduino Plus version and not the non plus version ... right ?

Its just that looking at the report it says "HalSystemInfo.halVendorInfo: Netduino (v4.2.0.0) by Secret Labs LLC"

Just a thought

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




#29872 Extendedtimer

Posted by Bainesbunch on 28 May 2012 - 11:43 AM in Visual Basic Support

Hi Mark,


Depending on the precision of the timer you can set a standard timer to test the TimeSpan from the point that you started the timer, resetting the start point and raising an event when it is reached.



So if you wanted to check every second then set the timer to 1 second then in the sub that it calls do a simple TimeSpan

Here is a link to TimeSpan

http://forums.asp.net/t/1386180.aspx/1

The second alternative it to start a new worker thread that checks the TimeSpan in a loop and resets the start point and raises an event when the time has expired.


Hope this helps

Cheers Pete.



#28274 Industrial Use Case

Posted by Bainesbunch on 28 April 2012 - 06:58 PM in General Discussion

Thanks for sharing your experience Pete. Impressive use of the Netdruino. Just shows what's possible. Without giving away any details (as I understand your situation) did you have to customize the Netdruino to get the level of reliability up. A simple yes or no would suffice! Thanks


Yes. I basicly built it onto another PCB that took care of the nasty stuff that the outside world can though at it :D

Pete.



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



#28035 Industrial Use Case

Posted by Bainesbunch on 24 April 2012 - 05:20 PM in General Discussion

Hello, I am not doing anything on the net or with the cloud but I have developed a mission critical system to control camera dollies on a filming rig for use in live recording using the Netduino and the plus. They act as intermarries sampling data testing sensors and sending commands to the motor controllers. They relay this information back to a host PC doing all the data correlation and sending motor control commands back to the Netduino to pass on to the controllers. Everything is in closed loop so that any breakdown of communication caused the who system to go into emergency stop. I have had the system soak testing now for a continues period of 4 weeks without any issues. It will be going live in about 3 weeks and my confidence level is very high. Unfortunately the details of the system are protected by an NDA or I would be willing to share it here. In short I have no issues with using the Netduino in mission critical real time control situations. Hope this helps 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.



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



#25965 Application to run I/O ports

Posted by Bainesbunch on 25 March 2012 - 02:31 PM in Netduino Plus 2 (and Netduino Plus 1)

Hello,
Probably the easiest way to control all of the output pins is to create an array for OutputPins, and create a output pin for each output. Then loop through the array to set the value for each.
The analog inputs can output like a DIO i believe.

I hope that helps,
Ralim


You can also create a dictionary of type outputpins, this way you can access all the properties and methods without having to cast them back into their types and address them using a key rather than an index into an array. I also belive that the Analogue pins can act as both Input and output pins like any other I/O pin in the system.



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.



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



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



#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



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



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



#25820 Missing SecretLabs.NETMF.IO in SDK v4.1.0

Posted by Bainesbunch on 21 March 2012 - 10:21 PM in Netduino Plus 2 (and Netduino Plus 1)

I'm new to Netduino. I'm using Netduino SDK 4.1.0 which I downloaded from the netduino.com dowloads page. I'm trying to use netduino helpers AdaFruitILI932xTftTest which uses SecretLabs.NETMF.IO. The problem is, the file is missing. I've tried to a reinstall of the SDK using 'repair', but it does nothing. Any help?


You will have to add a reference to it manualy. I dont think it is part of 4.1

in the case of the 4.2 rc4 it can be found here :

C:\Program Files\Secret Labs\Netduino SDK\Assemblies\v4.2\SecretLabs.NETMF.IO.dll



#25817 Bluetooth Communication

Posted by Bainesbunch on 21 March 2012 - 08:40 PM in Netduino Plus 2 (and Netduino Plus 1)

Hello,

I am using a BT serial adapter connected to my Netduino and talking to my PC through a BT dongle.

Pairing was my first issue. Once i hade the BT to serial paired with my PC then I simply connected the TX and RX lines of the BT to Serial together to make a loopback. I then used a terminal emulator program (http://www.compuphas...are_termite.htm) on my PC to send characters through the serial BT to see if they were echoed back.

Once this was working I then set about writing the code to receive the data on the Netduino and echo it back.

It all worked as expected once I had gone through these steps. One gotchya however it the TX/RX they seem to differ from one manufacturer to another. So it might be worth switching them around if you are not receiving any data at the Netduino end.

Sometimes it is good to set some debug.prints to show what is coming in on the port.

I did notice however that you are trying to read 32 bytes into a buffer. The read will not return until it has read 32 bytes or timed out. Try setting the buffer length to 1 byte. This will echo every byte one at a time and not wait for the buffer of 32 bytes to be read.


Hope this helps ... and good luck.

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



#25544 Minimum AnalogInput Read value

Posted by Bainesbunch on 15 March 2012 - 01:32 PM in Netduino Plus 2 (and Netduino Plus 1)

So...
...proceed as follows:

  • comment the SetRange call, so that the value given by the port won't be elaborated at all;
  • point the multimeter on the analog input and give me a stable value;
  • at the same time, tell me what's the Read method returns.

I'd also try to swap the photosensor with any trimpot, if you have. Please, tell me if you own any, and -if so- what value is marked on.
Cheers


You might also want to tie the unused analogue inputs to ground. I have had erratic readings when these are alowed to "float"

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.



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



#25306 Is my netduino faulty? Simple analog test = 1023 constant :(

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

Hello, The file was not attached :( Can you try tying all the analogue ports you are NOT using to ground and re-try the mesuments on the port again. You should be seeing 0 on all the ports tied to ground and you should only see a value on the port you have the sensor attached to. Cheers Pete.



#25299 Is my netduino faulty? Simple analog test = 1023 constant :(

Posted by Bainesbunch on 09 March 2012 - 08:12 PM in Netduino 2 (and Netduino 1)

Hi, This is showing a pot not your IR LED. What is the resistor bridge for ? If you Zip up the FZ file it should load to the forun OK :) 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.