I've been making enable differential input (and also gain enable) on Arduino ADC by add wiring_differential.c into arduino library. I try to recording sinewave with 2 V amplitude (generate from signal generator) without DC offset. It looks like this while i graph it on spreadshet,
rtyson:
For some reason the page's information for those library links are not working. Is there any possibility that I could get that library another way?
I ended up manipulating the ADC register manually as this library didn't work for the Tiny 84, though you have to ensure you do everything in the right order, including waiting a while after enabling the ADC/changing some bits for it to stabilise. It's not too difficult though.
I tried to compile the code and get an error 'multiple definitions] of analogReference'. How to go about fixing this?
Copied the error message below.
sketch/DifferentialArduino.ino.cpp.o: In function analogReference': sketch/wiring_differential.c:38: multiple definition of analogReference'
sketch/wiring_differential.c.o:sketch/wiring_differential.c:38: first defined here
sketch/DifferentialArduino.ino.cpp.o: In function analogReference': sketch/wiring_differential.c:38: multiple definition of analog_reference'
sketch/wiring_differential.c.o:sketch/wiring_differential.c:38: first defined here
core/core.a(wiring_analog.c.o): In function analogReference': /Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/wiring_analog.c:35: multiple definition of analogReference'
sketch/wiring_differential.c.o:sketch/wiring_differential.c:38: first defined here
core/core.a(wiring_analog.c.o): In function analogReference': /Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/wiring_analog.c:35: multiple definition of analog_reference'
sketch/wiring_differential.c.o:sketch/wiring_differential.c:38: first defined here
collect2: error: ld returned 1 exit status
exit status 1
Error compiling.