can i use 2 Switch (case) Statement's in the main loop?
if so how?
as i am trying it and its just waiting for the first one to be activated
the first one from the fona library
char command = Serial.read();
Serial.println(command);
switch (command) {
case 'a': {
// read the ADC
uint16_t adc;
if (! fona.getADCVoltage(&adc)) {
Serial.println(F("Failed to read ADC"));
} else {
Serial.print(F("ADC = ")); Serial.print(adc); Serial.println(F(" mV"));
}
break;
}}
then the next one looking at what screen is loaded on the touch screen
// Wait for a touch
if (! ctp.touched()) {
return;
}
// Retrieve a point
TS_Point p = ctp.getPoint();
int a = page;
switch (a) {
// --------------check to see if screen 1 is loaded-----------------
case 1: { // Screen 1 Active As when screen 1 loads it chages the value of page to 1
if ((p.x > 175 && p.x < 201)&& (p.y > 280 && p.y < 320))
setuser();