Mike, I wasn't seeing voltage change before removing 100K voltage divider on audio input (I read about in similar thread), but after only applying .1 uF capacitor from audio input (3.5mm Android phone jack), I'm getting .25 volt difference when audio is applied (.45 no audio; .70 with audio), so that seems promising. If I remove .1 uF input capacitor, no voltage is returned in Serial Port. Although audio transmission is not working (yet), static is detected at 530 kHz, near jumper wire from pin 9. Now that I know voltage difference, do I continue on analogRead to digitalWrite & if so how to do calculation? analogWrite does not get detected by the radio at at all, on any pin.
int audioPin = A0; // positive lead from 3.5mm phone headphone jack; other lead to GND
const byte ANTENNA = 9;
int val = 0;
void setup() {
Serial.begin(9600);
pinMode(ANTENNA, OUTPUT);
// set up Timer 1
TCCR1A = _BV (COM1A0); // toggle OC1A on Compare Match, Timer Interrupts
TCCR1B = _BV(WGM12) | _BV(CS10); // CTC (clear timer) no prescaler
OCR1A = 14; // 530 kHz
}
void loop() {
int sensorValue = analogRead(audioPin);
float voltage = sensorValue * (5.0 / 1023.0);
Serial.println(voltage);
//val = analogRead(audioPin);
digitalWrite(ANTENNA, voltage);
//analogWrite(ANTENNA, voltage);
}