LINUX.ORG.RU

История изменений

Исправление fornlr, (текущая версия) :

А нашёл, чего-то там и * и # набираются.

Как, не могу понять.

https://github.com/jhaupt/RotaryCellphone/blob/master/Functions.ino

if (TimeSinceLastPulse == 1000){    //If a long enough time has lapsed since the last pulse from the rotary dial, assume the dial has stopped rotating...
		PNumber[k] = n;    //...and write the current value of n to the current position (k) in the phone number (PNumber)
		k++;      //increment to the next position of the phone number
		if (n == 2){		//Consider this a "*"
			FONAserial.println("AT+CPTONE=*");	//Play DTMF tone over speaker				
			delay(20);
			FONAserial.println("AT+VTS=*");	//Send DTMF tone over network (for menu entries, etc).
		}
		else if (n == 1){	//Consider this a "#"
			FONAserial.println("AT+CPTONE=#");	//Play DTMF tone over speaker				
			delay(20);
			FONAserial.println("AT+VTS=#");	//Send DTMF tone over network (for menu entries, etc).
		}
		n = 0;  //reset n
	}

PS: вообще за такой вот код надо взять и… книгу какую-то подарить что-ли фундаментальную.

Исправление fornlr, :

А нашёл, чего-то там и * и # набираются.

Как, не могу понять.

https://github.com/jhaupt/RotaryCellphone/blob/master/Functions.ino

if (TimeSinceLastPulse == 1000){    //If a long enough time has lapsed since the last pulse from the rotary dial, assume the dial has stopped rotating...
		PNumber[k] = n;    //...and write the current value of n to the current position (k) in the phone number (PNumber)
		k++;      //increment to the next position of the phone number
		if (n == 2){		//Consider this a "*"
			FONAserial.println("AT+CPTONE=*");	//Play DTMF tone over speaker				
			delay(20);
			FONAserial.println("AT+VTS=*");	//Send DTMF tone over network (for menu entries, etc).
		}
		else if (n == 1){	//Consider this a "#"
			FONAserial.println("AT+CPTONE=#");	//Play DTMF tone over speaker				
			delay(20);
			FONAserial.println("AT+VTS=#");	//Send DTMF tone over network (for menu entries, etc).
		}
		n = 0;  //reset n
	}

Исходная версия fornlr, :

А нашёл, чего-то там и * и # набираются.

Как, не могу понять.

https://github.com/jhaupt/RotaryCellphone/blob/master/Functions.ino