Code isn't working


Arduino says that this program wasnt declared in scope.
Here’s the code:

// Include Libraries
#include “Arduino.h”
#include “DCMotor.h”
#include “Potentiometer.h”

// Pin Definitions

// Global variables and defines

// object initialization
Potentiometer potentiometer_5v(POTENTIOMETER_5V_PIN_SIG);

// define vars for testing menu
const int timeout = 10000; //define timeout of 10 sec
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

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') {
// DC Motor - Hobby Motor Gear - Test Code
// The DC motor will turn on and off for 4000ms (4 sec)
dcMotor.on(200);                        // 1. turns on
delay(4000);                             // 2. waits 4000 milliseconds (4 sec). change the value in the brackets (4000) for a longer or shorter delay.;                       // 3. turns off
delay(4000);                             // 4. waits 4000 milliseconds (4 sec). change the value in the brackets (4000) for a longer or shorter delay.

else if(menuOption == '2') {
// Rotary Potentiometer - 10k Ohm, Linear - Test Code
int potentiometer_5vVal =;
Serial.print(F("Val: ")); Serial.println(potentiometer_5vVal);


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) DC Motor - Hobby Motor Gear"));
Serial.println(F("(2) Rotary Potentiometer - 10k Ohm, Linear"));
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 DC Motor - Hobby Motor Gear"));
		else if(c == '2') 
			Serial.println(F("Now Testing Rotary Potentiometer - 10k Ohm, Linear"));
            Serial.println(F("illegal input!"));
            return 0;
        time0 = millis();
        return c;




Did you download the zip file and unzip all of the files to a folder, then open the .ino file from that folder? Windows can be quite confusing about this because when you open a zip file or looks like a folder, but it doesn’t unzip all the files.