Newbie help loading sketch required please

hello there im building a coffee grinder timer with the uno i know lots about coffee little about arduino haha
im using this project from Github
arduino grinder timer
im having problems when i try to verify or load the sketch on GitHub readme it says
Copy the three libraries from the lib folder: “EEPROM, Encoder & DigoleSerial” to “Arduino\libraries” folder and restart arduino application

Open “Grinder_Timer.ino”.

which ive done

but i get the same #include wire.h error as mentioned on the github issues page ive tried both methods mentioned to try and fix this
i edited #include “…/Wire/Wire.h” to #include “Wire.h” in the DigoleSerial.h file
but get the same errors as timcoolguy on github
ive also tried to put all the files in the same folder as follows
ive made a new folder in the arduino library named Grinder_Timer_1_1 put in the EEPROM, Encoder & DigoleSeria files along with all the ino files from the folder named src but when i verify i get this error message about the encoder.h
Arduino: 1.8.5 (Windows 7), Board: “Arduino/Genuino Uno”

C:\Users\jimbean\Documents\Arduino\libraries\Grinder_Timer_1_1\Grinder_Timer_1_1\Grinder_Timer_1_1.ino:14:21: fatal error: Encoder.h: No such file or directory

#include <Encoder.h>

^

compilation terminated.

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.

any ideas on this would be greatly appreciated as im a little stuck in the water until i get the code loaded
this is a video of the project finished
arduino coffe grinder
many thanks jimbean :slight_smile:

You need

Jimbean:

C:\Users\jimbean\Documents\Arduino\libraries\Grinder_Timer_1_1\Grinder_Timer_1_1\Grinder_Timer_1_1.ino:14:21: fatal error: Encoder.h: No such file or directory

#include <Encoder.h>

That means you didn’t install the libraries correctly.

Jimbean:
Copy the three libraries from the lib folder: “EEPROM, Encoder & DigoleSerial” to “Arduino\libraries” folder and restart arduino application

This is not the best explanation of how to install libraries. Actually what you need to do is copy the libraries to {sketchbook folder}\libraries where the location of {sketchbook folder} is shown in the Arduino IDE at File > Preferences > Sketchbook folder. You need to copy those library folders directly under the libraries folder, not in a subfolder like this:

{sketchbook folder}
|_libraries
|_DigoleSerial
|_EEPROM
|_Encoder

NOT like this:

{sketchbook folder}
|_libraries
|_lib
|_DigoleSerial
|_EEPROM
|_Encoder

Hi pert thank you for the reply yes i'm defiantly not grasping how to install the library's properly but i'm not sure where i'm going wrong its my first ever tinkering with arduino so as you can tell i'm totally clueless :slight_smile: haha
i looked in IDE file> preferences> then a setting screen pops up with the sketch book location as C:\Users\jimbean\Documents\Arduino which is where ive been putting them
i tried again with just the 3 files EEPROM, Encoder & DigoleSerial but when i verify it comes back to the
#include "../Wire/Wire.h" error again
apologies if i'm missing something simple many thanks jimbean

Jimbean:
i looked in IDE file> preferences> then a setting screen pops up with the sketch book location as C:\Users\jimbean\Documents\Arduino which is where ive been putting them

In C:\Users\jimbean\Documents\Arduino\libraries, right?

Jimbean:
i tried again with just the 3 files EEPROM, Encoder & DigoleSerial but when i verify it comes back to the
#include "../Wire/Wire.h" error again

  • Open the file C:\Users\jimbean\Documents\Arduino\libraries\DigoleSerial\DigoleSerial.h in a text editor.
  • Change the line:
#include "../Wire/Wire.h"

to:

#include "Wire.h"
  • Save the file
  • Try verifying the sketch again

OK i changed to #include "Wire.h" in the DigoleSerial.h file but getting the same error as timcoolguy on GitHub issues page for this project he put all the files in the same folder to solve it but that didn't work for me
again thanks for looking cheers jimbean
Arduino: 1.8.5 (Windows 7), Board: "Arduino/Genuino Uno"

C:\Users\jimbean\Desktop\Grinder_Timer_1_1\Grinder_Timer_1_1\Grinder_Timer_1_1.ino: In function 'void setup()':

Grinder_Timer_1_1:100: error: 'Init' was not declared in this scope

Init();

^

C:\Users\jimbean\Desktop\Grinder_Timer_1_1\Grinder_Timer_1_1\Grinder_Timer_1_1.ino: In function 'void loop()':

Grinder_Timer_1_1:125: error: 'Button_Led' was not declared in this scope

Button_Led(false);

^

Grinder_Timer_1_1:127: error: 'Grinder_Light' was not declared in this scope

Grinder_Light(1);

^

Grinder_Timer_1_1:130: error: 'Encoder_Counter_Grinder_Time' was not declared in this scope

Grinder_Run_Time_ms = Encoder_Counter_Grinder_Time();

^

Grinder_Timer_1_1:133: error: 'Button' was not declared in this scope

int TempButton = Button();

^

Grinder_Timer_1_1:141: error: 'Save_Grinder_Run_Time_To_EEPROM' was not declared in this scope

Save_Grinder_Run_Time_To_EEPROM(myEnc.read());

^

Grinder_Timer_1_1:149: error: 'ClearOLED' was not declared in this scope

ClearOLED();

^

Grinder_Timer_1_1:170: error: 'Button_Led' was not declared in this scope

Button_Led(true);

^

Grinder_Timer_1_1:172: error: 'Grinder_Light' was not declared in this scope

Grinder_Light(2);

^

Grinder_Timer_1_1:174: error: 'CountDownBar' was not declared in this scope

CountDownBar(Grinder_Run_Time_ms, true);

^

Grinder_Timer_1_1:180: error: 'UpdateLowerDisplay' was not declared in this scope

UpdateLowerDisplay((Grinding_Started + (Grinder_Run_Time_ms)-millis())/1000);

^

Grinder_Timer_1_1:194: error: 'UpdateLowerDisplayNOW' was not declared in this scope

UpdateLowerDisplayNOW(Grinder_Run_Time_ms/1000);

^

Grinder_Timer_1_1:197: error: 'ClearTopOLED' was not declared in this scope

ClearTopOLED();

^

Grinder_Timer_1_1:199: error: 'Save_Total_Run_Time_To_EEPROM' was not declared in this scope

Save_Total_Run_Time_To_EEPROM(Total_Runtime);

^

sorry the errors were to big to post them all but they are the same errors as timcoolguy on the issues page for this project on github
thanks jimbean

That's the same problem reported at Software Compile errors · Issue #2 · Espressobar/arduino-grind-timer · GitHub

Please do this:

By the way, I have submitted a pull request to fix this issue:

thanks pert its much appreciated taking the time to look in to this
i deleted the files download the zip again
i renamed the src file Grinder_Timer_1_1
opened the Grinder_Timer_1_1.ino
verify sketch but getting a Encoder.h error ive tried this with the file located on my descktop first then located in C:\Users\jimbean\Documents\Arduino\libraries
but get this same error
many thanks
Arduino: 1.8.5 (Windows 7), Board: “Arduino/Genuino Uno”

C:\Users\jimbean\Documents\Arduino\libraries\arduino-grind-timer-master\Grinder_Timer_1_1\Grinder_Timer_1_1.ino:14:21: fatal error: Encoder.h: No such file or directory

#include <Encoder.h>

^

compilation terminated.

exit status 1
Error compiling for board Arduino/Genuino Uno.
Invalid library found in C:\Users\jimbean\Documents\Arduino\libraries\arduino-grind-timer-master: C:\Users\jimbean\Documents\Arduino\libraries\arduino-grind-timer-master

This report would have more information with
“Show verbose output during compilation”
option enabled in File → Preferences.

Jimbean:
then located in C:\Users\jimbean\Documents\Arduino\libraries

Grinder_Timer_1_1 is a sketch, not a library. You should never put sketches in the C:\Users\jimbean\Documents\Arduino\libraries folder. You can put them anywhere else but not there. Otherwise it causes this warning on every compilation:

Jimbean:
Invalid library found in C:\Users\jimbean\Documents\Arduino\libraries\arduino-grind-timer-master: C:\Users\jimbean\Documents\Arduino\libraries\arduino-grind-timer-master

Please post a screenshot or directory listing of C:\Users\jimbean\Documents\Arduino\libraries.

hi pert ive tried a few different methods but mostly this is where ive been putting the 3 files in the image.
I’ve tried again these are the steps ive taken
download the zip file move to desktop extract here open the folder rename the src file Grinder_Timer_1_1
so ive not moved anything at this point i open Grinder_Timer_1_1.ino from the exstracted file on my desktop Arduino IDE then opens with the sketch i verify but get the Encoder.h error
Arduino: 1.8.5 (Windows 7), Board: “Arduino/Genuino Uno”

C:\Users\jimbean\Desktop\arduino-grind-timer-master\Grinder_Timer_1_1\Grinder_Timer_1_1.ino:14:21: fatal error: Encoder.h: No such file or directory

#include <Encoder.h>

^

compilation terminated.

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.

should this work or do i need to put the EEPROM, Encoder & DigoleSerial in a specific location there is a couple of locations for arduino library’s
lidraries\documents\arduino\libraries but also
computer > local disk (C:) > program files(86x) > arduino > libraries if i put the 3 files here they do show up in IDE when i go to sketch>include library>contributed libraries
Confused.com lol
many thanks jimbean

Jimbean:
should this work or do i need to put the EEPROM, Encoder & DigoleSerial in a specific location there is a couple of locations for arduino library's
lidraries\documents\arduino\libraries

Don't you mean C:\Users{user name}\My Documents\Arduino\libraries?

That is the correct location, assuming that File > Preferences > sketchbook location is set to C:\Users{user name}\My Documents\Arduino. Does the file C:\Users{user name}\My Documents\Arduino\libraries\Encoder\Encoder.h exist?

Jimbean:
but also
computer > local disk (C:) > program files(86x) > arduino > libraries

That should also work but it's a bad idea to install anything to C:\Program Files (x86)\Arduino because everything will be lost every time you update to a new version of the Arduino IDE.

Jimbean:
i put the 3 files here they do show up in IDE when i go to sketch>include library>contributed libraries

Do they show up under that menu when you don't have them installed in the IDE and do have them installed in C:\Users{user name}\My Documents\Arduino\libraries?

Don't you mean C:\Users{user name}\My Documents\Arduino\libraries?

sorry yes i did mean C:\Users{user name}\My Documents\Arduino\libraries

That is the correct location, assuming that File > Preferences > sketchbook location is set to C:\Users{user name}\My Documents\Arduino.

ah cool I've manged to get something correct :slight_smile: lol so with the EEPROM, Encoder & DigoleSerial files installed here should i open the Grinder_Timer_1_1.ino from the file in my desktop which automaticly opens the sketch in IDE or do i need to open IDE first then File> open> and navigate to the Grinder_Timer_1_1.ino both methods seem the same or do i need to place the .ino files somewhere inparticular?

Does the file C:\Users{user name}\My Documents\Arduino\libraries\Encoder\Encoder.h exist?

yes it does exist i opened it up and there is some code in there

Do they show up under that menu when you don't have them installed in the IDE and do have them installed in C:\Users{user name}\My Documents\Arduino\libraries?

hi pert i got it slightly wrong they show up in the IDE menu when insalled in C:\Users{user name}\My Documents\Arduino\libraries
they also show up in the IDE menu when installed in C:\Program Files (x86)\Arduino\libraries
but they dont show up in IDE menu when i remove them from either library
once again many thanks for taking the time to look at this many thanks jimbean

Jimbean:
so with the EEPROM, Encoder & DigoleSerial files installed here should i open the Grinder_Timer_1_1.ino from the file in my desktop which automaticly opens the sketch in IDE or do i need to open IDE first then File> open> and navigate to the Grinder_Timer_1_1.ino both methods seem the same or do i need to place the .ino files somewhere inparticular?

It's the same either way. The sketch can be anywhere. It's only the libraries that need to be installed to a specific location.

Yes Success i think lol sketch virifed and has uploaded after uploading it says
done uploading
sketch uses 16186 bytes (50%) of program storage space ...........
does this means its successful? going off using the blink scetch i think so :slight_smile:
is the yellow LED marked L supposed to be on all the time ?

i exstracted the zip to desktop renamed src folder Grinder_Timer_1_1
then put the 3 flies EEPROM, Encoder & DigoleSerial from the lib folder in C:\Users{user name}\My Documents\Arduino\libraries
opened Grinder_Timer_1_1.ino located in the desktop folder
i got 2 errors the #include "../Wire/Wire.h
but also 1 error about 2 EEPROM.h file
one in C:\Users{user name}\My Documents\Arduino\libraries EEPROM
one in C:\Program Files (x86)\Arduino\hardware\tools\avr EEPROM it said it was using this one so i deleted it then just got the wire.h error so changed "../Wire/Wire.h" to "Wire.h" and Bingo it verified and loaded
a really big thank you for sticking with me pert i nearly gave up lol its very much appreciated saved me much more head scratching just got to build it now :slight_smile:
many thanks jim bean

Glad to hear you got it working. Happy grinding!

hi there I’ve just received the oled screen so just testing the circuit to make sure everything is working but the program wont start it stays on the digole start screen
i converted the screen from UART to IC2 also the code seems to define IC2 not UART
the original project was a couple of years ago i did notice there firmware for the oled was 2.1 mine is 4.2B
I’ve checked the digole website and it says the latest firmware is backward compatible with older firmware’s
I’ve reloaded the code and there was no errors
Ive tried with just the oled connected to the arduino just in case i had a wrong connection to the encoder or button
would the program still run with just the oled connected?
do i need to do something to start the program for the first time or should it just start once every thing is connected and powered on?
many thanks jimbean

lol halfway there I pressed the reset button a couple of times and its loaded the seconds screen for the timer but there a bit jumbled (see image) also nothing happenns when the encoder is moved or the button pressed but that maybe my connections lol i need to get them double checked
there was similar problems in the original thread this project was started in
arduino grinder timer it is in danish
after ive checked my connections there was a forum member who adjusted the oled code and posted anew one so i might try that if all else fails