Hi
Well it seems to work but the text is strobing
this is what i have changed so far
[code]
//**************** PERMANENT INFO DISPLAY PROGRAM ****************
//tft.fillScreen(TFT_BLACK);
tft.fillRect(225, 108, 48, 23, TFT_BLACK); // стираем старое x y width hight //(355, 117, 90, 23, TFT_BLACK)
tft.setTextColor(TFT_WHITE );
tft.setFreeFont(FF6);
//temp1= 56; // x coordinate
//tft.setTextColor(TFT_WHITE);
//tft.setFreeFont(FF33);//21
//tft.fillRect(+70 , 265, 21, 3, TFT_BLACK); //erase the line for numbers
//tft.fillRect(+150 , 265, 21, 3, TFT_BLACK);
//tft.fillRect(+230 , 265, 21, 3, TFT_BLACK);
//tft.fillRect(+310 , 265, 21, 3, TFT_BLACK);
//************************************************************
tft.setCursor(152, 150, 1);// 285, 139, 1 //152, 150, 1
tft.println("MODE");
//tft.setCursor(285, 106, 1); //292, 106, 1
//tft.println("RIT ");
tft.setCursor(152, 125, 1);
tft.println("AUDIO"); // testing
//tft.setFreeFont(FF41); // 21
//tft.setCursor(10, 182, 1);
//tft.println("VCC - V");
tft.setFreeFont(FF26);//6
tft.drawRoundRect(140, 15, 334, 143, 5,TFT_BLUE); //x y width high radius color rectangle A
}
void loop() { // put your main code here, to run repeatedly:
audioSwitchState = digitalRead(audioSwitchPin); // check the status of the switc
if (audioSwitchState != prevaudioSwitchState) // compare the switchState to its previous state
{
if (audioSwitchState == LOW) // If the switch is pressed, count the press
{
buttonPushCounter ++;
buttonPushCounter %= 4;
}
}
switch (buttonPushCounter)
{
case 0: // Off
tft.setCursor(230, 125, 1); // SetCursor(230, 125, 1);
tft.setTextColor(TFT_WHITE); // Set up text color
tft.setFreeFont(FF29); // Set up Font Size
tft.println("OFF"); // print to display ("OFF")
tft.fillRect(225, 108, 48, 23, TFT_BLACK);
digitalWrite(A12, HIGH); // Output on
digitalWrite(A13, LOW); // Output off
digitalWrite(A14, LOW); // Output off
digitalWrite(A15, LOW); // Output off
break;
case 1: // 1.5Khz
tft.setCursor(230, 125, 1); // SetCursor(0, 0);
tft.setTextColor(TFT_WHITE); // Set up text color
tft.setFreeFont(FF29); // Set up Font Size
tft.println("1.5K"); // print to display ("1.5K")
tft.fillRect(225, 108, 48, 23, TFT_BLACK);
digitalWrite(A12, LOW); // Output off
digitalWrite(A13, HIGH); // Output on
digitalWrite(A14, LOW); // Output off
digitalWrite(A15, LOW); // Output off
break;
case 2: // 2.0Khz
tft.setCursor(230, 125, 1); // SetCursor(0, 0);
tft.setTextColor(TFT_WHITE); // Set up text color
tft.setFreeFont(FF29); // Set up Font Size
tft.println("2.0K"); // print to display ("2.0K")
tft.fillRect(225, 108, 48, 23, TFT_BLACK);
digitalWrite(A12, LOW); // Output off
digitalWrite(A13, LOW); // Output off
digitalWrite(A14, HIGH); // Output on
digitalWrite(A15, LOW); // Output off
break;
case 3: // 2.5Khz
tft.setCursor(230, 125, 1); // SetCursor(0, 0);
tft.setTextColor(TFT_WHITE); // Set up text color
tft.setFreeFont(FF29); // Set up Font Size
tft.println("2.5K"); // print to display ("2.5K")
tft.fillRect(225, 108, 48, 23, TFT_BLACK);
digitalWrite(A12, LOW); // Output off
digitalWrite(A13, LOW); // Output off
digitalWrite(A14, LOW); // Output off
digitalWrite(A15, HIGH); // Output on
break;
}
prevaudioSwitchState = audioSwitchState; // save the current switch state as the last state
}
[/code]
Thanks for ya help for now
Howard