I was using a capacitor, but it was bulky and annoying to solder. So I figured it out anyway! Code below!
int zerov = 35; //+ 13100
int onev = 100;
int twov = 200;
int threev = 300;
int fourv = 400;
int fivev = 500;
int melody[] = {
zerov, onev, twov, threev, fourv, fivev
};
void setup() {
}
void loop() {
for (int thisNote = 0; thisNote < 6; thisNote++) {
tone(7, melody[thisNote]);
delay(5000);
noTone(8);
}
}
and CR basic code for anyone interested
Public BattV
Units BattV = Volts
Public Freq
Units Freq = HZ
DataTable (Power,1,9999) 'Set table size to # of records, or -1 to autoallocate.
DataInterval (0,10,Sec,10)
Average (1,BattV,FP2,False)
Average(1,Freq,IEEE4,False)
EndTable
BeginProg
Scan (1,Sec,0,0)
'VoltSe (BattV,1,mV5000,28,1,5000,250,.001,0)
TimerIO (Freq,11111110,00000002,100,mSec)
If Freq<100 Then
BattV = 0.0154 * Freq - 0.5385
Else
BattV = Freq / 100
EndIf
CallTable Power
NextScan
EndProg