Unico
consiglio che posso darvi è che quando scriverete il testo nella
funzione dovrete inserire uno spazio tra la fine dell'ultimo
carattere del testo stesso e il doppio apice, come segue:
In pratica ho fatto creare dall' IDE, in
maniera consueta, la cartella dove potesse risiedere il file con
estensione .ino, dopo di che in quella stessa cartella ho inserito i
due file con estensione .cpp e .h. Poi nel file .cpp e nel file .ino ho
inserito il percorso intero che porta alla cartella suddetta dove si
trovano i tre file:
ma ripeto, non sono un mago in informatica.
void QN8027Radio::setClockSource(uint8_t value)
value::meaning
0 :: Using XTAL between pin1 and pin2
1 :: Inject digital clock between pin1 and ground.
2 :: single end sin wave between pin1 and ground.
3 :: differential sin wave between pin1 and pin2
void QN8027Radio::setCrystalCurrent(float value)
maximum current can be 400 uA
you can input percentage of 400 in parameter
for example setCrystalCurrent(50) means 50% of 400 = 200uA
defualt is 100 micro ampere.
void QN8027Radio::setTxFreqDeviation(uint8_t value)
set overall FM channel Bandwidth. less deviation means it will make sharp narrow peak in FM band.
actual deviation in KHz = Fdev * 0.58
Fdev values can be set from 0 to 255.
default is 129 which means 74.82 KHz
maximum bandwidth can be 148 KHz by setting Fdev value to 255
void QN8027Radio::radioNoAudioAutoOFF(uint8_t value)
ON : RF power Amplifier will be off automatically after 60 second of no audio input at pin 6 and pin 7 (which is default)
OFF : PA will never off. No effect of audio input silence.
void QN8027Radio::setTxPower(uint8_t value)
sets power of internal RF Power Amplifier.
you can set value from 20 to 75.
actual power = 0.62 * setX + 71 dBu
maximum power can be 117.5 dBu
minimum power can be 83.4 dBu
default value of value is 127 which makes no sense(not between 20 and 75). but we assumes that default is max.
althogh value is 7 bit long, which means you can set values from 0 to 127. but they said not to be valid.
void QN8027Radio::setRDSFreqDeviation(uint8_t value)
set bandwidth of RDS channel.
actual bandwidth in KHz = value * 0.35
value can be set from 0 to 127
defualt is 6 which means 2.1 KHz
maximum bandwidth can be 44.45 KHz by setting value value to 127
void QN8027Radio::MonoAudio(uint8_t value)
stop mixing Left and Right audio in MPX. means receiver will get only mono audio.
default is stereo. value can be ON or OFF
void QN8027Radio::mute(uint8_t value)
mutes audio to transmitter output. transmitter will only transmite carrier frequency without audio.
value variable can be: ON or OFF
default is OFF.
void QN8027Radio::scrambleAudio(uint8_t value)
I really dont know why is this option there. it gave mono audio with narrow CarrierWave bandwidth in my tests.
you can provide ON or OFF in parameter to this function.
void QN8027Radio::setTxPilotFreqDeviation(uint8_t value)
Set main pilot frequency (19KHz) Width(Bandwidth).
value = 7 means 7% of 75 KHz
value = 8 means 8% of 75 KHz
value = 9 means 9% of 75 KHz (it is defualt)
value = 10 means 10%of 75 KHz
this will automatically affect second and third harmonics.
void QN8027Radio::setAudioInpImp(uint8_t value)
Audio Input Impedence, lower value boosts volume, 5,10,20,40 KOhm
void QN8027Radio::setTxInputBufferGain(uint8_t value)
set audio amplification in input buffer. actual gain is also depends on inputImpedence() functions parameter.
actual gain in dB = Gain = [(IBGain+1)*3] - [LRInputImpdKOhm*6]
you can set IBGain value from 0 to 5
d efault is 3
void QN8027Radio::setTxDigitalGain(uint8_t value)
Digital Audio Amplification in decibel.
value::Meaning
0 :: 0 dB (default)
1 :: 1 dB
2 :: 2 dB
void QN8027Radio::reset()
Resets all registers(settings) to default.
void QN8027Radio::reCalibrate()
Recalibrates
internal RF power amplifier for load antenna attached. this process is
automatic and you just need to use this function only.
void QN8027Radio::setPreEmphTime50(uint8_t value)
ON = PreEmphasis Time Constant = 50uS
OFF= PreEmphasis Time Constant = 75uS (Which is defualt)
void QN8027Radio::setFrequency(float value)
Set Transmitting Frequency From 76 to 108 MHz with decimal point
Example - setFrequency(88.1); , setFrequency(100);
void QN8027Radio::setCrystalFreq(uint8_t value)
if clock input source is XTAL then you can set which XTAL was used.
value::Meaning
12 :: 12 MHz
24 :: 24 MHz (default)
void QN8027Radio::Switch(uint8_t value)
Turn Transmitter ON or OFF. by defualt it is off and does not start just by giving voltage to this chip.
you must call this function to start transmitter.
void QN8027Radio::RDS(uint8_t value)
set RDS channel ON or OFF
void QN8027Radio::radioNoAudioAutoOFF(uint8_t value)
ON : RF power Amplifier will be off automatically after 60 second of no audio input at pin 6 and pin 7 (which is default)
OFF : PA will never off. No effect of audio input silence.
void QN8027Radio::sendRadioText(String value)
Sends Song Artist Album Name. value must be maximum 64 Byte long
void QN8027Radio::sendStationName(String value)
Sends Station Name such as "MbPCM FM" to a RDS enabled receiver.
Value must be maximum 8 byte long String.
float QN8027Radio::getFrequency() gets FSM status.
multiply this value by 45 and you will get amplitude in mili Volts.
il mio programma con i file .cpp e .h.