Error: 'import' does not name a type

Dear Community members
I want to write the sensor data on my computer using arduino. I have downloaded and installed Processing Library according to the instruction but the error 'import' does not name a type still persists. can anyone help me in this situation?



You are trying to compile Processing code with the Arduino IDE. That will not work.
Look for a tutorial to learn how to use Firmata with your Arduino.


DO NOT CROSS POST as it wastes peoples time and effort.
Please take time to read the forum rules

Your other posts DELETED


Thank you for your reply . The example sketch i wanted to run contains following description


Demonstrates the control of digital pins of an Arduino board running the
StandardFirmata firmware. Clicking the squares toggles the corresponding
digital pin of the Arduino.

To use:

  • Using the Arduino software, upload the StandardFirmata example (located
    in Examples > Firmata > StandardFirmata) to your Arduino board.
  • Run this sketch and look at the list of serial ports printed in the
    message area below. Note the index of the port corresponding to your
    Arduino board (the numbering starts at 0). (Unless your Arduino board
    happens to be at index 0 in the list, the sketch probably won't work.
    Stop it and proceed with the instructions.)
  • Modify the "arduino = new Arduino(...)" line below, changing the number
    in Arduino.list()[0] to the number corresponding to the serial port of
    your Arduino board. Alternatively, you can replace Arduino.list()[0]
    with the name of the serial port, in double quotes, e.g. "COM5" on Windows
    or "/dev/tty.usbmodem621" on Mac.
  • Run this sketch and click the squares to toggle the corresponding pin
    HIGH (5 volts) and LOW (0 volts). (The leftmost square corresponds to pin
    13, as if the Arduino board were held with the logo upright.)

For more information, see:

import processing.serial.*;

import cc.arduino.*;

Arduino arduino;

I assume that by Arduino Software author meant Arduino IDE. is this correct?

Only partly correct.

Once you have FIRMATA installed on the board CLOSE the IDE and open PROCESSING to use thier examples to talk to FIRMATA.

There are lots of quite easy tutorials all over the web for the steps you need to take.