comparison service/busyboxArduino/main.ino @ 963:2decd45addf4

notes on pins Ignore-this: 1fced0c832715c5fbd16011563e7120a darcs-hash:20150120053811-312f9-cbcd7801cd4a454a3ae4a05c5534cfb0a9cbafb8
author drewp <drewp@bigasterisk.com>
date Mon, 19 Jan 2015 21:38:11 -0800
parents 70fd4c07a326
children 4c62b6d416a7
comparison
equal deleted inserted replaced
962:70fd4c07a326 963:2decd45addf4
1 /*
2 D0 <---------
3 D1 lcd rw
4 D2 <---------
5 D3 ir out -----
6 D4 lcd 4
7 D5 lcd 5
8 D6 lcd 6
9 D7 lcd 7
10 D8 lcd rs
11 D9 lcd en
12 D10 lcd backlight
13 D11 tbd <------------
14 D12 motion in <--------
15 D13 debug led <--------
16
17 */
1 #include <Arduino.h> 18 #include <Arduino.h>
2 #include <LiquidCrystal.h> 19 #include <LiquidCrystal.h>
3 #include "DFR_Key.h" 20 #include "DFR_Key.h"
4 #include "IRremote.h" 21 #include "IRremote.h"
5 22
26 int lastKey = -1; 43 int lastKey = -1;
27 int lastUnsentKeydown = -1; 44 int lastUnsentKeydown = -1;
28 uint16_t steps = 0; 45 uint16_t steps = 0;
29 uint16_t stepDelayPerBrightnessFade = 2048; 46 uint16_t stepDelayPerBrightnessFade = 2048;
30 47
48 // uses pin 3
31 IRsend irsend; 49 IRsend irsend;
32 50
33 void sendnec(byte addr, byte cmd) { 51 void sendnec(byte addr, byte cmd) {
34 uint32_t w = 0x00ff0000; 52 uint32_t w = 0x00ff0000;
35 w |= (cmd << 8) & 0xff00; 53 w |= (cmd << 8) & 0xff00;