Unable to delete custom library

Hello,

I have a sketch that has been working fine that will no longer compile. The error message I get says "RTC_DS1307 does not name a type" so I looked into the library.

I'm can't think of what would have changed, except that the library RTClib now appears in my custom library tab for some reason. I tried to delete RTClib from the custom library tab and got a yellow popup box that says "error while deleting library". That seems weird to me. I see there is another post on this topic that was resolved a while back so maybe a similar issue?

Any thoughts?

//Catomatic: An automated cat food and water station
//A hair-brained project by Wayne Gatlin
//last edit 25Jan2018 this version solves the delay block that was making the water dispense too long

/*
Description of the project:
The purpose of this project is to control the timing of two outputs that are used to
dispense food and water to Murf.  One output is a low-torque electric motor (12v)
that turns a worm drive to dispense food and the other is a soleniod (12v) that
dispenses water.  An Arduino Uno with a RTC controls the timing of food and water cycles.
Each output is activated by a seperate TIP120 transistor that receives a 5v signal from the
Arduino that opens the defined output to the 12v current.

Description of the circuit:
*A DC 12v 1.5A power supply, with the ground wire connected to 12v breaboard ground and the power
   connected to the 12v breadboard power
*A DC motor connected to 12v power and a TIP120 tranistor
*A DC solenoid valve connected to 12v power and a TIP120 tranistor
*Feedmotor TIP120 tranistor, with the Base connected to digital pin 3, the Emitter to 12v ground,
 and the Collector to one lead from a 12v DC motor
*watersolenoid TIP120 tranistor, with the Base connected to digital pin 4, the Emitter to ground,
 and the Collector to one lead from a 12v DC solenoid valve
*manual feed Pushbotton that completes 12v circuit from motor to ground, bypassing transistor control
*manual water Pushbotton that completes 12v circuit from solenoid to ground, bypassing transistor control
*RTC to control timing of events

The objective of this code is to:
1. Use the arduino's outputs to send 5v signals to the transistors for the motor and solenoid
so that they turn on at the defined times and are open for the correct amount of time
2. Define a set amount of time that each output is open (longer=more food or water dispensed)
3. Create a timed daily cycle of three food and water events (breakfast, lunch, dinner)
4. Ideally allow the Arduino to "sleep" until it is interruped for the next event
*/

//Step 1: Call libraries
#include <Wire.h>       //This library allows the Uno to communicate with I2C / TWI devices. On the Arduino boards with the R3 layout (1.0 pinout), the SDA (data line) and SCL (clock line) are on the pin headers close to the AREF pin.
#include "RTClib.h"     //I beleive this library allows the RTC to communicate with the Arduino
#include <TimeLib.h>    //This header file contains definitions of functions to get and manipulate date and time information.
#include <TimeAlarms.h> //I believe this libarry allows me to schedule time-based tasks

RTC_DS1307 RTC;         //this defines a variable named RTC of type RTC_DS1307; it's defined in RTClib.h
time_t syncProvider()   //this does the same thing as RTC_DS1307::get()
  {
  return RTC.now().unixtime();
  }


//Step 2: Define the variables
//int is the 'data type' for the variables --int means integer (whole number)

int feedmotor = 3;      //The motor for food will be controlled by digial output pin 3
int watersolenoid = 4;  //The solenoid for water will be controlled by digial output pin 4

/**************************

     SETUP FUNCTION

***************************/

// Step 3: Run the setup
    //The setup() function is called when a sketch starts. Use it to initialize variables, pin modes, start using libraries, etc.
    //The setup function will only run once, after each powerup or reset of the Arduino board.

void setup()
{
    //establish communication with computer
    Serial.begin(9600); //My understanding is that this sets the communiaction rate with the computer(?) and is necessary for all sketches
    

    //Call the libraries that were included in Step 1
    Wire.begin();       //Starts the wire library
    RTC.begin();        //Starts the RTC library
    
    setSyncProvider(syncProvider);     //reference our syncProvider function instead of RTC_DS1307::get()

    //Tell the arduino what I've called the outputs
    pinMode(feedmotor, OUTPUT);      //Defines that the feedmotor (pin 3 from step 2) is an output device
    pinMode(watersolenoid, OUTPUT);  //Defines that the watersolenoid (pin 4 from step 2) is an output device
    pinMode(LED_BUILTIN, OUTPUT);   //defines onboard LED

    //Test to see if the RTC is NOT running properly
    if (! RTC.isrunning())
    {
        Serial.println("RTC is NOT running!");
    }
    
        //Test to make sure the RTC is running properly
    if (RTC.isrunning())
    {
        Serial.println("RTC is workin fine!");
    }
    
    // following line sets the RTC to the date & time this sketch was compiled
    RTC.adjust(DateTime(F(__DATE__), F(__TIME__)));

    //Define the times that food and water will be delivered
    Alarm.alarmRepeat(11,00,00, Breakfast);    // An alarm called Breakfast happens at 6:30am every day
    Alarm.alarmRepeat(17,30,00, Lunch);        // An alarm called Lunch happens at 12:30pm every day
    Alarm.alarmRepeat(22,00,00, Dinner);       // An alarm called Dinner happens at 6:00pm every day
    //for some reason the RTC gets set 5 hours ahead of the current time when the sketch uploads from my macbook
}
/**************************

           LOOPS

***************************/

//Step 4: Describe the loop

void loop() { //curly bracket that defines start of the loop

    //this sets the RTC clock to current time and date in the serial monitor
    //Does this require an LCD?  I would like to add one in the future.
    DateTime now = RTC.now();         //this calls current time and date from RTC
  
    Serial.print(now.hour(), DEC);    //this set of functions prints the time every second in the serial monitor
    Serial.print(':');
    Serial.print(now.minute(), DEC);
    Serial.print(':');
    Serial.print(now.second(), DEC);
    Serial.println();


    //this is required, or the alarms won't fire.
    Alarm.delay(1000); // wait one second between clock display
}

//Create a loop that defines a feeding
void FoodWaterON() {                         // A title for this particular function
    digitalWrite(feedmotor, HIGH);        //Turns the feedmotor on
    Serial.println("Feeding the Beast");  //text on the future LCD
    //future project: LED indicator light
    //future project: LCD scrolling message
    //future project: sound bite to announce feeding
    delay(10000);                           //This is the amount of time the motor will turn dispensing food
    Serial.println("Feeding Complete");   //Text on the future LCD
    digitalWrite(feedmotor, LOW);        //Turns the feedmotor on
    
    delay(12000); //delay between food and water
    
    digitalWrite(watersolenoid, HIGH);    //Turns the watersolenoid on
    Serial.println("Hydrating");          //text on the future LCD
    //future project: LED indicator light
    //future project: LCD scrolling message
    //future project: sound bite to announce watering
    delay(3000);                           //This is the amount of time the motor will turn dispensing food
    Serial.println("Hydration Complete"); //Text on the future LCD
    digitalWrite(watersolenoid, LOW);    //Turns the watersolenoid on
}

//Create a loop that defines a watering
/*void WaterON() {                        //I think this is just a title for this particular function
    digitalWrite(watersolenoid, HIGH);    //Turns the watersolenoid on
    Serial.println("Hydrating");          //text on the future LCD
    //future project: LED indicator light
    //future project: LCD scrolling message
    //future project: sound bite to announce watering
    delay(3000);                           //This is the amount of time the motor will turn dispensing food
    Serial.println("Hydration Complete"); //Text on the future LCD
    digitalWrite(watersolenoid, LOW);    //Turns the watersolenoid on
}*/
    
//Define what will happen at each of the three scheduled meal times
void Breakfast() {
  Serial.println("test run");
    FoodWaterON();
}

void Lunch() {
    FoodWaterON();
}

void Dinner() {
    FoodWaterON();
}

Just tried to delete some custom libs and didnt have any issue.

Have you tried clearing your browsers/computers cache first and coming back into the editor ?
Might not be the cause but it is always worth a try.

Also wonder if you could attach the libs to your next post so I can try YOUR libs at this end.

UPDATE.

I was able to recreate your error (semi accidental) by deleting a few libs quickly but accidentally reselecting one I had already selected a few moments ago.

Could you confirm that your lib is either now GONE or still a problem ?

I also have one of these zombie libraries from when I was trying to delete several custom libraries and didn't wait for one deletion to finish before deleting again.

I really don't like how when you delete or import in the Arduino Web Editor, there is no indication that anything is happening, then after a long delay you get some popup notification that it's finished.

Still no luck deleting the library. I don't know how to attach the libraries I have...any hints?

In lieu of that here's a screenshot of the bug in action.

Thanks for your help with this!

Yes that is the error and it was reproducible.
They were working on it today that much I can tell you.

What I am going to suggest next may or may not help you out but it is part of my daily routine when testing CREATE EDITOR to make sure I get a fresh look at the editor every time.

In your case ignore the bulk of the document but CCLEANER and WISE REG cleaner (free versions) are important....Pick up the rest near the end.

I dont hold any responsibility if your computer seems a little quicker after doing that and restarting :wink:

CLEAN UP BEFORE INSTALLING ANOTHER COPY OF THE IDE OR ARDUINO CREATE.pdf (347 KB)

Thanks for your post, wgatlin.

I also haven't been able to delete any of my custom libraries since I first tried a couple of weeks ago. I receive the same error when I attempt to do so. Issues appears to be present across multiple computers.

Glad to hear it's a known issue that they're working on.

@adam_g

Some of the issues have been fixed can you check and see if it helped with your issue ?
If not can you add the library details ?

@ballscrewbob

Thanks for your reply. I am still unable to delete any of my custom libraries, which include the following:

  • ADAFRUIT-RGB-LCD-SHIELD-LIBRARY
  • ADAFRUIT_GPS
  • ADAFRUIT_INA219
  • ADAFRUIT_L3GD20_U
  • ADAFRUIT_LSM303DLHC
  • ADAFRUIT_MAX31856
  • ADAFRUIT_MCP9808_LIBRARY
  • ADAFRUIT_SENSOR
  • ADAFRUIT_TSL2561
  • DHT-SENSOR-LIBRARY
  • IRIDIUMSBD-1.0
  • LOW-POWER
  • STATISTIC
  • TINYGPS-13
  • EXTEEPROM

Thanks for the list I will pass it along for tomorrow.

At least three of those I also had issues with but found out that the examples had been nested too deep for CREATE EDITOR to handle well.

The folder recursion for the web is a little limited compared to a computer.