I'm having trouble reading input from a rotary phone dialer in Processing.
I can successfully read the values in Arduino which show up on the screen as the number dialled, it is very simple, however when I convert the code to Processing, Processing fails to read the pulse dialed signals, am I missing a library or something? Ive included my noddy programs for your perusal, hope you can help me out?
Thanks
P
ARDUINO CODE (WORKS - this version only shows the changes in value 0-1 not the number dialled))
int in = 2;
void setup() {
Serial.begin(9600);
pinMode(in, INPUT);
}
void loop() {
int reading = digitalRead(in);
Serial.print(digitalRead(in));
}
PROCESING CODE (JUST PRINTS 0's and does not detect change in value as Arduino code does))
import processing.serial.*;
import cc.arduino.*;
Arduino arduino;
int pin = 2;
int reading;
void setup() {
size(100,100);
arduino = new Arduino(this, Arduino.list()[0], 9600);