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

225Re: [intellibrain] Re: Using AIRcable w/IntelliBrain

Expand Messages
  • shraddha pathak
    Jun 17, 2007
    • 0 Attachment
      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=IntelliBrai n.getLcdDisplay( );
      >
      > comPort.setSerialPo rtParams
      (115200, SerialPort.DATABITS _8,
      SerialPort.STOPBITS _1, SerialPort.PARITY_ NONE);
      >
      > InputStream inputStream =
      comPort.getInputStr eam();
      > OutputStream outputStream =
      comPort.getOutputSt ream();
      >
      > 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

    • Show all 6 messages in this topic