Few changes to the carrier frequency

This commit is contained in:
Dan
2023-01-29 11:23:52 -05:00
parent 08c1370b45
commit 1771faf03e

View File

@@ -9,13 +9,13 @@ long code = 0b11111111100000000111111011100001;
#define BIT_LENGTH 1
//Generates the carrier requency for the supplied timeframe
void carrier(int BlastTime) {
for(int i=0; i<(BlastTime); i++)
void carrier(unsigned int BlastTime) {
for(int i=0; i<(BlastTime/2); i++)
{
PORTB |= (1 << 0x04);
_delay_ms(BIT_LENGTH);
_delay_ms(9);
PORTB &= ~(1 << 0x04);
_delay_ms(BIT_LENGTH);
_delay_ms(9);
}
return;
}