Idris WROTE:Hi zargoun,
When you power up the G15, LED on G15 will blink once. This indicator show G15 is still in good condition. So, make sure this happen.
I assume you are using GD02 driver, so you need to control the CTRL pin to make the GD02 in transmit or receive mode. So my idea, try to set the GD02 as transmit only and control the G15 LED (like do blinking 1 sec). Plus in your program, just do transmit, ignore the receive part. This idea just want to troubleshoot on the communication part between IOIO and G15. Once this working, you can slowly do on receive part.
Anyway, could you post your current hardware and wiring pictures?
yes i can see the LED blink once, and im sure that motor works very well because i can control it using windows GUI
do i need to make a pull-up resistor for the DTR pin ?
the photos of the hardware are below
this is the code for the LED blinking
- CODE: SELECT_ALL_CODE
void ioioSetup(IOIO ioio) throws ConnectionLostException {
uart = ioio.openUart(4, 6, 19200, Uart.Parity.NONE, Uart.StopBits.ONE);
led = ioio.openDigitalOutput(IOIO.LED_PIN, true);
DTR = ioio.openDigitalOutput(3, true);
in = uart.getInputStream();
out = uart.getOutputStream();
}
void ioioLoop(IOIO ioio) throws ConnectionLostException {
led.write(false);
try {
DTR.write(false);
try {
out.write(0xFF);
out.write(0xFF);
out.write(0x01);
out.write(0x05);
out.write(0x03);
out.write(0x19);
out.write(0x01);
out.write(0xDD);
delay(2000);
out.write(0xFF);
out.write(0xFF);
out.write(0x01);
out.write(0x05);
out.write(0x03);
out.write(0x19);
out.write(0x00);
out.write(0xDF);
delay(2000);
}
catch (IOException e){
}
Thread.sleep(20);
}
catch (InterruptedException e) {
}
}
here is the data from hyperterminal
- CODE: SELECT_ALL_CODE
try {
out.write(0xFF);
out.write(0xFF);
out.write(0x01);
out.write(0x05);
out.write(0x03);
out.write(0x19);
out.write(0x01);
out.write(0xDD);
out.write('A');
delay(2000);
out.write(0xFF);
out.write(0xFF);
out.write(0x01);
out.write(0x05);
out.write(0x03);
out.write(0x19);
out.write(0x00);
out.write(0xDF);
out.write('B');
delay(2000);
}
catch (IOException e){
}