Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
03/28/08 00:32
Read: times


 
#152637 - Hey function lovers....how would you handle this?
I have an interesting task in which the following is happening:

Using the ADC from 00-FF monitoring a pot. As a result of its location in the range, I have to adjust 4 seperate sliding scaling values within a limit range. L-0 are just the unsigned char place holders which are being pulled and saved to the eeprom seperate locations

L: Limits 10-35
M: Limits 30-45
N: Limits 60-80
0: Limits 25-40

By default, on startup, each one will be stored in the EEprom and will have the initial value of whatever the middle of each range is. It should correlate as 80 on the pot will yield middle of each range.

If the pot hits 00 then each will be at its defined lower limits, and conversely if FF at the upper limits as defined.

Since each one has a different range and scale, simple incrementation will not work through each loop iteration. I would like to "gang" them together as a singular function.

I can try to weight them, but it becomes cumbersome, I kind of know the direction I want to go with it, but would like an alternate opinions one the most efficient approach. Any thoughts....?

List of 14 messages in thread
TopicAuthorDate
Hey function lovers....how would you handle this?            01/01/70 00:00      
   Scale and offset?            01/01/70 00:00      
      kinda.....but dependant            01/01/70 00:00      
   I'm not sure of what you want..            01/01/70 00:00      
      Ah....clarity            01/01/70 00:00      
      Nitpicking            01/01/70 00:00      
         Yes, but whats a .1 among friends?            01/01/70 00:00      
   Overlap            01/01/70 00:00      
      The overlap is proper            01/01/70 00:00      
         RE: not sure why one would do that            01/01/70 00:00      
            in the example give            01/01/70 00:00      
               Now I understand!            01/01/70 00:00      
   Like this            01/01/70 00:00      
      Wow Russ....very nice piece of code there            01/01/70 00:00      

Back to Subject List