#include <LedControl.h>
#include <IRremote.h>
//IR receiver pins
const int RECV_PIN=17; //signal pin on pin 17
// Dot Matrix pins
int DIN=14;
int CS=0;
int CLK=15;
LedControl lc = LedControl(14, 0,15,0);
void setup() {
Serial.begin(9600);
IrReceiver.begin(RECV_PIN); //starts reciever pin
//dot matrix setup
lc.shutdown(0,false);
lc.setIntensity(0,0);
lc.clearDisplay(0);
}
void loop() {
//IR reciever -- reading inputs
if (IrReceiver.decode()){ //0 if no data ready, 1 if data ready
Serial.print("Code: ");
Serial.println(IrReceiver.decodedIRData.decodedRawData);
//returns raw decoded value, 32 bits
IrReceiver.resume(); //ready to recieve next value
}
//Dot Matrix
lc.setLed(0, 4, 4, true);
}