- Netduino Forums
- → Omar (OZ)'s Content
Omar (OZ)'s Content
There have been 37 items by Omar (OZ) (Search limited from 20-April 23)
#26297 Redacted 00101100
Posted by Omar (OZ) on 03 April 2012 - 04:05 AM in General Discussion
#26204 Redacted 00101100
Posted by Omar (OZ) on 31 March 2012 - 06:32 PM in General Discussion
#25434 What's in the magical, mysterious, box of crappy surplus?
Posted by Omar (OZ) on 13 March 2012 - 01:05 AM in General Discussion
#25435 What's in the magical, mysterious, box of crappy surplus?
Posted by Omar (OZ) on 13 March 2012 - 01:11 AM in General Discussion
#25440 What's in the magical, mysterious, box of crappy surplus?
Posted by Omar (OZ) on 13 March 2012 - 02:55 AM in General Discussion
Oh boy, I may not want to open such a perfectly packaged box!
Look forward to getting it!
It's alright, you have permission to open the box if you stop folding proteins
#25431 What's in the magical, mysterious, box of crappy surplus?
Posted by Omar (OZ) on 13 March 2012 - 12:48 AM in General Discussion
#16874 LCD Help needed, 16x2s are boring
Posted by Omar (OZ) on 20 August 2011 - 01:50 PM in Netduino 2 (and Netduino 1)
Hi guys,
I've played a little with the code and found that we can't use text functions together with graphics - the text goes directly to the LCD than the graphic gets into the buffer first and than whole buffer transferred to display.
So I added functions DrawString and DrawChar that draw string into buffer first, so it can be combined with graphics and shown by calling Lcd.Refresh() function:
public void DrawString(int x, int line, string str, bool mode) { foreach (char c in str) { DrawCharacter(x, line, c,mode); x += 5; // 6 pixels wide if (x + 5 >= 84) { x = 0; // ran out of this line line++; } if (line >= 48 / 8) { return; // ran out of space :( } } } protected void DrawCharacter(int x, int line, char c, bool mode) { for (int i = 0; i < 5; i++) { if (mode) ByteMap[x + (line * 84)+ i] |= NokiaCharacters.ASCII[c - 0x20][i]; else ByteMap[x + (line * 84) + i] |=(byte) ~NokiaCharacters.ASCII[c - 0x20][i]; //x++; } }
Regards,
Eugene
Nice Eugene! You're welcome to re-post the code with that added in.
#17128 Beta driver for .NET MF 4.2 RC3+
Posted by Omar (OZ) on 26 August 2011 - 09:00 PM in Beta Firmware and Drivers
#31560 Oz-Solutions Tutorial: RGB LED
Posted by Omar (OZ) on 04 July 2012 - 06:50 AM in Netduino 2 (and Netduino 1)
Guys,
I could use some help. We've built a netduino project similar to this one. But it doesn't work. I took this sample code and tried it too, doesn't work.
I grabbed a couple of AA batteries and put them in series to generate 3volts, then touched the contacts to my led to see if it's broken, and it works, but only if I reverse the polarity from what's in the diagram. What am i doing wrong?
I was connecting the negative side of the battery to longest lead (common) of the RGB LED. That won't light it up, but it will if I reverse the connection and put the positive to the common.
Have I done something wrong?
Rob
I think you've got a common anode LED. There is nothing you're doing wrong, just put the common lead into the 3V# instead of GND. this will also make it so SetDutyCycle(0) will turn them on, and SetDutyCycle(100) will turn them off. so its reversed.
#16273 A long long time ago...
Posted by Omar (OZ) on 03 August 2011 - 08:46 PM in General Discussion
#16317 Netduino USB HID Keyboard - Updated code
Posted by Omar (OZ) on 04 August 2011 - 11:46 AM in Project Showcase
#16321 Netduino USB HID Keyboard - Updated code
Posted by Omar (OZ) on 04 August 2011 - 12:52 PM in Project Showcase
#16311 Netduino USB HID Keyboard - Updated code
Posted by Omar (OZ) on 04 August 2011 - 09:04 AM in Project Showcase
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
#16325 Netduino USB HID Keyboard - Updated code
Posted by Omar (OZ) on 04 August 2011 - 01:21 PM in Project Showcase
I miss an episode...
Questions:
This project would let the Netduino app to read an USB-keyboard?
Was made with the official firmware? If not, could you provide the firmware for the Plus as well?
Thank you!
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).
#16315 Netduino USB HID Keyboard - Updated code
Posted by Omar (OZ) on 04 August 2011 - 09:36 AM in Project Showcase
Omar, would it also be possible to add something for combined combinations?
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.
#19415 Netduino USB HID Keyboard - Updated code
Posted by Omar (OZ) on 19 October 2011 - 10:37 PM in Project Showcase
Hi,
Thanks for this!
I'm not sure where the official repository for keyboard.cs is - but I added single and double quote support:
case 34: // " cb = 52; mod = 0x02; break; case 39: // ' cb = 52; break;
This is a great reference if there are any keys you need to add for your project: http://www.quadibloc.com/comp/scan.htm
Thanks Again!
Dan
Thanks for the contribution! I'll add it to the code when i get some time.
#26646 Limited Edition Netduino Go mainboards...
Posted by Omar (OZ) on 06 April 2012 - 06:56 PM in Netduino Go
#16738 VB Example - Analog Inputs and PWM
Posted by Omar (OZ) on 15 August 2011 - 02:19 PM in Visual Basic Support
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.
#16590 Netduino and a touch screen as input interface
Posted by Omar (OZ) on 10 August 2011 - 10:18 PM in Netduino 2 (and Netduino 1)
Hello, as title, i need a 2,5" - 3,5" netduino compatible touch screen (with drivers) that act as input interface.
For example, at this moment on my netduino i've connected 16 realys and 2 74hc595 shift registers. All work well, i can act all i want relays (thanks to Stefan 74hc595 drivers) but now i have only output (yes and only one onboard input button), so i need input ... and if is possible this inputs must be virtual buttons (designed on touch screen) that acts my ralays. Exists this touch screen i need? where i can find and buy it? Thank you
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.
#16678 Netduino and a touch screen as input interface
Posted by Omar (OZ) on 13 August 2011 - 02:31 AM in Netduino 2 (and Netduino 1)
i don't understand, do not exists simple netduino compatible touch screen (without serial communications). I know that most of arduino shield is compatible with netduino. So arduino users don't have support of touch screen?
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
#18334 Where buy NetDuino PLUS in Brazil
Posted by Omar (OZ) on 22 September 2011 - 04:42 PM in Netduino Plus 2 (and Netduino Plus 1)
http://www.netduino....uy/?pn=netduino there you can see the official sellers. I'm not sure which one would be best for you (as far as shipping costs go). Hope you find one that suits youFolks, you know tell me where to buy netduino plus in Brazil???
Thanks in advance!
#16736 Netduino and a touch screen as input interface
Posted by Omar (OZ) on 15 August 2011 - 12:07 PM in Netduino 2 (and Netduino 1)
Ok i can buy this model as you suggest: µLCD-32PT(GFX). But really i don't understand how i can use it for my purpose.
If you read all my first post, you'll see what i need. Substantially i need virtual buttons to touch on the screen and activate specific ports of shift registers. Obviously i need other function like create list of string to memorize in a sd card (so the touch screen must show the list with scrollbars) and other..
So i ask you: with simple netduino (not netduino plus) i can connect the µLCD-32PT(GFX) and operate? I think that i need to communicate with serial port because activating shift register.. right? This serial port need another shield? because with normal netduino i don't see a serial port.
If you can help me to understand, i'm grateful
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);
#25910 Netduino 3D Model is Done!!
Posted by Omar (OZ) on 23 March 2012 - 08:19 PM in Netduino 2 (and Netduino 1)
http://sketchup.goog...c35&prevstart=0Hi OZ,
It seems like the link is broken above. Any chance you still have the 3D model kicking around?
So that's where I left it
#16854 analog input
Posted by Omar (OZ) on 19 August 2011 - 11:56 PM in Netduino Plus 2 (and Netduino Plus 1)
hi folks,
i´m a beginner with programming and wan´t to know how i can read or convert input signals??
i conected a poti with the analog input, i will that the led from D0 by low voltage pegel shine and the led from D1 by high voltage pegel or so.
Please cam someone post some ideas for a code for c#.
Thanks a lot
Markus
This might help: http://wiki.netduino...ntiometers.ashx
#16088 Analog pins not accurate
Posted by Omar (OZ) on 31 July 2011 - 01:42 AM in Netduino Plus 2 (and Netduino Plus 1)
When applying steady voltage in the range of 3.3V to the analog pin I get no steady readings in the digital converted value.
The Netduino is a revB board and the AREF is also coubled to the 3.3V internal supply on the board.
The code attached
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.
- Netduino Forums
- → Omar (OZ)'s Content
- Privacy Policy