RF24Audio
v1.0
Arduino Audio Streaming Realtime with NRF24L01 radios
Loading...
Searching...
No Matches
userConfig.h
Go to the documentation of this file.
1
7
/************ MANDATORY User Variables ************/
15
#define SAMPLE_RATE 24000
16
25
#define RF_SPEED RF24_1MBPS
26
28
#define ANALOG_PIN A0
29
30
/************ OverRides ************/
31
32
//10-bit audio requires more bandwidth. A 20khz sample rate will need 25KB/S transfer rate, which is about max for 250kbps data rate.
33
//With a 32khz sample rate, the volume can be set to -1 to shift the sample down to 9-bit, which is the highest the timers can handle at 32khz
34
//#define tenBit // Enable 10-bit samples Note: 44khz+ sample rate requires 8-bits per sample
35
36
//#define speakerPin 9 // If using a non-standard board, override the timer1 pins
37
//#define speakerPin 10
38
45
#define ENABLE_LED
46
47
/************ Optional/Advanced User Variables ************/
48
49
51
#define TX_PIN A1
52
54
#define VOL_UP_PIN A2
55
57
#define VOL_DN_PIN A3
58
60
#define REMOTE_TX_PIN A4
61
63
#define REMOTE_RX_PIN 4
64
66
#define buffSize 32
67
68
//#define speakerTX // Whether to output to speaker while transmitting
69
//#define oversampling // Oversampling is recommended for low sample rates only. This only affects playback.
70
//#define RX_ONLY
71
//#define TX_ONLY // Not functional yet
72
73
74
/************ Automated pin selections, override by defining above ************/
75
76
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) || (__AVR_ATmega32U4__) || (__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__) || (__AVR_ATmega128__) ||defined(__AVR_ATmega1281__)||defined(__AVR_ATmega2561__)
77
#define rampMega
78
79
// Speaker pin selection for mega etc
80
#if !defined (speakerPin)
81
#define speakerPin 11
// The pins to output audio on. (11,12 on Mega 2560)
82
#endif
83
84
#if !defined (speakerPin2)
85
#define speakerPin2 12
86
#endif
87
88
#if defined (ENABLE_LED)
89
#define ledPin 13
90
#endif
91
92
#else
93
94
//Speaker selection for Uno,Nano, etc
95
#if !defined (speakerPin)
97
#define speakerPin 9
98
#endif
99
100
#if !defined (speakerPin2)
102
#define speakerPin2 10
103
#endif
104
105
#if defined (ENABLE_LED)
106
#define ledPin 6
107
#endif
108
#endif
109
110
111
//********Radio Defines ****************************
113
const
uint64_t
pipes
[14] =
114
{
115
0xABCDABCD71LL,
116
0x544d52687CLL,
117
0x544d526832LL,
118
0x544d52683CLL,
119
0x544d526846LL,
120
0x544d526850LL,
121
0x544d52685ALL,
122
0x544d526820LL,
123
0x544d52686ELL,
124
0x544d52684BLL,
125
0x544d526841LL,
126
0x544d526855LL,
127
0x544d52685FLL,
128
0x544d526869LL
129
};
pipes
const uint64_t pipes[14]
Radio pipe addresses for the 2 nodes to communicate.
Definition:
userConfig.h:113
Generated by
1.9.6