- Netduino Forums
- → bill.french's Content
bill.french's Content
There have been 260 items by bill.french (Search limited from 01-July 23)
#7963 Interfacing with the uLCD-144 mini lcd screen
Posted by
bill.french
on 20 January 2011 - 03:15 AM
in
Netduino 2 (and Netduino 1)
#8038 Interfacing with the uLCD-144 mini lcd screen
Posted by
bill.french
on 21 January 2011 - 02:18 AM
in
Netduino 2 (and Netduino 1)
#7572 Interfacing with the uLCD-144 mini lcd screen
Posted by
bill.french
on 13 January 2011 - 01:16 PM
in
Netduino 2 (and Netduino 1)
I was going to post it, but it's huge. I wrote this method (see above):That looks cool! But how did you get the netduino icon to appear on the display?
public void drawbitmap(byte[] bmp)
... and passed it in a static readonly byte array, a trick I learned from your fluent interopt stuff. I modified my c# code generator to do (byte) instead of (short), and had it read from a 8 bit bitmap file i generated from one of the 4D tools. I'll post more of a snippet tonight. I also have text working, but there's lots more work to do -- for instance, feeding it a file off the netduino SD card, or interfacing with the screen's SD card.
#7521 Interfacing with the uLCD-144 mini lcd screen
Posted by
bill.french
on 12 January 2011 - 05:46 PM
in
Netduino 2 (and Netduino 1)
![Posted Image](http://www.stopreinventingthewheel.com/srtw/images/netduino/forumhelp/ulcd-144-1.jpg)
It's a 128x128 1.44" color LCD, with a serial interface and a "graphics processor" attached. Sparkfun has them for about $32. One of the comments from the Sparkfun page:
So let me get this straight. This thing is a color LCD with built in controller, backlight circuitry, microSD socket which is compatible with both low capacity and high capacity cards, AND! it basically has a user programmable microcontroller with 10k of program space and 2 GPIO lines in addition to all the on-board control lines for interfacing with the LCD?
The product pages are here: uLCD-144(GFX)
4D has two versions: GFX and SGC. GFX is basically a "standalone" version, meaning you program the built in controller directly, and can built an interface to whatever you want (netduino, pic, etc -- but you have to write the interface)
SGC is more like a "traditional" serial display, where you send it command like "draw a circle here", "display this text", etc.
At first I thought the difference was actually in the hardware, but it's not: it's just firmware. You can reflash the GFX to the SGC and back without any trouble. You can get the SGC firmware here.
I was able to power, test, flash, and program it using the 3.3v Sparkfun FTDI breakout via a breadboard, in spite of the board requiring 5v. I did have to manually toggle the reset line, but it was flawless, otherwise.
Here is the start of the class I'm building to interface with it:
using System; using System.Threading; using Microsoft.SPOT; using Microsoft.SPOT.Hardware; using SecretLabs.NETMF.Hardware; using SecretLabs.NETMF.Hardware.Netduino; using System.IO.Ports; namespace uLCD_144_Test1 { class uLCD_144 { public SerialPort _COM2; public void init() { using (OutputPort d4 = new OutputPort(Pins.GPIO_PIN_D4, true)) { d4.Write(false); d4.Write(true); } Thread.Sleep(2000); this.write(new byte[] { (byte)0x55 }); } public void drawbitmap(byte[] bmp) { //2.2.5 Draw Image-Icon - 49hex //Command cmd, x, y, width, height, colourMode, pixel1, .. pixelN byte[] cmd = new byte[] { (byte)0x49, (byte)0x00, (byte)0x2A, (byte)0x80, (byte)0x28, (byte)0x08 }; this.write(cmd, false); this.write(bmp); } public void write(byte[] ba, bool pause = true) { if (this._COM2.IsOpen) { this._COM2.Write(ba, 0, ba.Length); int sleeptime = (ba.Length / 14) + 1; //(calculate transmission time, at 115200, it can send 14 bytes / ms Debug.Print(sleeptime.ToString()); if (pause) { Thread.Sleep(sleeptime); } } else { } } public uLCD_144() { this._COM2 = new SerialPort(SerialPorts.COM2, 115200); this._COM2.Open(); this.init(); } } }
#6914 Question about SPI
Posted by
bill.french
on 03 January 2011 - 04:16 PM
in
General Discussion
#8121 How can I get instant (or close to) data from http...?
Posted by
bill.french
on 22 January 2011 - 10:08 PM
in
Netduino Plus 2 (and Netduino Plus 1)
1. How to get your javascript to get live data w/o refreshing the whole page?
2. Or a different way to get data from the netduino?
For #2, I don't know what you're going for.
For #1, check out jquery and the load command: (this would go in your refresh function once you have jquery included)
$('#myDiv').load('data.htm');
(to add jquery, use:
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>in your <head>)
... in your program.cs: (i have not tested this, so it's more of an idea than anything)
namespace NetduinoPlusWebServer { public class Program { public static void Main() { Listener webServer = new Listener(RequestReceived); OutputPort led = new OutputPort(Pins.ONBOARD_LED, false); while (true) { // Blink LED to show we're still responsive led.Write(!led.Read()); Thread.Sleep(500); } } private static void RequestReceived(Request request) { if (request.URL == "data.htm") { request.SendResponse("some kind of data"); } } } }
#8173 How can I get instant (or close to) data from http...?
Posted by
bill.french
on 23 January 2011 - 02:53 PM
in
Netduino Plus 2 (and Netduino Plus 1)
Yup, *Note to self: "srtw"* (http://www.stopreinventingthewheel.com)
LOL... i added the quote to that page. I think I'll start a collection.
Have you tried playing with my example above? I think it should work.
jquery is definitly the place to start (and probably end) for ajax, i think VS is has intellisense for it?
#8572 netduino controlled toy car
Posted by
bill.french
on 27 January 2011 - 06:04 PM
in
Netduino 2 (and Netduino 1)
#8570 netduino controlled toy car
Posted by
bill.french
on 27 January 2011 - 05:36 PM
in
Netduino 2 (and Netduino 1)
Servos also require PPM waves, you can use an ESC and a servo interchangeably.
@CW: Yes, I'd like support for PPM, although the wave is quite easy to generate. See: http://www.fezzer.co...1/servo-driver/
..but that example uses PWM? I thought servos were controlled by sending a 1-2ms pulse within something like a 25ms frame? I thought ppm was used for multiplexing on the radio side?
#8321 2 arcane feature requests: dotfuscator and the extension method attribute
Posted by
bill.french
on 24 January 2011 - 07:24 PM
in
General Discussion
I have to know: how did you find this thread??Disclaimer: I work for PreEmptive Solutiuons (the makers of Dotfuscator)
#8178 How can I get instant (or close to) data from http...?
Posted by
bill.french
on 23 January 2011 - 04:00 PM
in
Netduino Plus 2 (and Netduino Plus 1)
#6737 A project suggestion - for Netduino, Plus, or mini.
Posted by
bill.french
on 31 December 2010 - 05:32 AM
in
General Discussion
#6411 A project suggestion - for Netduino, Plus, or mini.
Posted by
bill.french
on 23 December 2010 - 12:25 AM
in
General Discussion
#5584 Proper LED Circuit
Posted by
bill.french
on 01 December 2010 - 02:44 PM
in
Netduino 2 (and Netduino 1)
#5603 Proper LED Circuit
Posted by
bill.french
on 01 December 2010 - 07:30 PM
in
Netduino 2 (and Netduino 1)
From: http://www.kpsec.fre...om/trancirc.htm
![Posted Image](http://www.kpsec.freeuk.com/images/trswipnp.gif)
#5583 Proper LED Circuit
Posted by
bill.french
on 01 December 2010 - 02:41 PM
in
Netduino 2 (and Netduino 1)
#5581 Proper LED Circuit
Posted by
bill.french
on 01 December 2010 - 02:32 PM
in
Netduino 2 (and Netduino 1)
![Posted Image](http://www.stopreinventingthewheel.com/srtw/images/netduino/forumhelp/simple-led-transistor.png)
I would use a 1k transistor to the base, which (using V=IR) works out to a safe 3.3ma (I=V/R, or IB = 3.3v/1000, which is .0033 amps, which is 3.3ma) current from the netduino pin, and a 220k resistor for the LED load, limiting the current to 15ma (IC = 3.3v/220) which should be safe for most leds, but possibly a little dim. (Check your LED specs)
#5508 What's the status of Onewire?
Posted by
bill.french
on 30 November 2010 - 01:20 AM
in
Netduino 2 (and Netduino 1)
#5615 What's the status of Onewire?
Posted by
bill.french
on 02 December 2010 - 01:48 AM
in
Netduino 2 (and Netduino 1)
#5664 What's the status of Onewire?
Posted by
bill.french
on 02 December 2010 - 08:18 PM
in
Netduino 2 (and Netduino 1)
#6164 Netduino Plus - First impressions from a beginner
Posted by
bill.french
on 16 December 2010 - 08:43 PM
in
Netduino Plus 2 (and Netduino Plus 1)
Thanks Bill.
Er, what can I do with it?
Jim
Well, if you've got a smartphone, you can get the microsoft tag app, scan it with your phone, and it will send you to the netduino download section.
#6157 Netduino Plus - First impressions from a beginner
Posted by
bill.french
on 16 December 2010 - 05:34 PM
in
Netduino Plus 2 (and Netduino Plus 1)
Microsoft Tags are actually really cool things.
#6080 What's the status of Onewire?
Posted by
bill.french
on 14 December 2010 - 01:02 PM
in
Netduino 2 (and Netduino 1)
#5963 What's the status of Onewire?
Posted by
bill.french
on 10 December 2010 - 03:17 AM
in
Netduino 2 (and Netduino 1)
#5504 What's the status of Onewire?
Posted by
bill.french
on 29 November 2010 - 11:23 PM
in
Netduino 2 (and Netduino 1)
- Netduino Forums
- → bill.french's Content
- Privacy Policy