Is the Javelin Worth it?
JohnnyV
Posts: 5
I bought the BS with board of education kit for a class I took and have loved playing with the basic stamp, and even made my own robot. I have always had in intereset in electronics and I'm considering switching my major to electrical enginnering (I'm currently a physics major). I was thinking about buying a Javelin but they seem awful pricey to me at 89 bucks. Is the Javelin really worth it? How easy is java, I've never used it. Does the manual do a good job explaining java? Is the java used by the Javelin the same as the 'computer version' or is it modified? I feel that the BS is limiting my robotic projects being able to only excute one line at a time. I want to be able to sense and at the same time have the robotic platform moving.
Thanks,
John
ThinkTwisted.com
Post Edited (JohnnyV) : 8/13/2004 5:21:17 PM GMT
Thanks,
John
ThinkTwisted.com
Post Edited (JohnnyV) : 8/13/2004 5:21:17 PM GMT
Comments
The manual assumes you understand Java and spends more time of the specifics of the Javelin. There are over 2000 books in print on programming in Java. It would be a bit silly for us to repeat what's already available.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
Java is a very simple language to pick up, if you have programmed in C++... The big difference between PBasic and Java is object orientation. In java everything is an "object" which means that your code is at a much higher level. If your a hardware person and don't plan to do much CS stuff (and coding for the basic stamp isn't as much fun as building circuits) then Java may not be your cup of tea; however, if you do some coding as well (or writting software was more fun than building the circuits) then it may be worth while to pickup some Java tutorials.
Also a helpful rescourse to remember the Java docs are at http://java.sun.com/reference/api/index.html ...
As far as the Javelin goes, does it support threads? And more importantly, can I upload programing to it from a *nix box?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
<EDIT> I suppose that would require me to invent some type of intrepreter or invent a "eval" sub routine. It's a lot of work, and I think it would only slow down the chip no mater what microprocessor I was using. The context switching algo would be active way to often. </EDIT>
I know the IDE runs in Windows, but there is a tokenizer and such for the BASIC Stamp that can be complied for Linux/BSD and the like (open source, and uses your freely avalible tokenizer library); I was wondering if there was such software already. Is it possible to compile with a standard Java compiler and send the byte code to the stamp?
Post Edited (GameMaster) : 8/14/2004 4:07:27 AM GMT
Another important note for you desktop Java programmers is that the Javelin does not have garbage collection.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
It is also possible to control start/stop/singlestep programs running on the
Javelin from Linux.
It is not possible to get full debug support linking the executing code
on the Javelin to the Java source code. If parallax publishes more tech info on their linker,
and sombody has the time, then this should be doable.
The compiler ( jikes v 0.4.7 ) can be run under wine and can also be compiled
into a native Linux app, but the old code must be slightly patched before it compiles with a
modern c++ compiler ( I use gcc 3.3.3 ). Sun njava compilers or newer versions of jikes
does not seem to work.
The linker , JavelinDirectL , is supplied by Parallax in Linux version on the yahoo file area.
I wrote a downloader and run controi in python using the Parallax c++ code as a base.
I created a raw but working package - javelinLinux.zip
and posted it to the old yahoo file area some months ago
http://groups.yahoo.com/group/javelinstamp/files/
There has been no response so I havnt put any effort into updating this package yet.
Magnus Lundin
You should compile from within the IDE (due to native methods
only known to Javelin).
Then you can download from linux using the file
JavelinLinux.zip located here:
http://groups.yahoo.com/group/javelinstamp/files/
There is also a downloader package here:
http://groups.yahoo.com/group/javelinstamp/files/Software/Downloader/
regards peter
·
However, it IS 'real' Java, minus threads and garbage collection.
The underlying microprocessor is a Ubicom SX28, which supports 'pseudo-peripherals'.· The chip runs so fast, that there are pre-built hunks of assembly code, which run under the interrupt handler, to implement serial ports, timers, etc.· Thus, your program CAN do something else (like decide which way to turn) while still recieving data.
Java is quite a capable language -- so the learning curve from PBasic to Java can be steep.· The Javelin module IS fully BS2 pin-compatible, so all you would have to do is purchase the module, download the IDE, install the module in your BOE board, and go for it.
And you get EXCELLENT bragging rights, if you program you 'Bot in Java.· This is considered the cool language of choice right now, up there with C++.
The SX can run much faster than any stamp, handles interupts......capable of doing two tasks at once. Actually it can do only one thing at a time, but running at a clock speed of 50 MHz, it has the appearance of doing two things at once.
Be warned though, programming the SX is not nearly as easy as a stamp, but if I learned you can too.
$$$$$$.......what is your time worth? An SX with resonator costs less than $8 US dollars. But you WILL spend consideably more time to get your SX program running. There is also a one time investment in the SK-key, $89 last time I checked.
I have not used the JAVA Stamp to comment with certainty on Java Stamp speed vs SX speed, but am fairly confident the JAVA or any Stamp cannot come close to an SX for raw speed. But again, getting the SX program working is definately more of a task.
One of the nice features about the SX, if you also get the SX key from parallax, is the ability to single step through your program, one instruction at a time. For programming hacks such as myself, this is an invaluable tool to debug a program.
My 0.02 cents
Ken
Per you point, the Javelin -- while single-threaded -- can run up to six background processes (virtual peripherals). This allows it to buffer serial IO, maintain a PWM single, run a timer (that can control many others), etc.
For those coming from a Java or C++ background that want to get into embedded control, the Javelin Stamp is a great way to go.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
·
I've always wanted to use my Javelin also, but the few times I've tried, I've given up, mainly because of my lack of Java language.· I have done C programming, but not C++, and this whole thing about OOP is really interesting, but I just cannot seem to truly understand it for some reason.
Can anyone recommend 1 book that will give me a very good foundation to learn Java so I can apply it to Javelin?
I am hoping that Jon Williams will soon come up with Javelin equivalent for StampWorks (Javelin Works) that teaches Java as it relates to embedded programming, starting from turning LED on/off to interfacing with RTC and ADC etc.· Does anyone know if such a book will be coming out anytime soon?
Thank you.
On learning Java ... there is no shortage of books. Just keep in mind that all of them teach PC-oriented Java so you may need to make some adjustments. I have found, though, that many simple examples from desktop Java books run fine on the Javelin.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
Which version of Java book should I purchase to help me use my Javelin?
Thanks.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
1. It is not real java.
You cannot reuse the code you will write for Javelin anywhere else. This sucks.
2. It is buggy. I posted complain that CPU.delay() causes unpredictable errors which are fixed by
something irrational like adding line
int a=1;
after a call to CPU.delay()
Nothing is being done to fix it. (Sounds like Microsoft, huh?)
3. It is very slow, almost on the border of being usable.
A simple function call will set you back almost 0.5ms !
4. It is a memoty hog. Amount of RAM is not enough for anything serious (I'm trying to make a RT-data-logger)
On a positive side, it is probably a good place to learn about Java micros.
For my money, now I would go with something like JStik.
Good luck.