Send key strokes via serial.write


i trying send ctrl+k keystroke through serial write computer.  having troubles finding correct hex, ascii, or decimal this.  compiler error when working way.  understand not leonardo or flash dfu arduino.

i have sent space command.  using additional program acc keys capture serial data. 

arduino uno r3
ide arduino 1.0.6
using arduino: 1 week  :d

i appreciate either proper search topic or code.  have spent 2 days looking key command without sending scanner or lcd display.


i don't understand error , warning yet.  sorry if has been asked already. 

thank help.

my code
code: [select]
// function changecolor send keystroke 'ctrl+k' computer
void changecolor () {
  int keycommand[] = {0};
  keycommand[0] = 11;
  serial.write(keycommand, 8);
}


error
code: [select]

  report have more information with
  "show verbose output during compilation"
  enabled in file > preferences.
arduino: 1.0.6 (windows 7), board: "arduino uno"
photobooth2.ino: in function 'void changecolor()':
photobooth2:98: error: no matching function call 'hardwareserial::write(int [1], int)'
c:\program files (x86)\arduino\hardware\arduino\cores\arduino/hardwareserial.h:62: note: candidates are: virtual size_t hardwareserial::write(uint8_t)
c:\program files (x86)\arduino\hardware\arduino\cores\arduino/hardwareserial.h:63: note:                 size_t hardwareserial::write(long unsigned int)
c:\program files (x86)\arduino\hardware\arduino\cores\arduino/hardwareserial.h:64: note:                 size_t hardwareserial::write(long int)
c:\program files (x86)\arduino\hardware\arduino\cores\arduino/hardwareserial.h:65: note:                 size_t hardwareserial::write(unsigned int)
c:\program files (x86)\arduino\hardware\arduino\cores\arduino/hardwareserial.h:66: note:                 size_t hardwareserial::write(int)
c:\program files (x86)\arduino\hardware\arduino\cores\arduino/print.h:54: note:                 size_t print::write(const char*, size_t)
c:\program files (x86)\arduino\hardware\arduino\cores\arduino/print.h:53: note:                 virtual size_t print::write(const uint8_t*, size_t)
c:\program files (x86)\arduino\hardware\arduino\cores\arduino/print.h:49: note:                 size_t print::write(const char*)

i have no experience acc keys...
but maybe facebooth



Arduino Forum > Using Arduino > Programming Questions > Send key strokes via serial.write


arduino

Comments

Popular posts from this blog

invalid use of void expresion in FlexiTimer2 library

error: a function-definition is not allowed here before '{' token

LED Strip Code