LInterp – A linear-interpolation PROGMEM array generator

Generate large interpolation/translation/lookup arrays in PROGMEM just using an include file on *any* Arduino board.

Aug 17, 2022

2449 views

0 respects

Components and supplies

1

Arduino UNO

1

Rotary Potentiometer - 100k Ohm, Logarithmic (Panel Mount)

Project description

Code

LInDev.h

h

Generic outline header to virtualise a non-linear analog device as a linear function using the LInterp.h PROGMEM interpolation array generator

PotUnLog.ino

arduino

Example Arduino program using LInterp.h to linearise part of the range of a logarithmic potentiometer

LInDev.h

h

Generic outline header to virtualise a non-linear analog device as a linear function using the LInterp.h PROGMEM interpolation array generator

LInterp.h

h

Arduino C-compiler pre-processor script to generate interpolation / translation / lookup arrays in PROGMEM

PotUnLog.ino

arduino

Example Arduino program using LInterp.h to linearise part of the range of a logarithmic potentiometer

Downloadable files

Logarithmic potentiometer

Produces a non-linear voltage increase with rotation angle attached to an analog input

Logarithmic potentiometer

Logarithmic potentiometer

Produces a non-linear voltage increase with rotation angle attached to an analog input

Logarithmic potentiometer

Comments

Only logged in users can leave comments