Hey Guys,
I have a Arduino Uno connected to a pressure pad and basicaly been trying to do this :
-
- Have an arduino sketch which, when the button is pressed, sends a character on the serial.
-
- A serial-to-keystrokes program, which takes the character from the serial connection and converts it to a real keystroke
-
- A program on mac that translates the keystroke to whatever we want to do.
I found this help on a blog here : Arkadian.eu | Tag | AAC keys
and further help here : http://www.instructables.com/id/A-Makers-Wedding-Photo-booth/step2/Software-and-Trigger-Button/
I have been testing out the Arduino sketch
const int buttonPin = 10; // the number of the pushbutton pin
int buttonState = 0; // variable for reading the pushbutton status
void setup() {
pinMode(buttonPin, INPUT);
Serial.begin(9600); // open the serial port at 9600 bps:
}
void loop(){
buttonState = digitalRead(buttonPin);
if (buttonState == HIGH) {
Serial.println();
}
else {
// nothing
}
}
The code works in the serial monitor but i cant get it working in any other application or to trigger the photobooth app when it is on.
I feel what might be wrong is that the serial port that the arduino is on is dev/tty.usbmodemeffy141 but the only options in aac is bluetooth-pda-sync and SerialPort wich do show up under the arduino tools serial port section but i cant upload my sketch to the arduino with them selected.
Is ths typical? or am i missing something! How can i get them on the same port?
asking around i was previously suggested to do this :
http://code.google.com/p/vusb-for-arduino/
http://www.practicalarduino.com/projects/virtual-usb-keyboard
Which seems overkill for a button press
Any enlightenment is gratefully received
thankyou
P