[Serial Problem] Conditions not working even thought the values match!

edited May 2015 in Arduino

What I am trying to do is read some IR signals.

The code in Arduino is:

 * IRremote: IRrecvDemo - demonstrates receiving IR codes with IRrecv
 * An IR detector/demodulator must be connected to the input RECV_PIN.
 * Version 0.1 July, 2009
 * Copyright 2009 Ken Shirriff
 * http://arcfn.com

 #include <IRremote.h>

 int RECV_PIN = 7;

 IRrecv irrecv(RECV_PIN);

 decode_results results;

 void setup() {


    irrecv.enableIRIn(); // Start the receiver  

void loop() {

  if (irrecv.decode(&results)) {


    irrecv.resume(); // Receive the next value




It reads the IR signals, and suppose, Now I want to get this at Processing and want to open a webpage for that.

 // Example by Tom Igoe

 import processing.serial.*;

 Serial myPort;    // The serial port

 String inString;  // Input string from serial port

 int lf = 10;      // ASCII linefeed

 void setup() {


    // List all the available serial ports:


    // Open the port you are using at the rate you want:hat 

    myPort = new Serial(this, "COM9", 9600);



 void draw() {


   text("received: " + inString, 10,50);


 void serialEvent(Serial p) {

   inString = p.readString();


    String[] params = { "start www.google.com" };




But however even though the signal of that value is caught in the receiver, but the codes do not get executed! :/

I am 100% sure that the signal reaches the receiver as Arduino seems to do what I want it to do when I send signals, for example when I use this code: if(results.value == 544993039) { digitalWrite(8, HIGH); }

Anything connected to pin 8 seems to work just fine.

but in Processing:


        String[] params = { "start www.google.com" };



Nothing seems to happen. Can anybody help me please?


Sign In or Register to comment.