@@ -45,11 +45,10 @@ int buttonState;
4545int btnReading = 0 ;
4646
4747int ledpin = 13 ;
48- int a = ledpin;
4948
5049// Uncomment for some extra output via serial
5150// This makes the app almost 2 kb bigger
52- // #define DEBUGGING
51+ #define DEBUGGING
5352
5453void setup ()
5554{
@@ -81,7 +80,7 @@ void sendRawPulses(uint16_t *pulses, uint16_t pulseLength) {
8180 Serial.println (" pulses" );
8281#endif
8382 // sendRaw(array containing pulses, size of the array, frequency)
84- irsend.sendRaw (pulses, pulseLength, 38 );
83+ irsend.sendRaw (pulses, pulseLength, 39 );
8584}
8685
8786void getButton () {
@@ -107,13 +106,14 @@ void getButton() {
107106 // Do stuff with that state
108107 switch (buttonState) {
109108 case BUTTON1:
110- // Note that the size of raw pulses are calculated as
111- // sizeof(arrayname) / sizeof(datatype)
112- sendRawPulses (yamahaPwr, sizeof (yamahaPwr) / sizeof (uint16_t ));
109+ // Note that the size of raw pulses (and arrays in general)
110+ // are calculated as sizeof(arrayname) / sizeof(datatype).
111+ sendRawPulses (cblPower, sizeof (cblPower) / sizeof (uint16_t ));
112+ // delay(500);
113113 break ;
114114 case BUTTON2:
115115 // Yamaha Volume Up using NEC code from the IRremote lib
116- // size here is just code size (in bytes) * 8 bits per byte
116+ // size here is just code size (in bytes) * 8 bits per byte.
117117 irsend.sendNEC (yvup, sizeof (yvup) * 8 );
118118 break ;
119119 case BUTTON3:
@@ -126,7 +126,7 @@ void getButton() {
126126 Debouncing is skipped because the interrupt
127127 is disabled as soon as a button press is detected,
128128 and debouncing was causing issues. */
129- delay (250 );
129+ delay (100 );
130130
131131 // Check if the button is being held down
132132 btnReading = analogRead (buttonPin);
0 commit comments