Keywish Hummer-Bot-2.0 Instruction Manual page 80

Table of Contents

Advertisement

#include "IRremote.h"
IRremote
ir(12);
unsigned char
keycode;
char
str[128];
void
setup() {
Serial.begin(9600);
ir.begin();
}
void
loop()
{
if
(keycode
= ir.getCode()) {
String key_name
sprintf(str,
*)key_name.c_str());
Serial.println(str);
}
else
{
//
Serial.println("no key");
}
delay(110);
}
In Figure 3.2.38, we can see two values of Ir Code "0x45" and keyname "1", where "0x45" is the code of a
key of the remote controller, and "1" is the name of the key function of the remote controller.
= ir.getKeyMap(keycode);
"Get ir code: 0x%x key name: %s
Figure .3.2.38 Remote Encoding Query
\n", keycode,
77
(char

Advertisement

Table of Contents
loading

Related Products for Keywish Hummer-Bot-2.0

Table of Contents