george21
Member
Hello,
Could someone Please help me convert this java code to b4a or how could I use it with inline java.
Thank you
private void Init(int address) throws Exception
{
serialPort.setBreakOff();
Thread.sleep(300);
serialPort.setBreakOn();
Thread.sleep(200);
// Bang the bits (one byte) of our address
for (int i = 0; i < 8; i++)
{
if (((0x01 << i) & address) > 0)
{
serialPort.setBreakOff();
}
else
{
serialPort.setBreakOn();
}
Thread.sleep(200);
}
serialPort.setBreakOff();
}
Could someone Please help me convert this java code to b4a or how could I use it with inline java.
Thank you
private void Init(int address) throws Exception
{
serialPort.setBreakOff();
Thread.sleep(300);
serialPort.setBreakOn();
Thread.sleep(200);
// Bang the bits (one byte) of our address
for (int i = 0; i < 8; i++)
{
if (((0x01 << i) & address) > 0)
{
serialPort.setBreakOff();
}
else
{
serialPort.setBreakOn();
}
Thread.sleep(200);
}
serialPort.setBreakOff();
}