MCPcopy Create free account
hub / github.com/SmingHub/Sming / receiveIR

Function receiveIR

samples/IR_lib/app/application.cpp:19–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17IRsend irsend(IR_SEND_PIN);
18
19void receiveIR()
20{
21 decode_results dresults;
22 dresults.decode_type = UNUSED;
23 if(irrecv.decode(&dresults)) {
24 Serial.println(resultToHumanReadableBasic(&dresults)); // Output the results as source code
25 Serial.println(resultToTimingInfo(&dresults));
26 irrecv.resume();
27 }
28 if(dresults.decode_type > UNUSED) {
29 Serial.println("Send IR Code");
30 irsend.send(dresults.decode_type, dresults.value, dresults.bits);
31 }
32 irTimer.startOnce();
33}
34
35} // namespace
36

Callers

nothing calls this directly

Calls 5

printlnMethod · 0.80
resumeMethod · 0.80
startOnceMethod · 0.80
decodeMethod · 0.45
sendMethod · 0.45

Tested by

no test coverage detected