AAC keys resets arduino?


hi!

i'm trying set arduino uno keyboard emulator. works, when aac keys has made keystroke, resets arduino connection. way, after key pressed arduino resets , can't finish program.

in case code important here, code:
code: [select]
const int beugel1 = 2;
const int beugel2 = 3;
const int poort1 = 4;
const int poort2 = 5;
const int verzend = 6;


int beugel1status = 0;
int beugel2status = 0;
int poort1status = 0;
int poort2status = 0;
int verzendstatus = 0;
int ledverzend = 12;
int ledbeugel = 11;
int ledpoort = 10;


void setup() {

pinmode(beugel1, input);
pinmode(beugel2, input);
pinmode(poort1, input);
pinmode(poort2, input);
pinmode(verzend, input);
pinmode(ledverzend, output);
pinmode(ledbeugel, output);
pinmode(ledpoort, output);
serial.begin(9600); // open serial port @ 9600 bps:
}

void loop(){

beugel1status = digitalread(beugel1);
beugel2status = digitalread(beugel2);
poort1status = digitalread(poort1);
poort2status = digitalread(poort2);
verzendstatus = digitalread(verzend);


if (beugel1status == high) {
serial.print("\061");
}
if (beugel2status == high) {
serial.print("\062");
}
if (poort1status == high) {
   digitalwrite(ledpoort, high);
serial.print("\063");
}
if (poort2status == high) {
serial.print("\064");
}
if (verzendstatus == high) {
serial.print("\015");
digitalwrite(ledverzend, high);   // turn led on (high voltage level)
delay(500);               // wait second
digitalwrite(ledverzend, low);    // turn led off making voltage low
delay(500);
digitalwrite(ledverzend, high);   // turn led on (high voltage level)
delay(500);               // wait second
digitalwrite(ledverzend, low);    // turn led off making voltage low
delay(500);
digitalwrite(ledverzend, high);   // turn led on (high voltage level)
delay(500);               // wait second
digitalwrite(ledverzend, low);    // turn led off making voltage low
delay(50);
}
}

it's not cleanest code, hey  :p.

after serial.print arduino resets aac keys, example in last if statement, led won't blink. when disable aac keys skips serial print , led blink. when try other software aac keys, works. no resetting here, program (nolimits 2) doesn't receive keystroke. word receives then.

so actual question is: why aac keys reset connection each time button pressed , how can turn off?

thanks in advance!

hidde

clarification, aac keys program running on computer watches serial connection , translates incoming data mouse , keyboard input? that's gathered their -site-. there ways prevent arduino reseting detailed here. looking do? correct me if i'm wrong believe arduino uno resets on serial connection may have how program, aac keys, handles serial connection.


Arduino Forum > Using Arduino > Programming Questions > AAC keys resets arduino?


arduino

Comments

Popular posts from this blog

Connecting Raspberry Pi 2 to P10(1R)-V706 LED Dot Matrix - Raspberry Pi Forums

TypeError: <unknown> is not a numpy array - Raspberry Pi Forums

datso and removing imagetitle - Joomla! Forum - community, help and support