Serial communication with Scribbler
I want to use the Scribbler robot for a large scale drawing project. I've already seen that I can communicate with the scribbler from the keyboard and thus effect actions using PBASIC. I would like to know if I can use the SERIN and SEROUT commands to install a program that will allow me to stream commands to the Scribbler. I intend to use Processing to write a a program that will stream commands down the serial cable to the Scribbler. I feel that using a higher level language than PBASIC will allow me to have a lot of freedom with what I can do with the Scribbler - I'll be able to jump into the conceptual side with out trying to patch it out in PBASIC. All I'll have to do is write the interface for the Scribbler.
If this is actually possible could someone show me a basic script in PBASIC for serial communication please? I just want to be able to turn an LED on and off at the very least with SERIN. If SERIN works then I can deduce how to work SEROUT for the sensors myself.
Thanks.
If this is actually possible could someone show me a basic script in PBASIC for serial communication please? I just want to be able to turn an LED on and off at the very least with SERIN. If SERIN works then I can deduce how to work SEROUT for the sensors myself.
Thanks.

Comments
Communication like this covered in good detail in various free downloads and several threads on these fora.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Truly Understand the Fundamentals and the Path will be so much easier...
Scribbler:
' Turn on each LED one at a time ' {$STAMP BS2} ' {$PBASIC 2.5} ' I/O Declarations LedRight PIN 8 ' right green LED LedCenter PIN 9 ' center green LedLeft PIN 10 ' left green LED ' Rotate thru LEDs state VAR Byte states CON 3 Init: state = 0 Main: 'DEBUGIN DEC1 state 'pin 16 is the serial programming port '$4054 is a baud rate that I know nothing about 'the state variable is recieved as an integer SERIN 16, $4054, [noparse][[/noparse]state] BRANCH state, [noparse][[/noparse]state_0, state_1, state_2] state_0: HIGH LedLeft LOW LedRight LOW LedCenter GOTO Main state_1: HIGH LedCenter LOW LedLeft LOW LedRight GOTO Main state_2: HIGH LedRight LOW LedLeft LOW LedCenter GOTO MainProcessing:
import processing.serial.*; Serial myPort; int i = 0; void setup(){ println(Serial.list()); myPort = new Serial(this, Serial.list()[noparse][[/noparse]0], 9600); framerate(1); } void draw(){ i = (i + 1) % 3; myPort.write(i); println(i); }