Has anyone run MicroGUI (Rhombus) with a Javelin Stamp?
I am having trouble setting up·some Javelin code which works with this application.· Has anyone done this before?· I have the RS232 AppMod and have created the txUart and rxUart as Uarts for simplex communication using no handshaking.· I can get the green and both yellow lights on the MicroGUI window to function properly, BUT nothing ever changes as far as the number on the numeric display.· Any help would be greatly appreciated.
Mike
Mike
Comments
import stamp.core.*;
public class starter1 {························ // COM Port (9-pin serial)
· final static int SERIAL_TX_PIN = CPU.pin2;······· //···· 2
· final static int SERIAL_RTS_PIN = CPU.pin3;······ //···· 3
· final static int SERIAL_CTS_PIN = CPU.pin4;······ //···· 4
· final static int SERIAL_RX_PIN = CPU.pin1;······· //···· 1
· final static char CmdRdSldrB = 0x84;
· final static char CmdRdKeyPad = 0x90;
· final static char CmdWrGuageB = 0xA4;
· final static char CmdWrNumB = 0xA7;
· final static char CmdWrNumW = 0xA8;
· final static char CmdWrTherm = 0xAB;
· static Uart txUart = new Uart( Uart.dirTransmit, SERIAL_TX_PIN, Uart.dontInvert,Uart.speed9600,Uart.stop1 );
· static Uart rxUart = new Uart( Uart.dirReceive, SERIAL_RX_PIN, Uart.dontInvert,Uart.speed9600,Uart.stop1 );
· static char c;
· static char tmp;
· static char sldr0,sldr1,sldr2;
· static char key;
· static char getChar(){
··· c = (char)rxUart.receiveByte();
··· return c;
· }
public static void main(){
··· do {
····· // ReadPC
····· txUart.sendByte(CmdRdSldrB);
····· sldr0 = getChar();
····· sldr1 = getChar();
····· sldr2 = getChar();
····· txUart.sendByte(CmdRdKeyPad);
····· tmp = getChar();
····· if(tmp <= 11)
······· key = tmp;
····· // WritePC
····· txUart.sendByte(CmdWrNumB);
····· txUart.sendByte(sldr0);
····· txUart.sendByte(key);
····· tmp = getChar();
····· txUart.sendByte(CmdWrTherm);
····· txUart.sendByte(sldr1);
····· tmp = getChar();
····· txUart.sendByte(CmdWrGuageB);
····· txUart.sendByte(sldr2);
····· tmp = getChar();
··· } while(true);
· }················································· // end main
}······
·