/* * WIP *Stan Meyer signal generator 50% duty pulse and 50% duty gate *32hz-10000hz *32hz=16000timedelay approximately *10000hz=50timedelay in microseconds */ //pin definitions int FreqPot = A0; int PulsePot = A1; int kPinOpto = 8; //variables int k_timeDelay; int frequency; int pulse; int pcount; int i; void setup() { // put your setup code here, to run once: pinMode(FreqPot, INPUT); pinMode(PulsePot, INPUT); pinMode(kPinOpto, OUTPUT); } void loop() { // put your main code here, to run repeatedly: frequency = analogRead(FreqPot); pulse = analogRead(PulsePot); k_timeDelay = map(frequency, 0, 1023, 16000, 50) ; pcount = map (pulse, 0, 1023, 2, 12) ; //number of pulses between gates for (i=0;i