Hi
What is the max value for "SetDutyCycle(x)"
// Nizze
its 100... i think if you put in anything higher it just sets it to 100 because it wont throw an exception.
  | ||||||||||||||
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.
Omar (OZ)'s ContentThere have been 37 items by Omar (OZ) (Search limited from 21-April 23) #16738 VB Example - Analog Inputs and PWMPosted by Omar (OZ) on 15 August 2011 - 02:19 PM in Visual Basic Support
its 100... i think if you put in anything higher it just sets it to 100 because it wont throw an exception. #16736 Netduino and a touch screen as input interfacePosted by Omar (OZ) on 15 August 2011 - 12:07 PM in Netduino 2 (and Netduino 1)
You can use that screen with a regular netduino. You can use it by connecting it to one of the two serial ports on the netduino. If you post an image of what you'd like the graphical interface (whats on the screen) to look like, I'd be glad to help you with programming the screen. Its best to program the screen using their language, and then just send a number to the netduino which corresponds with the button pressed or whatnot. So here is a bit of explanation of how it will work. [screen side] 1 Draw screen graphics 2 Wait for a touch on the screen 3 Identify which button was pressed based on location of touch 4 Send data to the netduino like the number 1 for button 1 / relay 1. [netduino side] 5 Netduino will read the number 6 Do whatever is necessary like shiftclass.TurnOn(number); #16678 Netduino and a touch screen as input interfacePosted by Omar (OZ) on 13 August 2011 - 02:31 AM in Netduino 2 (and Netduino 1)
I don't know of any touch screen shields out there right now. the screen I linked is not too hard to use, if you're looking or an extremely easy solution I don't think you'll find it at this point. You can try this website http://shieldlist.org/ to find a shield that might work with the netduino. I havent tested any touch screen shields myself though #16590 Netduino and a touch screen as input interfacePosted by Omar (OZ) on 10 August 2011 - 10:18 PM in Netduino 2 (and Netduino 1)
The company 4D Systems has a few serial touch screens. http://www.4dsystems...au/products.php . I've used this one: http://www.4dsystems...prod.php?id=114 and I'm happy with it. It can be used with serial commands or programmed with 4D's 4dgl language. You can read about it, and see if it works for you. If you need help with it, I'd be glad to help. #16325 Netduino USB HID Keyboard - Updated codePosted by Omar (OZ) on 04 August 2011 - 01:21 PM in Project Showcase
Sorry about that not everyone is on the same page, my bad. I will update the details above... EDIT: I listed a few steps up there. I hope it helps. and just to make it clear, the netduino wont become a host (read keyboard data) it will become a client (be a keyboard). #16321 Netduino USB HID Keyboard - Updated codePosted by Omar (OZ) on 04 August 2011 - 12:52 PM in Project Showcase
Now you can just press a key (it will be 'held down'). Since keyboards do repeat, the key will be repeated as a regular keyboard does. Things like shift can be 'held down' using the method described above. holding down of keys like the arrow keys might be useful for games.
#16317 Netduino USB HID Keyboard - Updated codePosted by Omar (OZ) on 04 August 2011 - 11:46 AM in Project Showcase
Right now I am working on half of a redo in the key system. This feature will let you choose the key modifiers and let them stick.
This is how it works as of now:
Keyboard.SetModifier(Keyboard.Modifiers.Shift, false);
Keyboard.SendString("test");
Will type "Test"
Keyboard.SetModifier(Keyboard.Modifiers.Shift, true);
Keyboard.SendString("test");
Will type "TEST"
So the bool determines if the original modifier of a all of the character's is ignored (true), or just the first (false)
So if you want to do a 'Find' you would do:
Keyboard.SetModifier(Keyboard.Modifiers.Ctrl, false); // the false means that once the ctrl is pressed with the first key it will be released.
Keyboard.SendString("f"); // or Keyboard.SendChar('f'); upper case wouldnt affect it either.
and you can do interesting things like
Keyboard.SetModifier(Keyboard.Modifiers.Ctrl, false);
Keyboard.SendString("fThis is the string i want to find"); // find dialog will show up and "This is the string i want to find" will be typed.
Thats all kinda confusing, but you'll see soon. Shift works as explained. Now i have to find the ctrl modifier to test that out
#16315 Netduino USB HID Keyboard - Updated codePosted by Omar (OZ) on 04 August 2011 - 09:36 AM in Project Showcase
Yeah I am going to work on that. I just wanted to open it up now for people to play with and report bugs to me I don't think that the SendKey syntax will be implemented though, its a bit complex and would take a lot of parsing. I want to try and find an easier way to do it. #16311 Netduino USB HID Keyboard - Updated codePosted by Omar (OZ) on 04 August 2011 - 09:04 AM in Project Showcase
Here is a quick video of it in action.
This will make the netduino a USB HID, so the netduino will simulate a keyboard in this case. To get your netduino ready for this: 1 Install firmware 4.1.1 http://forums.netdui...re-v411-beta-1/ 2. Transfer to Serial deployment http://forums.netdui...b-and-com1com2/ 3. Create a project and put the class in it, add the test code to your program's main method 4. Hook up a usb to serial like this: http://www.sparkfun.com/products/9873 to your netduino's com1 or 2, which ever you chose while setting serial deployment 5. Change deployment in VS to Serial, select your com port 6. Power your netduino with a 9V battery or whatever, except usb. Deploy. 7. You need the code to run and set up the usb stream first, then connect your usb cable. Class: Keyboard.cs 16.63KB 241 downloads Add a reference to: Microsoft.SPOT.Hardware.Usb Sample use. As in the video. string setupResult = Keyboard.SetUp(); Debug.Print(setupResult); if (setupResult != "Success") return; while (true) { led.Write(true); if (button.Read()) Keyboard.SendString("/*\n" + "* Supported Characters (with this method):\n" + "* abcdefghijklmnopqrstuvwxyz\n" + "* ABCDEFGHIJKLMNOPQRSTUVWXYZ\n" + "* 0123456789\n" + "* enter escape backspace deletethis\b\b\b\b\b\b\b\b\b\b \ttab space\n" + "* - = [ { ] } \\ | , > . < / ? ! @ # $ % ^ & * ( )\n" + "*/"); led.Write(false); Thread.Sleep(2000); } Projects using the netduino as a keyboard coming sometime soon. I want to make a mouse class next. I found this: /* Custom USB HID Communication Device * Copyright © Secret Labs LLC. All Rights Reserved. * * * Licensed under the Apache 2.0 open source license */ in the original code from the USB HID example. I added that I expanded it. I am not big on licenses, but I think I must add it to my code as well. License info here: http://www.apache.or...ICENSE-2.0.html #16273 A long long time ago...Posted by Omar (OZ) on 03 August 2011 - 08:46 PM in General Discussion
Happy Birthday to the Netduino!! Whats the birth date of his two younger brothers? (Mini and Plus)
#16133 NetduinoPLus - Hitting GPIO limitationsPosted by Omar (OZ) on 01 August 2011 - 01:31 AM in General Discussion
you could make a single pin analog keypad... like this http://www.instructa...eypad-Backpack/ to free up some pins from the 3x4 one
#16088 Analog pins not accuratePosted by Omar (OZ) on 31 July 2011 - 01:42 AM in Netduino Plus 2 (and Netduino Plus 1)
private int read_a(AnalogInput readport) { int avg = 10; int[] a_data = new int[avg]; int average = 0; string readresult = ""; for (int i = 0; i < avg; i++) { a_data[i] = readport.Read(); average += a_data[i]/avg; readresult += a_data[i].ToString() + " " ; } Debug.Print(readresult); return average; } I think this is wrong because of these values: 476 473 474 474 477 473 476 475 475 476 bat1_a 470 when it should return 474.9 or 475 if you prefer. So try this: private int read_a(AnalogInput readport) { int nums = 10; int total = 0; double average; string readresult = ""; for (int i = 0; i < nums; i++) { int temp = readport.Read(); total += temp; readresult += temp + " " ; } average = temp / nums; Debug.Print(readresult); return (int)average; }if you want to round up then do: return (int)(average + 0.5); Let me know if those averages are accurate then. Sorry I had to leave you this morning, I had to get to the airport.
| ||||||||||||||
|
||||||||||||||
This webpage is licensed under a Creative Commons Attribution-ShareAlike License. | ||||||||||||||