X9C103S is a light Arduino library to control X9C103S digital potentiometers. This library allows you to easily set, increase, and decrease the resistance of the X9C103S potentiometer.
.pio/libdeps/nanoatmega328/X9C103S/src/X9C103S.cpp: In member function 'void X9C103S::setResistance(int)': .pio/libdeps/nanoatmega328/X9C103S/src/X9C103S.cpp:28:3: error: expected ',' or ';' before 'if' if (diff > 0) { ^~ .pio/libdeps/nanoatmega328/X9C103S/src/X9C103S.cpp:26:13: warning: unused variable 'diff' [-Wunused-variable] int diff = _value - _resistance ^~~~ .pio/libdeps/nanoatmega328/X9C103S/src/X9C103S.cpp:30:5: error: expected '}' before 'else' } else { ^~~~ .pio/libdeps/nanoatmega328/X9C103S/src/X9C103S.cpp:31:4: error: 'diff' was not declared in this scope diff *= -1 ^~~~ .pio/libdeps/nanoatmega328/X9C103S/src/X9C103S.cpp:31:4: note: suggested alternative: 'div' diff *= -1 ^~~~ div .pio/libdeps/nanoatmega328/X9C103S/src/X9C103S.cpp:35:29: error: 'diff' was not declared in this scope for (int i = 0; i < diff; i++) { ^~~~ .pio/libdeps/nanoatmega328/X9C103S/src/X9C103S.cpp:35:29: note: suggested alternative: 'div' for (int i = 0; i < diff; i++) { ^~~~ div .pio/libdeps/nanoatmega328/X9C103S/src/X9C103S.cpp: At global scope: .pio/libdeps/nanoatmega328/X9C103S/src/X9C103S.cpp:44:1: error: expected declaration before '}' token } ^ *** [.pio/build/nanoatmega328/lib322/X9C103S/X9C103S.cpp.o] Error 1