Arduino based LDR volume and source selection controller

Copy the libraries into \My Documents\Arduino\libraries folder and try
I have done that.
Now I have installed the Arduino 1.6.13 to another PC and placed the libraries in both /program files and /documents and when I try to compile I get this:

Arduino: 1.6.13 (Windows 10), Board: "Arduino Nano, ATmega328"

C:\Users\Karsten\Desktop\firmware_LDR_v1.0\firmware_LDR_v1.0.ino:13:31: fatal error: LiquidCrystal_I2C.h: No such file or directory

#include <LiquidCrystal_I2C.h>

^

compilation terminated.

exit status 1
Error compiling for board Arduino Nano.

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

But this file IS in the library folders..?????????????:(:confused:
 
When I use the "show verbose...etc" I get this:
Arduino: 1.6.13 (Windows 10), Board: "Arduino Nano, ATmega328"

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Karsten\Documents\Arduino\libraries -fqbn=arduino:avr:nano:cpu=atmega328 -ide-version=10613 -build-path C:\Users\Karsten\AppData\Local\Temp\arduino_build_945703 -warnings=none -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose C:\Users\Karsten\Desktop\firmware_LDR_v1.0\firmware_LDR_v1.0.ino
C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Karsten\Documents\Arduino\libraries -fqbn=arduino:avr:nano:cpu=atmega328 -ide-version=10613 -build-path C:\Users\Karsten\AppData\Local\Temp\arduino_build_945703 -warnings=none -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose C:\Users\Karsten\Desktop\firmware_LDR_v1.0\firmware_LDR_v1.0.ino
Using board 'nano' from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr
Using core 'arduino' from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr
Detecting libraries used...
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10613 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\eightanaloginputs" "C:\Users\Karsten\AppData\Local\Temp\arduino_build_945703\sketch\firmware_LDR_v1.0.ino.cpp" -o "nul"
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10613 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\eightanaloginputs" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src" "C:\Users\Karsten\AppData\Local\Temp\arduino_build_945703\sketch\firmware_LDR_v1.0.ino.cpp" -o "nul"
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10613 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\eightanaloginputs" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src" "C:\Users\Karsten\AppData\Local\Temp\arduino_build_945703\sketch\firmware_LDR_v1.0.ino.cpp" -o "C:\Users\Karsten\AppData\Local\Temp\arduino_build_945703\preproc\ctags_target_for_gcc_minus_e.cpp"
C:\Users\Karsten\Desktop\firmware_LDR_v1.0\firmware_LDR_v1.0.ino:13:31: fatal error: LiquidCrystal_I2C.h: No such file or directory

#include <LiquidCrystal_I2C.h>

^

compilation terminated.

Using library Wire at version 1.0 in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire
exit status 1
Error compiling for board Arduino Nano.
 
Clearly, there is a problem wiht the build environment - the compiler cannot find one of the header (.h) files. The previous comments all seem sensible, Find the header file you need (LiquidCrystal_I2C.h ?) and put it in the build path, or fix your directory search paths...
 
Putting the file on the desktop does not guarantee it's found - check and fix the build search paths... (ok, I'm unix based, but it's the same...)
This file was already in the directories where Arduino searches (/documents/arduino/libraries and /programfiles(x86)/arduino/libraries)
I just placed copies of the file in the directory where the firmware_LDR_v.1.0.ino is placed...
 
This makes absolutely no sense to me.
No matter what computer I use, no matter where I place copies of LiquidCrystal_i2C.h no matter what version of Arduino IDE I use the same error occurs. And I have checked the path where Arduino IDE searches and it finds all the other files in the same directory where this file also is.
Why is it that Arduino cannot find the file???
I have even reentered the the name in both the file name and in the source code, just to be sure there were no spelling errors.
Why is it just @ my place this happens??
Could some of you try the same thing:
Download Arduino 1.6.1x , download Firmware_LDR_V1.0 including the libraries and try to compile it?
 
It took me a while before it worked too.
So here are the files that worked for me :
View attachment 598826
delete everything you have now and put "adafruit, liquidcrystal and pinchange" to the documents library.
I work with win10 too; arduino version is 1.6.1.

Regards,
Ronny

THANKS A MILLION!!!!!!!!!!
That worked!
Finally I can go on.
Now I only have to check to see if the OLED version also works, as this is the display I am using
 
At first page of the thread Vincent stated the above about target resistance

Yeap I read that, I was thinking that those numbers improved in subsequent revisions. A 10k stepped attenuator it is observed that best clarity of sound stage is usually at 0.1% or better 0.01% .

I am not trying to criticize this project that was made available so graciously by Vincent just thinking on how to improve such LDR attenuator.
 
Thanks to Vincent77 & an AIW board purchased from ZDR. I now have this all up and running on the bench. What a brill project :up::up::up:

I spent a while trying to debug Error 20 but this ended up being a mis-soldered connection to one of the mosfets cos of the SOT footprint and me soldering them to a board designed for thier descrete counterparts.

I used ZDR's modded code so I could use an OLED display. It is one of the 0.96" ones that I had from another project but I'm planning to go for a larger white one.

Is there anyway to get the volume bar to redraw correctly on fast updates (rotations) of the encoder? At the moment if I'm too heavy handed with the knob the bar breaks up.

I need to spend time looking at the code because I'd like to make the maintenace menu less prominent. Maybe make the "Exit"option selected by default for a quick exit or make the menu only available with a long press etc. Just thinking out aloud.
 

Attachments

  • IMG_2547.jpg
    IMG_2547.jpg
    938.6 KB · Views: 531
  • IMG_2548.jpg
    IMG_2548.jpg
    838.6 KB · Views: 505
  • IMG_2549.jpg
    IMG_2549.jpg
    866.2 KB · Views: 493
Last edited:
Neb, Have a look at getAttFromStep (around line 980). There is a potential discontinuity at 40% of the number of steps you have nominated. Also see post #64.

I only now went about checking this. I don't think it's a problem anywhere in calibration, as static values are spot on. Problem is dynamic transition from step A to step B - volume drops for a fraction of a second, then quickly settles back right where it should be. Maybe culprit is switching from low current to high current mode (and vice versa)?