0

How to make an input from computer using processing (like a password form) and trigger pin in arduino? If you let some link to read more that would be very helpful.

7
  • 4
    What part are you having problems with? Sending data to Arduino from Processing or parsing data on the Arduino? Your question is very vague. Read up on arduino.cc/en/reference/serial Commented May 3, 2014 at 20:55
  • 2
    What exactly are you trying to accomplish in your project? Please be more specific. Commented May 3, 2014 at 22:29
  • I want to enter a pass through processing and if its correct i want to trigger a pin. Commented May 4, 2014 at 4:08
  • Should it be the PC or the arduino which checks the password? What happens if someone uses their own pc program instead of yours? Commented May 4, 2014 at 4:38
  • Arduino should have to contain the password Commented May 4, 2014 at 4:42

2 Answers 2

3

On the processing side you need to communicate with the arduino using the Serial class. To set up use something like the following. It is a bit of guess work to find which of the serial ports to use

Serial myPort;  
void setup() {
  // List all the available serial ports:
  println(Serial.list());

  // Open the port you are using at the rate you want:
  myPort = new Serial(this, Serial.list()[6], 9600);
  myPort.buffer(2); // sets the size of the buffer, I send two bytes at a time
}

You can read a write using the Serial.read() and Serial.write() see https://processing.org/reference/libraries/serial/index.html for the processing serial references.

0

You need to have a look at the Serial commands: http://arduino.cc/en/Serial/read

http://arduino.cc/en/Tutorial/ReadASCIIString

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.