Just as for giving output from java using the serial comm api we have to append \r\n to the string, is there anything specific we have to do for taking inputs ?
Coz when i tried to query a movement, and use an if condition on the returned string, it does not work. it should return “+”
and that’s what i m comparing the returned string to , but the if block is not executed.
Please specify is there anything specific to be done.
Also is there a cheap way of having a wireless link to this card using a serial port!!
I am not able to read analog inputs from the ssc-32 terminal,
nor am i able to compare the results with the string i type in java,
Using the Lynxterm software, it shows some response, but when i m
reading that in java using the javax.comm package, i m not able to
enter the if/else block.
What version of the firmware are you using? If it’s not the 1.06 version then update it. We have tested the query commands to death. They should work perfectly. You may want to post your java code here. I can’t help with it, but I’m sure there are many here who could.
Actually, only a CR is required which is the \r. Also, remove ALL spaces! You’ll save on overhead. EXAMPLE (minus the quotes): “#0P2450#1P2450#2P2450#3P2450#4P2450#5P2450T100\r”
I have only gotten SimpleSerial to work, the other APIs write garbage to the output because they assume you’re a dumb@ss… this may also be a problem: web.media.mit.edu/~benres/simpleserial/
You can only inquire as to if the SSC-32 is actually “in the process of moving ANY servo”. You can not request info about a specific servo. This frustrated me as well, but that is something that just comes with the fact that servos do not really report info to the controller. Remember; servos are used on cars and airplanes, not robots. A radio controller doesn’t have the CPU to even understand the servo IF it did provide this info so why include it and drive up the cost? The functionality being provided is from the SSC-32 itself.
Send via the serial com the following minus the quotes “Q\r”. This will respond with a single byte which represents the ascii char. If the servo is moving too fast then the response seams to be garbage from the SSC-32 and I will have to research further… this is bugging me as well. Sorry! Go slow until I can catch the problem ;-(
Cheap? Can’t help you but there are two Bluetooth solutions:
blueconsole.com/ looks like crap but would be cool since no more battery charging but could put a strain on the SSC-32 power supply. VERIFY IT WORKS BEFORE BUYING IT!
Both are 100m type radios as oppose to the standard 10m. You may also try using J2ME and NetBeans mobility pack and use your cell phone with the above bluetooth controllers (I use #1). I’ve found this works the best! Go figure… Infact, just dump J2SE for now. I think Sun Microsystems thought serial devices were as dead as the floppy…
I use my Palm Treo 700w with IBM’s J9 (which is buggy on this palm hardware) but getting to the serial ports (including bluetooth serial ports) works great. Everyone calls my bot “Cell Head” for this reason
You can ask for the current location of any servo. It will reply with a value in 10uS resolution. If the SSC-32 is moving it, it will report the current location it is at, at that point in time. No matter how fast the servo is moving, it should never reply with garbage.