summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile6
-rw-r--r--onkyo_ri.ino (renamed from onkyo_ri.pde)12
2 files changed, 10 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 9d6ff3c..7d470e4 100644
--- a/Makefile
+++ b/Makefile
@@ -6,11 +6,7 @@ ARDUINO_PORT = /dev/ttyUSB0
AVRDUDE_ARD_PROGRAMMER = stk500v1
AVRDUDE_MCU= m168
-ARDUINO_DIR = /usr/share/arduino-0017/
-
-# arduino < 0018
-BOARDS_TXT = $(ARDUINO_DIR)/hardware/boards.txt
-ARDUINO_CORE_PATH = $(ARDUINO_DIR)/hardware/cores/arduino
+ARDUINO_DIR = /usr/share/arduino-1.0/
# linux
AVR_TOOLS_PATH = /usr/bin/
diff --git a/onkyo_ri.pde b/onkyo_ri.ino
index 4ce88c2..b2152e5 100644
--- a/onkyo_ri.pde
+++ b/onkyo_ri.ino
@@ -12,6 +12,7 @@ MD = 71808
*/
#include "signals.h"
+//#include <SoftwareSerial.h>
// Digital pin #2 is the same as Pin D2 see
// http://arduino.cc/en/Hacking/PinMapping168 for the 'raw' pin mapping
@@ -22,7 +23,7 @@ MD = 71808
#define MAXPULSE 500
#define RESOLUTION 20
-#define FUZZINESS 20
+#define FUZZINESS 50
uint8_t raw[2];
@@ -30,6 +31,8 @@ uint64_t listenForIR(ir_t *proto);
int getPulseLength();
int getPulseLengthInRange(int expected);
+//SoftwareSerial wdlive_serial(11, 12);
+
void sendToggle(int pin, int delayTime[]) {
digitalWrite(pin, LOW);
delayMicroseconds(delayTime[0] * 10);
@@ -70,8 +73,11 @@ void send(ir_t *proto, uint64_t value, int pin, bool inverted) {
void setup(void) {
Serial.begin(9600);
Serial.println("Ready to decode IR!");
- pinMode(8, OUTPUT);
+// wdlive_serial.begin(115200);
+// wdlive_serial.println("irinject down");
+
+ pinMode(8, OUTPUT);
digitalWrite(8, HIGH);
}
@@ -88,7 +94,7 @@ void findKey(ir_map_t *ir_map, uint8_t count, uint64_t code) {
void loop(void) {
uint64_t code = listenForIR(&onkyo);
- Serial.println(code, HEX);
+ Serial.println((long unsigned int)code, HEX);
findKey(ir_map, ARRAY_LEN(ir_map), code);
}