Javascript or Linux Reference books?

Hey all,

I’m currently working on two projects… They’re… not quite robotics, but they are computer-related! :smiley:

Project #1: I want to increase my knowledge of Javascript by working on a challenging to semi-challenging project. So I’m making an html page that will be set to my laptop desktop background. The background image of this page will change according to the time of day.

Project #2: I have a computer running Debian (Linux) that I mainly use for playing music. I use Juk and want to output the currently playing song’s information (artist and song title) to an external device (an LCD or LED display). I know I can get the info I need by typing “dcop juk Player playingString” into a terminal window (it shows up on the next line), but I don’t know how to do anything with that information.

So, here’s my question. Can anyone either recommend a good Javascript reference book or give me a shove in the right direction with the Linux project? (Do we even have any Linux users here? :stuck_out_tongue:)

(Or, if you can just answer a relatively simple Javascript question… How can you address the background image? I’ve seen “document.body.background = something.jpg”, but I can’t get that to work.)

Thanks for any help!

I live in Northern Ireland, so you might not be able to get the book wherever you are, but I have a good one that I use quite often:

It’s called “JavaScript, an Introduction” and it’s published by Dorling Kindersley

I’ll upload a pic in mo…

theChipmunk

photos1.blogger.com/blogger/394/2640/1600/DSC00287.jpg

Hope that helps!

I was thinking of doing a project like that a couple of years ago, but I got sidetracked.

I’m quite interested to see how it goes - if you could drop me a PM when you get it finished, that would be nice…

Thanks,

theChipmunk

P.S. If you want to do a Java Applet, I recommend “Java in Easy Steps” - search for it on Amazon…it has a purple and green checked cover

Heh, this -is- my sidetracked project. :smiley:

Sure, no problem. I have the background changing every so often on a test document right now, so when I get home I can implement this new code I have. Hopefully I should have it working soon.

Then, when I’m done with this, I can work on the Linux project. :laughing:

Hello Beth,

regarding linux: feeding your output to an external display totally depends upon the type of your display. Primarly: how is it connected.

Usually, you would redirect (“pipe”) your output stream of the “dcop” command directly to the device, if it is capable of input streaming.

do you have more information (man pages) of the display for me to investigate?

regards

Well, the display I am using now is an ILM-216 (seetron.com/ilm216_1.htm). It connects through the serial port of the computer.

(User’s manual: seetron.com/pdf/ilm216mn.pdf)

I haven’t actually managed to interface with it at all, because, well, I don’t really know how to. I’m not much of a programmer! :laughing:

Thanks in advance for your help!

Hello Beth,

seems pretty straightforward to me: connect your display via serial interface and redirect your output with a pipe to the tty.

this could be done by

dcop juk Player playingString > /dev/ttyX

whereas X is the tty your display is connected to. the “>” sign means “redirect the output from the previous command to the file called /dev/ttyX”

However: to set up the speed and baud rate you have to configure some information in the /etc directory (do a grep tty * there - i almost forgot everything :frowning: ). Alternatively, you could have a look for the command stty .

Here is the linux howto.

Sorry, to be so unspecific, but i dont have access to a linux system right now. But please: don’t hesitate to contact me if you have further questions.

regards