Page 1 of 1

Posted: Sat Apr 20, 2002 2:59 pm
by modded_mike
I know that there are a few java examples to write to the LCD has anyone implimented this code onto a web interface to possibly display site context on the LCD? or display a current song playing on a webradio, or even a java stock ticker all via web

Posted: Sun Apr 21, 2002 12:38 am
by Henry
Not that I know of... would be interesting though.

Posted: Mon Apr 22, 2002 8:40 pm
by PatO
Go to http://java.sun.com and do a search for "serial port".
javax.comm.SerialPort is the package.
Looks fairly straightforward. Let us know how it goes!
http://www.planet-source-code.com is my favorite for code samples, but it seems fairly sparse in the java section...

<font size=-1>[ This Message was edited by: PatO on 2002-04-22 20:41 ]</font>

Posted: Fri May 10, 2002 8:27 pm
by steven_mu
If you mean to use Javascript or a Java applet, you'll probably have serious trouble with permissions for writing to the serial port. I know the earlier versions wouldn't even let you read/write files on the host machine altough I think this was changed. Anyone trying to use the site would probably have to change their browser security settings. Would be cool if it works tho.

Posted: Wed Jun 26, 2002 3:31 pm
by Thlayli
This would actually be pretty easy in java, the source for a simple implementation of a java interface for the lcd is on MO's site. As for any implementation of, say, your stock ticker, the easiest thing to do would be to get out the good old java.net.* API and do your connection manually, and parse out relavant information. Kinda like emulating a browser from within your program. This would be an entirely client side application so it wouldn't have any issues with rights or anything. Looking at your ideas, a modification of this example should work for them. (Just for reference this type of program is usually called an 'agent') A great book to try for learning about this type of programming would be "Programming Bots, Spiders, and Intelligent Agents in Visual C++", wrong language, but the ideas in it transfer quite easily to java. Your post did mention a web interface, I'm not sure if you meant like my suggestion, program to web, or if you meant controlling the lcd from the web. If it was the latter, I gotta agree with steven_mu's post, writing to a serial port from an applet is right out. It's not even possible to enable it as far as I remember. But I have a bad memory. And I'm hungry.