Newbie LED help required

Post Reply
SOEQ67
Posts: 3
Joined: Mon Jul 28, 2014 5:56 pm

Newbie LED help required

Post by SOEQ67 »

HI, been playing around for a while now with building a quad and came across this software, which just works.
Im using an arduino Mega in quad x config, with a GY80 board and a Ublox NEo 6m gps module( rs232).
The documentation is a bit difficult to follow sometimes, but i believe there should be outputs for 3 LEDs, on pins 30/31/32 being status, stable and lipo alarm.
Status Is green, Stable is GPs and usually Blue, Lipo alarm is red, i have leds wired up with series resistors connected but im not getting anything showing up. everything else seems to be working, using the mulitwii config program and the mulitwii gui.
Is there anything i need to select in the config to enable these leds?
i do have the #define GPS_LED_INDICATOR set
its probably something really silly , but as a total noob to this software im probably over looking it.
Any help will be gratefully received

User avatar
Hamburger
Posts: 2578
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: Newbie LED help required

Post by Hamburger »

Are you sure you picked mega pins with arduino naming 30.31.32 ?

SOEQ67
Posts: 3
Joined: Mon Jul 28, 2014 5:56 pm

Re: Newbie LED help required

Post by SOEQ67 »

im working from the seeeduino mega drawing, that shows 30,31,32, so i presume thats the correct pins im on 30, 31 32 on the end of the mega
in the def.h i can see

Code: Select all

#if defined(MEGA)
  #define LEDPIN_PINMODE             pinMode (13, OUTPUT);pinMode (30, OUTPUT);
  #define LEDPIN_TOGGLE              PINB  |= (1<<7); PINC  |= (1<<7);
  #define LEDPIN_ON                  PORTB |= (1<<7); PORTC |= (1<<7);
  #define LEDPIN_OFF                 PORTB &= ~(1<<7);PORTC &= ~(1<<7);
  #define BUZZERPIN_PINMODE          pinMode (32, OUTPUT);
  #if defined PILOTLAMP
    #define    PL_PIN_ON    PORTC |= 1<<5;
    #define    PL_PIN_OFF   PORTC &= ~(1<<5);
  #else
    #define BUZZERPIN_ON               PORTC |= 1<<5;
    #define BUZZERPIN_OFF              PORTC &= ~(1<<5);
  #endif

is there somewhere that i need to enable mega or does it detect which board it is in the software?

SOEQ67
Posts: 3
Joined: Mon Jul 28, 2014 5:56 pm

Re: Newbie LED help required

Post by SOEQ67 »

ok sorted, must have caught gps during lock so nor seeing anything. all working now

Post Reply