title: Arduino and Processing - RX is blinking on board, but LED is not lighting up
body: <p>I am trying to run a Processing sketch with my Arduino. I got it a few days ago, so I'm pretty much a noob. I made two similar sketches - one in Arduino and one in Processing. The Arduino one does work, while the Processing sketch doesn't, even though when running the Processing one, the RX lights up on the board.</p>
  
  <p>I have connected an LED into the D9 on the board, with a 220 ohm resistor, and plugged the other leg into the GND. I then proceeded to run the Arduino sketch, which is a simple one, it lights up and down the LED for a second. This one worked. </p>
  
  <p>I then tried running the Processing sketch, exact same code ( adapted for Processing ) using the library for Arduino, and the board seems to communicate with my sketch, as the RX is blinking each second on the board ( I tried different intervals of time and they match with the intervals at which the RX blinks ), but the LED does not turn on and off, like it did with the Arduino sketch. </p>
  
  <p>I tried getting only a serial connection between the Arduino, and it worked - I connected a joystick module to the Arduino and sent the X and Y through the serial port, and the Processing sketch received the information through the serial port, so they are, indeed, communicating.</p>
  
  <p>The port used is COM3 and is running at 9600 baud.</p>
  
  <p>This is the Arduino sketch :</p>
  
  <pre><code>void setup() {
    pinMode(9, OUTPUT);
  }
  
  void loop() {
    digitalWrite(9, HIGH);
    delay(1000);
    digitalWrite(9, LOW);
    delay(1000);
  }
  </code></pre>
  
  <p>and this is the Processing ( version 3.4 ) sketch :</p>
  
  <pre><code>import processing.serial.*;
  import cc.arduino.*;
  
  Arduino arduino;
  
  void setup() {  
    arduino = new Arduino(this, Arduino.list()[0], 9600);
    arduino.pinMode(9, Arduino.OUTPUT);
  }
  
  void draw() {
    arduino.digitalWrite(9, Arduino.HIGH);
    delay(1000);
    arduino.digitalWrite(9, Arduino.LOW);
    delay(1000);
  }
  </code></pre>