Loading ...
Sorry, an error occurred while loading the content.

Re: Using AIRcable w/IntelliBrain

Expand Messages
  • RidgeSoft
    Hi Shraddha, I tried your program. It does work for me, though I it may not be doing what you expect (ie. it probably has a bug). The while loop reading from
    Message 1 of 6 , Jun 18, 2007
    • 0 Attachment
      Hi Shraddha,

      I tried your program. It does work for me, though I it may not be
      doing what you expect (ie. it probably has a bug).

      The while loop reading from the serial port is reading 6 bytes on
      each iteration, therefore, you must type 6 characters before it will
      display anything, then it will display all 6 characters. It will do
      the same thing on the each subsequent iteration.

      RidgeSoft Support

      --- In intellibrain@yahoogroups.com, shraddha pathak <sazzda@...>
      wrote:
      >
      > Thanks for your quick response.
      > But I already tried that, it didn't work. I was able to send a
      character from the robot to the hyperterminal and display that in
      hyperterminal using outputbuffer but wasn't able to send a character
      from the hyperterminal to robot and display in LCD.
      >
      > shraddha
      >
      > RidgeSoft <rs1@...> wrote:
      > There's an example that you should take a look at in
      C:\Program
      > Files\RoboJDE\Examples\IntelliBrain\SerialPorts\Echo. This program
      > echos back each character received on the serial port. Using
      > Hyperterminal, when you type, you should see what you type. You may
      > want to try it first with a real cable. Once you have that working,
      > try it with the AIRcable.
      >
      > RidgeSoft Support
      >
      > --- In intellibrain@yahoogroups.com, shraddha pathak <sazzda@>
      > wrote:
      > >
      > > Hi there,
      > > Sorry for that. The program we actually used is as follows:
      > >
      > >
      > > public class IntelliBrainComEcho {
      > >
      > > public static void main(String args[]) {
      > > try {
      > > int i=0;
      > > int data=55;
      > > byte[] data2 = new byte[29];
      > > byte[] data1=new byte[6];
      > >
      > > SerialPort comPort = IntelliBrain.getCom1();
      > > Display display=IntelliBrain.getLcdDisplay();
      > >
      > > comPort.setSerialPortParams
      > (115200, SerialPort.DATABITS_8,
      > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE);
      > >
      > > InputStream inputStream =
      > comPort.getInputStream();
      > > OutputStream outputStream =
      > comPort.getOutputStream();
      > >
      > > display.print(0,Integer.toString(data));
      > > display.print(1,"ready to read data");
      > > Thread.sleep(3000);
      > >
      > > while ((i = inputStream.read(data1))!=-1)
      > > {
      > >
      > > display.print(0,data1);
      > > display.print(1,"data read");
      > > Thread.sleep(200);
      > > }
      > > }
      > > catch (Exception e) {
      > > e.printStackTrace();
      > > }
      > > }
      > > }
      > >
      > >
      > > In this code, when we tried to display the value of the
      > variable "data" and we were able to display is correctly i.e. 55.
      But
      > when we tried to display the value of the variable "data1" which we
      > read from the comport1 we were not able to do so.
      > >
      > > Thankyou
      > > Shraddha
      > >
      > > RidgeSoft <rs1@> wrote:
      > > This is very little information to debug from. Can you
      > post more code
      > > to provide more context? What is the specific symptom? "cannot
      take
      > > input" is not much to go on.
      > >
      > > RidgeSoft Support
      > >
      > > --- In intellibrain@yahoogroups.com, "sazzda" <sazzda@> wrote:
      > > >
      > > > I have been trying to take the input from the aircable and
      > display it
      > > > in the LCD of the Intellibrain but I haven't been able to do
      so.
      > > > Intellibrain can output the content to the AirCable but cannot
      > take
      > > > input from the AirCable, same is the problem when I use
      > > Hyperterminal.
      > > > I don't know what is the problem.Can anyone help me??
      > > >
      > > > The code I have used is simple.
      > > >
      > > > inputbuffer.read(buffer1);
      > > >
      > > > but it isn't working......
      > > >
      > >
      > >
      > >
      > >
      > >
      > > Send instant messages to your online friends
      > http://uk.messenger.yahoo.com
      > >
      >
      >
      >
      >
      >
      > Send instant messages to your online friends
      http://uk.messenger.yahoo.com
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.