ESP32: 2,5 MHz Signal erzeugen mit DigitalWrite(4,LOW) ohne delay
//*FASTEST IMPULSE TEST ON ESP32
//====< VARIABLES >==== int OUT_PIN = 4; long nCycles_Start = 1; long nCycles_Stop = 3600000; //1000ms=1sec 60.000=1min 3600.000=1Std long nCycles_Step = 1; long nCycles_Pulse = 1; long iCycles=0;
unsigned long msStart = 0; unsigned long msHold = 1000; //Milliseconds to Hold Frequece hold=1Sek //====</ VARIABLES >====
//BitMask //0b11111=GPIO 0, 1, 2, 3, 4, //0b10000=GPIO4
//=============< SETUP >============
void setup(){ //--------< setup() >-------- //< GPIO > pinMode(OUT_PIN, OUTPUT); digitalWrite(OUT_PIN, LOW); // PULS_OFF DEFAULT //</ GPIO >
Serial.begin(115200); Serial.println("\n FASTEST IMPULSE TEST ON ESP32");
//--------</ setup() >-------- } //=============</ SETUP >============
//=============< Main_Loop >============
void loop(){ //--------< Main Loop() >-------- //*loop each ImpulseBlock //*with write on/off //*ImpulsWidth=50-60ns jitter 1/10 //*PeriodeWidth=140ns (136-156) jitter 1/10
//--< Holdtime: change Pulswith >-- //if((millis()-msStart) > msHold){ //Serial.println("\n us=" + usSeconds);
digitalWrite(OUT_PIN, HIGH); // PULS_ON //delayMicroseconds(1); digitalWrite(OUT_PIN, LOW); // PULS_OFF //delayMicroseconds(1);
//--------</ Main Loop() >-------- } //=============</ Main_Loop >============
|