I did have help on another forum but because I'm using the Navi firmware, thought I'd ask here too.
The buzzer I have used has come from the KK2.0 here http://www.hobbyking.com/hobbyking/stor ... _1pc_.html
I have plugged in the +ve into pin A7 and the -ve into one of the ESC -ve pins on the board.
For the buzzer, I changed the following in Config.h;
Code: Select all
#define OVERRIDE_BUZZERPIN_PINMODE pinMode (A7, OUTPUT); // use A2 instead of d8
#define OVERRIDE_BUZZERPIN_ON PORTC |= 1<<7 //PORTB |= 1;
#define OVERRIDE_BUZZERPIN_OFF PORTC &= ~(1<<7); //PORTB &= ~1;
#define BUZZER
#define RCOPTIONSBEEP // uncomment this if you want the buzzer to beep at any rcOptions change on channel Aux1 to Aux4
//#define ARMEDTIMEWARNING 330 // (*) Trigger an alarm after a certain time of being armed [s] to save you lipo (if your TX does not have a countdown)
//#define PILOTLAMP //Uncomment if you are using a X-Arcraft Pilot Lamp
However, the buzzer does not work! I have plugged it back into a KK2 quad that I have and it does work! Any ideas as to what's going on?
With regards to the battery monitor, I have made up a divider and after getting the resistors round the wrong way, I've managed to build it correctly. I plugged in the +ve & -ve into the power distribution board and the middle pin into A0. I then made the following code changes;
Code: Select all
#define OVERRIDE_V_BATPIN A0 // instead of A3 //
#define VBAT // uncomment this line to activate the vbat code
#define VBATSCALE 128 // (*) (**) change this value if readed Battery voltage is different than real voltage
#define VBATNOMINAL 126 // 12,6V full battery nominal voltage - only used for lcd.telemetry
#define VBATLEVEL_WARN1 107 // (*) (**) 10,7V
#define VBATLEVEL_WARN2 99 // (*) (**) 9.9V
#define VBATLEVEL_CRIT 93 // (*) (**) 9.3V - critical condition: if vbat ever goes below this value, permanent alarm is triggered
#define NO_VBAT 16 // Avoid beeping without any battery
However, when I plugged the flight battery in and fired up the GUI, It displayed a voltage of 25.5! I then unplugged the divider pin from A0 and still 25.5!
Then looking at the FC Control screen and all of the voltage figures were zero! So, I gave it a try and entered the parameters into this screen and wrote them to the board. Low and behold, the voltage changed. With my resistor configuration, I calculated a VBATSCALE of 128 but this gave an incorrect battery reading compared to a portable checker. So, I changed the value and found that 131 gave the correct voltage reading. I have since plugged and unplugged the battery and restarted the GUI and the settings that I have entered into the GUI have remaind.
Question, why didn't the board pick up the VBAT settings entered through the Config.h?
So now I have the battery monitor working but no buzzer. I assume that the when a voltage warning level is reached then the buzzer will sound. Also, if I change modes, the the buzzer will sound provided I have activated Bleeper on mode change.
Any and all help will be very much appreciated.
Cheers guys.