Electronics > Projects, Designs, and Technical Stuff
Radio Direction Finding
PA3BNX:
Hello EveryBody,
I programmed in the arduino doppler a 3 times flashing last Pelorus led after squelch closed.
--- Code: ---
void FlashPelorus(int d)
{
//03-11-2015
//ToDo let pelorus 3x flash with last bearing after squelch closed ?
static boolean t;
static byte c;
static int de = cNodegrees;
const byte m = 18 ;
if (bAnalogPelorus==false){return;}
if (d!=cNodegrees){de=d;} //Backup last degrees
if (d==cNodegrees && de!=cNodegrees && c<m)
{
c+=1;
if (c==2||c==5||c==8||c==11||c==14||c==17)//Flash frequency = c * cMainLoopDelay (250 mSec)
{
t=!t;
if (t==true){AnalogPelorus(de);}else{AnalogPelorus(cNodegrees);}
if (c>m){c=m;}
}
}
else if (d!=cNodegrees && c==m)
{
t=false;
c=0;
}
}//Last bracket FlashPelorus
--- End code ---
PA3BNX:
Hello Every Body,
I bought this compass module
So now I am going to write the software
for a Fluxcompass working together with the SuperSimpleArduinoDoppler
GPS doesn't have compass if not moving.
Then this GPS fluxcompass module can be very handy.
hmc5883L module
pins Ucc,GND,SCL,SDA,DRDY
https://brainy-bits.com/tutorials/using-the-hmc5883l/
jackdev23:
Hello,
I see the Arduino sketch and I would suggest to use https://www.arduino.cc/en/Reference/PortManipulation instead of DigitalWRITE.
Moreover, I think you can remove the 4x1N4148 (just set to INPUT by DDRC the pins of caps not used = 0)
For example (q_cyc from 0 to 3 selecting the cap of 4h7 in use on (pins A0...A3) and read on A4.
//sc_filter[5] = {B00000001,B00000010,B00000100,B00001000,B11110000};
temp = DDRC & sc_filter[4]; // turn off the capacitor
__asm__("nop\n\t");
DDRC = temp;
temp = PORTD & 0x07; // next antenna
PORTD = temp | activate_antenna[q_cyc];
temp = DDRC & 0xf0;
temp = temp | sc_filter[q_cyc];
__asm__("nop\n\t");
DDRC = temp ; // turn on the capacitor;
PORTC = PORTC & !sc_filter[q_cyc];
Hope is interesting for you
Ciao
PA3BNX:
Hello Every Body,
Tnx's jackdev23 for the source code.
I hope I can understand it and use it...
Diodes are in now because the pins have no tri state ?
I want 4u7 capicitors to float if not connected.
hmc5883L fluxcompas is fun !!!
jackdev23:
You do not have tri-state but something similar just using pins as input.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version