Two or more data types in declaration of 'timeout'

Hello, I need help I have this message error it saids¨ two or more data types in declaration of timeout¨ can someone help me this is my code just to let you know Thanks.
I will put an asterisk where the error is.

#include <LiquidCrystal_I2C.h>
// Include Libraries
#include "Arduino.h"

// Pin Definitions

// Global variables and defines
// There are several different versions of the LCD I2C adapter, each might have a different address.
// Try the given addresses by Un/commenting the following rows until LCD works follow the serial monitor prints.
// To find your LCD address go to: Arduino Playground - I2cScanner and run example.
#define LCD_ADDRESS 0x3F
//#define LCD_ADDRESS 0x27
// Define LCD characteristics
#define LCD_ROWS 2
#define LCD_COLUMNS 16
#define SCROLL_DELAY 150
#define BACKLIGHT 255
// object initialization)

// define vars for testing menu
const int timeout = 10000;
char menuOption = 0;
long time0;

// Setup the essentials for your circuit to work. It runs first every time your circuit is powered with electricity.
void setup()
// Setup Serial which is useful for debugging
// Use the Serial Monitor to view printed messages
while (!Serial) ; // wait for serial port to connect. Needed for native USB

// initialize the lcd
menuOption = menu();


// Main logic of your circuit. It defines the interaction between the components you selected. After setup, it runs over and over again, in an eternal loop.
void loop()

if(menuOption == '1') {
// LCD 16x2 I2C - Test Code
// The LCD Screen will display the text of your choice.
lcdI2C.clear();                          // Clear LCD screen.
lcdI2C.print("  ");                   // Print print String to LCD on first line
lcdI2C.selectLine(2);                    // Set cursor at the begining of line 2
lcdI2C.print("     Rocks!  ");                   // Print print String to LCD on second line


if (millis() - time0 > timeout)
    menuOption = menu();


// Menu function for selecting the components to be tested
// Follow serial monitor for instrcutions
char menu()

Serial.println(F("\nWhich component would you like to test?"));
Serial.println(F("(1) LCD 16x2 I2C"));
Serial.println(F("(menu) send anything else or press on board reset button\n"));
while (!Serial.available());

// Read data from serial monitor if received
while (Serial.available()) 
    char c =;
    if (isAlphaNumeric(c)) 
        if(c == '1') 
			Serial.println(F("Now Testing LCD 16x2 I2C"));
            Serial.println(F("illegal input!"));
            return 0;
        time0 = millis();
        return c;


There's something missing here:


Check the examples for your library.


the compiler could not identify the end of line in the previous command and pointed this timeout definition as wrong as wrong.
The error is here:

RV mineirin

and of course, do yourself a favour and please read How to get the best out of this forum and modify your first post accordingly (including code tags).

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.