There must be a better way....How??
Posted: Mon Jan 26, 2009 3:45 am
I was just playing with something and noticed how tedious it was to get what I want accomplished. This came from an Idea to make a scale of sorts where a pressure sensor measures weight. The program lets you pick a low limit on an ADC component (the scale) and sets that at zero percent. Then you set the high end of the scale by moving the ADC to where you want. The code subracts the low reading from the high reading to get the range then divides it by "10" so either led's or an LCD can show each 10 percent increment as you move the ADC around that range.
The problem I was finding is how much it took to get get they LED's or LCD to display the 10% increments I want....What if I wanted to show every percent instead of every 10? It would take days if I had to put code in 100 times for each percent the way Ive done it with 10%. Id really be grateful if someone could take a look at my code and explain a better way of doing it....or make a simple example and let me see what it looks like so I can try myself. THANKS!!
The problem I was finding is how much it took to get get they LED's or LCD to display the 10% increments I want....What if I wanted to show every percent instead of every 10? It would take days if I had to put code in 100 times for each percent the way Ive done it with 10%. Id really be grateful if someone could take a look at my code and explain a better way of doing it....or make a simple example and let me see what it looks like so I can try myself. THANKS!!