error compiling

i am new to arduino and programming, and i have a friend that needs help building a Arduino powered solenoid driver to precisely control the drops of a Kyoto-Style cold coffee brewer, this is a video of what I am talking about https://youtu.be/Q5wW_9ZTYGE. We got all the parts but when we tried to upload the program we got this error

/Users/franciscofernandez/Desktop/Arduino/sketch_jul22a/sketch_jul22a.ino:2:31: fatal error: Adafruit_MCP23017.h: No such file or directory
#include <Adafruit_MCP23017.h>
^
compilation terminated.
exit status 1
Error compiling for board Arduino/Genuino Uno.

this is the code…

#include <Wire.h>
#include <Adafruit_MCP23017.h>
#include <Adafruit_RGBLCDShield.h>
#include <Adafruit_MotorShield.h>
#include "utility/Adafruit_PWMServoDriver.h"
#include <Servo.h>

// The shield uses the I2C SCL and SDA pins. On classic Arduinos
// this is Analog 4 and 5 so you can't use those for analogRead() anymore
// However, you can connect other I2C sensors to the I2C bus and share
// the I2C bus.
Adafruit_RGBLCDShield lcd = Adafruit_RGBLCDShield();

// These #defines make it easy to set the backlight color
#define RED 0x1
#define YELLOW 0x3
#define GREEN 0x2
#define TEAL 0x6
#define BLUE 0x4
#define VIOLET 0x5
#define WHITE 0x7

// Create the motor shield object with the default I2C address
Adafruit_MotorShield AFMS = Adafruit_MotorShield(); 

// Connect a stepper motor with 200 steps per revolution (1.8 degree)
// to motor port #2 (M3 and M4)
Adafruit_StepperMotor *myStepper = AFMS.getStepper(200, 2);
// And connect DC motors to ports
Adafruit_DCMotor *myMotor1 = AFMS.getMotor(1);
Adafruit_DCMotor *myMotor2 = AFMS.getMotor(2);
Adafruit_DCMotor *myMotor3 = AFMS.getMotor(3);
Adafruit_DCMotor *myMotor4 = AFMS.getMotor(4);

int t_drop = 50;
int t_calib_1 = 0, t_calib_2 = 0;
int t_delay = 1000;
int t_enable = 0;

void runmotor(int motor) {
  if(motor == 1) {
    myMotor1->run(FORWARD);
    myMotor3->run(FORWARD);
  } else {
    myMotor2->run(FORWARD);
    myMotor4->run(FORWARD);
  }
}

void stopmotor(int motor) {
  if(motor == 1) {
    myMotor1->run(RELEASE);
    myMotor3->run(RELEASE);
  } else {
    myMotor2->run(RELEASE);
    myMotor4->run(RELEASE);
  }
}

void update() {
  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print("Drop: ");
  lcd.print(t_drop);
  if(t_enable == 1) {
    lcd.print("+");
    lcd.print(t_calib_1);
  } else if(t_enable == 2) {
    lcd.print("+");
    lcd.print(t_calib_2); 
  }
  lcd.print(" msec");
  lcd.setCursor(0, 1);
  lcd.print("Rate: ");
  lcd.print(t_delay/500);
  lcd.print(".");
  lcd.print((t_delay/50)%10);
  lcd.print(" sec  ");
  lcd.print(t_enable);
}

void setup() {
  int i, test = 1;
  uint8_t button, button_last = 0;
  
  Serial.begin(9600);           // set up Serial library at 9600 bps
    
  // set up the LCD's number of columns and rows: 
  lcd.begin(16, 2);
  lcd.setBacklight(WHITE);
  
  AFMS.begin();  // create with the default frequency 1.6KHz
   
  // turn on motor M1
  myMotor1->setSpeed(255);
  myMotor1->run(RELEASE);
  myMotor2->setSpeed(255);
  myMotor2->run(RELEASE);
  myMotor3->setSpeed(255);
  myMotor3->run(RELEASE);
  myMotor4->setSpeed(255);
  myMotor4->run(RELEASE);
  
  // wait for MAX chip to stabilize
  delay(500);

  if(lcd.readButtons() == BUTTON_SELECT) {
    lcd.clear();
    lcd.setCursor(0, 0);
    lcd.print("Calibration");
    delay(2000);

    while(1) {
      while(1) {
        lcd.setCursor(0, 1);
        lcd.print("1=");
        lcd.print(t_calib_1);
        if(test == 1) lcd.print("*   ");
        else          lcd.print("    ");
        lcd.setCursor(8, 1);
        lcd.print("2=");
        lcd.print(t_calib_2);
        if(test == 2) lcd.print("*   ");
        else          lcd.print("    ");
          
        button = lcd.readButtons();
        if(button != button_last) {
          if(button == BUTTON_RIGHT) {
            if(test == 1) test = 2;
            else          test = 1;
          }
          if(button == BUTTON_LEFT) {
            for(i = 0; i < 100; i++) {
               runmotor(test);
               delay(50 + ((test == 1) ? t_calib_1 : t_calib_2)); 
               stopmotor(test);
               delay(150);
            }
          }
          if(button == BUTTON_UP) {
            if(test == 1) t_calib_1++;
            else          t_calib_2++;
          }
          if(button == BUTTON_DOWN)
            if(test == 1) t_calib_1--;
            else          t_calib_2--;
          if(button == BUTTON_SELECT)
            goto done;
        }
        button_last = button; 
        delay(100);
      }
    }
  }
  
done:
  update();
}

int timer = 0, motor = 0;
void loop() {
  uint8_t buttons = lcd.readButtons();
  static uint8_t buttons_last;
  
  if(buttons && (buttons != buttons_last)) {
    if(buttons & BUTTON_UP) {
      if((t_enable == 3) || (t_enable == 0))
        t_drop += 10;
      else if(t_enable == 1)
        t_calib_1++;
      else if(t_enable == 2)
        t_calib_2++;
    }
    if(buttons & BUTTON_DOWN) {
      if((t_enable == 3) || (t_enable == 0))
        t_drop -= 10;
      else if(t_enable == 1)
        t_calib_1--;
      else if(t_enable == 2)
        t_calib_2--;
    }
    if(buttons & BUTTON_RIGHT) {
      t_delay += 100;
    }
    if(buttons & BUTTON_LEFT) {
      t_delay -= 100; 
    }
    if(buttons & BUTTON_SELECT) {
      if(!t_enable) t_enable = 3;
      else          t_enable--;
      stopmotor(1);
      stopmotor(2);
    }
    update();
    timer = 0;
  }
  buttons_last = buttons;
  
  if(timer == 0) {
    if(!motor && (t_enable & 1)) {
      runmotor(1);
      delay(t_drop + t_calib_1);
      stopmotor(1);
      timer += t_drop + t_calib_1;
    } else if(motor && (t_enable & 2)) {
      runmotor(2);
      delay(t_drop + t_calib_2);
      stopmotor(2);
      timer += t_drop + t_calib_1;
    }
  }
  
  delay(8);
  timer += 10;
  
  if(timer >= t_delay) {
    timer = 0;
    motor++;
    motor &= 1;
  }
}

Have you downloaded and installed the “Adafruit_MCP23017” library?

Incidentally, don’t post code inline. Please use [code]// code tags[/code].

You can select the code then press the </> button in the edit window.

Also, don’t add extra characters like the ‘+’ you have at the start of each line. Anyone wanting to copy your code and paste it into an IDE for testing has to manually remove each and every ‘+’ before they can test the code.

(It’s not too late to edit your post and make these corrections;) )

Edit: The library is here:- Adafruit-MCP23017-Arduino-Library

thanks for responding and the advice, i did the changes to the pos, i do have the Adafruit_MCP23017 library. I keep getting this error message

Arduino: 1.6.10 Hourly Build 2016/07/20 05:12 (Mac OS X), Board: "Arduino/Genuino Uno"

libraries/Adafruit_RGBLCDShield/utility/Adafruit_MCP23017.cpp.o: In function Adafruit_MCP23017::begin(unsigned char)': /Users/franciscofernandez/Documents/Arduino/libraries/Adafruit_RGBLCDShield/utility/Adafruit_MCP23017.cpp:52: multiple definition ofAdafruit_MCP23017::begin(unsigned char)' libraries/Adafruit_MCP23017/Adafruit MCP23017.cpp.o:/Users/franciscofernandez/Documents/Arduino/libraries/Adafruit_MCP23017/Adafruit MCP23017.cpp:113: first defined here libraries/Adafruit_RGBLCDShield/utility/Adafruit_MCP23017.cpp.o: In function wiresend': /Users/franciscofernandez/Documents/Arduino/libraries/Adafruit_RGBLCDShield/utility/Adafruit_MCP23017.cpp:36: multiple definition ofAdafruit_MCP23017::begin()' libraries/Adafruit_MCP23017/Adafruit MCP23017.cpp.o:/Users/franciscofernandez/Documents/Arduino/libraries/Adafruit_MCP23017/Adafruit MCP23017.cpp:57: first defined here libraries/Adafruit_RGBLCDShield/utility/Adafruit_MCP23017.cpp.o: In function wiresend': /Users/franciscofernandez/Documents/Arduino/libraries/Adafruit_RGBLCDShield/utility/Adafruit_MCP23017.cpp:36: multiple definition ofAdafruit_MCP23017::writeGPIOAB(unsigned int)' libraries/Adafruit_MCP23017/Adafruit MCP23017.cpp.o:/Users/franciscofernandez/Documents/Arduino/libraries/Adafruit_MCP23017/Adafruit MCP23017.cpp:57: first defined here libraries/Adafruit_RGBLCDShield/utility/Adafruit_MCP23017.cpp.o: In function wiresend': /Users/franciscofernandez/Documents/Arduino/libraries/Adafruit_RGBLCDShield/utility/Adafruit_MCP23017.cpp:36: multiple definition ofAdafruit_MCP23017::pullUp(unsigned char, unsigned char)' libraries/Adafruit_MCP23017/Adafruit MCP23017.cpp.o:/Users/franciscofernandez/Documents/Arduino/libraries/Adafruit_MCP23017/Adafruit MCP23017.cpp:57: first defined here libraries/Adafruit_RGBLCDShield/utility/Adafruit_MCP23017.cpp.o: In function wiresend': /Users/franciscofernandez/Documents/Arduino/libraries/Adafruit_RGBLCDShield/utility/Adafruit_MCP23017.cpp:36: multiple definition ofAdafruit_MCP23017::digitalRead(unsigned char)' libraries/Adafruit_MCP23017/Adafruit MCP23017.cpp.o:/Users/franciscofernandez/Documents/Arduino/libraries/Adafruit_MCP23017/Adafruit MCP23017.cpp:57: first defined here libraries/Adafruit_RGBLCDShield/utility/Adafruit_MCP23017.cpp.o: In function wiresend': /Users/franciscofernandez/Documents/Arduino/libraries/Adafruit_RGBLCDShield/utility/Adafruit_MCP23017.cpp:36: multiple definition ofAdafruit_MCP23017::readGPIOAB()' libraries/Adafruit_MCP23017/Adafruit MCP23017.cpp.o:/Users/franciscofernandez/Documents/Arduino/libraries/Adafruit_MCP23017/Adafruit MCP23017.cpp:57: first defined here libraries/Adafruit_RGBLCDShield/utility/Adafruit_MCP23017.cpp.o: In function wiresend': /Users/franciscofernandez/Documents/Arduino/libraries/Adafruit_RGBLCDShield/utility/Adafruit_MCP23017.cpp:36: multiple definition ofAdafruit_MCP23017::pinMode(unsigned char, unsigned char)' libraries/Adafruit_MCP23017/Adafruit MCP23017.cpp.o:/Users/franciscofernandez/Documents/Arduino/libraries/Adafruit_MCP23017/Adafruit MCP23017.cpp:57: first defined here libraries/Adafruit_RGBLCDShield/utility/Adafruit_MCP23017.cpp.o: In function wiresend': /Users/franciscofernandez/Documents/Arduino/libraries/Adafruit_RGBLCDShield/utility/Adafruit_MCP23017.cpp:36: multiple definition ofAdafruit_MCP23017::digitalWrite(unsigned char, unsigned char)' libraries/Adafruit_MCP23017/Adafruit MCP23017.cpp.o:/Users/franciscofernandez/Documents/Arduino/libraries/Adafruit_MCP23017/Adafruit MCP23017.cpp:57: first defined here collect2: error: ld returned 1 exit status exit status 1 Error compiling for board Arduino/Genuino Uno.

This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.

user956: thanks for responding and the advice, i did the changes to the pos, i do have the Adafruit_MCP23017 library. I keep getting this error message

libraries/Adafruit_RGBLCDShield/utility/Adafruit_MCP23017.cpp
libraries/Adafruit_MCP23017/Adafruit MCP23017.cpp

Adafruit_MCP23017::writeGPIOAB(unsigned int)' Adafruit_MCP23017::pullUp(unsigned char, unsigned char)' Adafruit_MCP23017::digitalRead(unsigned char)'

Looks like you are using two libraries that both include objects with the same name and functions. You could either delete the libraries/Adafruit_MCP23017 library or remove the functions from the libraries/Adafruit_RGBLCDShield/utility/ folder and have that library use the other library.

Good Luck.