🌲 An indoor infrared receiver and transmitter with a temperature sensor 🎐
Receive and display raw IR code
#include <IRLibRecvPCI.h>
IRrecvPCI myReceiver(5); // Arduino ZERO pin 5
#define DEBUG 1
void setup() {
#ifdef DEBUG
SerialUSB.begin(9600);
while (!SerialUSB) {}
SerialUSB.println("Ready to receive IR signals");
SerialUSB.println("Point the remote controller to the IR receiver and press!");
#endif
myReceiver.enableIRIn();
}
void loop() {
if (myReceiver.getResults()) {
#ifdef DEBUG
if (recvGlobal.recvLength > 100) {
SerialUSB.print("Received IR signal length: ");
SerialUSB.println(recvGlobal.recvLength, DEC);
}
#endif
myReceiver.enableIRIn();
}
}
BOARD?=arduino:samd:mzero_bl
PORT := $(shell ls /dev/cu.usbmodem*)
.PHONY: default lint all flash clean
default: lint all flash clean
lint:
cpplint --extensions=ino --filter=-legal/copyright,-whitespace/line_length *.ino
all:
arduino-cli compile --fqbn $(BOARD) ./
flash:
arduino-cli upload -p $(PORT) --fqbn $(BOARD)
server:
echo "Open Chrome browser at http://localhost:8000"
python -m SimpleHTTPServer 8000
clean:
rm -r build