changeset 171:6c796f2bc2be

The buzzer is now on pin 13
author Radomir Dopieralski <sheep-devel@sheep.art.pl>
date Wed, 22 Jul 2015 15:01:59 +0200
parents e83377ffa691
children 88f1de76fa8c
files start/beep.ino start/ir.ino
diffstat 2 files changed, 2 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/start/beep.ino	Tue Jul 07 20:31:04 2015 +0200
+++ b/start/beep.ino	Wed Jul 22 15:01:59 2015 +0200
@@ -1,6 +1,6 @@
-#define BEEP_PIN 3
+#define BEEP_PIN 13
 
-bool beep_mute = true;
+bool beep_mute = false;
 
 
 void beep_setup() {
--- a/start/ir.ino	Tue Jul 07 20:31:04 2015 +0200
+++ b/start/ir.ino	Wed Jul 22 15:01:59 2015 +0200
@@ -6,7 +6,6 @@
 #include "IRLremote.h"
 
 
-#define LED_PIN 13
 #define IR_INTERRUPT 0 // Sensor on PIN 2
 #define IR_PROTOCOL IR_NEC
 #define IR_ADDRESS 0xFF00
@@ -36,21 +35,13 @@
 
 void ir_setup() {
     IRLbegin<IR_ALL>(IR_INTERRUPT);
-    pinMode(LED_PIN, OUTPUT);
-    digitalWrite(LED_PIN, LOW);
-    Serial.begin(115200);
 }
 
 void ir_loop() {
     static uint32_t last=0;
     uint32_t IRcommand = 0;
-    bool led = true;
 
     if (!IRLavailable()) {
-        if (led) {
-            digitalWrite(LED_PIN, LOW);
-            led = false;
-        }
         return;
     }
 
@@ -65,7 +56,6 @@
     last = IRcommand;
 
     beep(1319, 50);
-    digitalWrite(LED_PIN, HIGH);
 
     switch (IRcommand) {
         case KEY_UP:    // Up arrow.
@@ -109,7 +99,6 @@
             break;
         case KEY_POWER:    // Power.
         case KEY_POWER2:    // Power.
-            digitalWrite(LED_PIN, LOW);
             robot_mode = 0;
             break;
         case KEY_SEARCH:    // Search.
@@ -132,8 +121,6 @@
             creep_dy = 0.0;
             creep_rotation = 0.0;
             break;
-        default:
-            Serial.println(IRcommand);
     }
     IRLreset();
 }