Keywish Hummer-Bot Instruction Manual page 86

Table of Contents

Advertisement

In Fig.3.2.37, we can see the two value "FFFFFFFF" and "FF18E7", "FF18E7" is the code of a key on
the remote control, "FFFFFFFF" means that the code has been received, waiting to receive the next code.
3.2.5.5 Software Design
#include
<IRremote.h>*/ In this section, we use infrared remote control, so we need to
call the corresponding library file, as for what is in the library file, we will not
study, and interested friends can drive research. We have put this library files on the
CD-ROM, we need to copy this folder to the Arduino IDE installation path "libraries"
folder, otherwise the program can not compile. * /
int
E1
= 5;
//PWMA
int
M1
= 9;
//DIRA****************************************left
int
E2
= 6;
//PWMB
int
M2
= 10;
//DIRB****************************************right
int
RECV_PIN
= 12;
long
expedite1
= 0xFF6897;
this variable 0xFF689, FF689 is the infrared remote control button encoding * /
long
expedite2
= 0xFFB04F;
long
advence
= 0xFF18E7;
long
back
= 0xFF4AB5;
long
stop
= 0xFF38C7;
long
left
= 0xFF10EF;
long
right
= 0xFF5AA5;
IRrecv
irrecv(RECV_PIN);
decode_results
results;
void
setup()
{
Serial.begin(9600);
irrecv.enableIRIn();
}
void
loop()
{
if
(irrecv.decode(&results))
if(results.value
advence, execute the following {} command, here is the forward instruction. * /
{
/ * Define a long integer expedite1 variable, and assign
// Initialize the infrared receiver
/ * Read the value received by the infrared * /
== advence)
/ * Judgment on the received value, if this value is
83
{

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Hummer-Bot and is the answer not in the manual?

Questions and answers

Related Products for Keywish Hummer-Bot

Table of Contents

Save PDF