Arduino lookup table...best way to do this?


hi,

i want implement look-up table of sorts, in order control 2 stepper motors (might servos start with).

anyway, want able pass parameter variable, , then, based on parameter (for example voltage reading), return degree value servo one, , degree value servo two, move particular location (i guess same implemented steppers....).

my challenge how create such table, , have referenced through function/example sketch....

for example, this:

voltage =1.2 => servo 1 go 23deg,, servo 2 go 50 deg..
voltagre= 1.5 => servo 1 goto 30 deg, servo2 go 120 deg...
.
.
.
.
.

table have have 100 or more such values, depending on memory off course  (thinking have table on flash card)...

any idea?

quote
any idea?


sure...

minimum , maximum voltage values?

if voltage doesn't match table entry, want to
  (a) use lower voltage table?
  (b) use higher voltage table?
  (c) interpolate?


Arduino Forum > Using Arduino > Programming Questions > Arduino lookup table...best way to do this?


arduino

Comments

Popular posts from this blog

Thread: PKI Client 5.00 install (for eToken Pro)

ATmega2560-Arduino Pin Mapping

Crossfader Arduino Tutorial