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

484Re: how to move robot with TV remote?

Expand Messages
  • Deni Džafo
    Dec 10, 2010

      Last few days I was handeling robot to move with my TVremote, but the problem is I can not make robot to read infrared. I wrote the program for Mvp1 remote and I can download it on robot, but when I press buttons it reads nothing., I know how to make robot to move, but I can't read infrared and I dont have necassery code. I dont know what is wrong.
      help pleas:)

      the program i wrote is:

      import com.ridgesoft.intellibrain.IntelliBrain;
      import com.ridgesoft.intellibrain.IntelliBrainIrReceiver;
      import com.ridgesoft.robotics.IrRemote;
      import com.ridgesoft.robotics.sensors.Mvp1IrRemote;

      public class Main {
      public static void main(String args[]) {
      try {
      IrRemote irRemote = new Mvp1IrRemote(IntelliBrain.getIrReceiver());

      System.out.println("Press remote keys");

      int previousCharacter = -1;
      while (true) {
      int character = irRemote.read();
      if ((character != -1) && (character != previousCharacter)) {
      System.out.println("rx: " + character + " (0x"
      + Integer.toHexString(character) + ')');
      previousCharacter = character;
      catch (Throwable t) {
    • Show all 4 messages in this topic