Same as you do in any .NET environment
- Netduino Forums
- → Bainesbunch's Content
Bainesbunch's Content
There have been 54 items by Bainesbunch (Search limited from 06-June 23)
#43374 Multi threading
Posted by Bainesbunch on 14 January 2013 - 09:55 AM in Visual Basic Support
#34291 Firmware update issue / VS issue
Posted by Bainesbunch on 27 August 2012 - 06:05 PM in Netduino Plus 2 (and Netduino Plus 1)
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
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
Pete.
#28088 ReDim Preserve
Posted by Bainesbunch on 25 April 2012 - 04:53 PM in Visual Basic Support
#28035 Industrial Use Case
Posted by Bainesbunch on 24 April 2012 - 05:20 PM in General Discussion
#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)
#25970 PWM Input from the ground up
Posted by Bainesbunch on 25 March 2012 - 06:07 PM in Netduino 2 (and Netduino 1)
#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
#25937 Using Video Studio / Visual Basic to Program NetDuino Plus
Posted by Bainesbunch on 24 March 2012 - 07:18 PM in Visual Basic Support
#25903 Seedstudio Keypad Module
Posted by Bainesbunch on 23 March 2012 - 06:04 PM in Netduino 2 (and Netduino 1)
#25902 State machine
Posted by Bainesbunch on 23 March 2012 - 05:56 PM in Netduino 2 (and Netduino 1)
#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)
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)
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
#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
#25343 XInput Control of Netduino Plus Across a Network
Posted by Bainesbunch on 10 March 2012 - 05:56 PM in General Discussion
#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)
#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)
- Netduino Forums
- → Bainesbunch's Content
- Privacy Policy