trying to use the equivalent code of serout in java stamp
Hello,
I recently got the javelin stamp and am trying to make my robot move, but am unsure how to do it.· I need to send a signal to a pic controller from pin 8.· Using the basic stamp II controller I would use the serout command as so: serout net,baud,[noparse][[/noparse]"!1M11600F0"] 'Forward,speed=3,distance 10'.
net con 8· // coprocessor network pin,·baud con 396· // coprocessor·network baud rate,
Can anyone show me some code that would be the equivalent of this.
Thanks,
Brian
I recently got the javelin stamp and am trying to make my robot move, but am unsure how to do it.· I need to send a signal to a pic controller from pin 8.· Using the basic stamp II controller I would use the serout command as so: serout net,baud,[noparse][[/noparse]"!1M11600F0"] 'Forward,speed=3,distance 10'.
net con 8· // coprocessor network pin,·baud con 396· // coprocessor·network baud rate,
Can anyone show me some code that would be the equivalent of this.
Thanks,
Brian

Comments
import stamp.core.*; public class picnet { static final int netPin = CPU.pin8; static Uart picUart = new Uart(Uart.dirTransmit,netPin,Uart.dontInvert,Uart.speed9600,Uart.stop1); static String picCode = new String("!1M11600F0"); //string to send to pic static void main() { int i; System.out.println("picnet demo"); for (i=0; i<picCode.length(); i++) { picUart.sendByte(picCode.charAt(i)); } while (true) { //keep javelin alive } } }Save the code as picnet.java
Check the baudrate.
regards peter
thanks,
Brian