Yes, and it seems that we shouldn't be too worried about jitter in the
values during charging, or what?
The script:
[EMAIL PROTECTED]:~$ cat get-batt-value.sh
#!/bin/sh
count=1
while [ "$count" -le "$1" ]
do
printf "%d. " $count
battvolt=$(cat `find /sys | grep battvolt`)
printf "%d\n" $battvolt
sleep 2
let count=count+1
done
Produced:
[EMAIL PROTECTED]:~$ sh get-batt-value.sh 10
1. 3884
2. 3890
3. 3931
4. 3890
5. 3890
6. 3890
7. 3896
8. 3878
9. 3878
10. 3890
Not so bad I guess, I am not familiar with battery characteristics, but
a little surprised anyway :-)
Peter
Shakthi Kannan wrote:
Hi,
On 8/11/07, Joe Pfeiffer <[EMAIL PROTECTED]> wrote:
Why the cat command? Just
find /sys | grep battvolt
will do the same thing.
The above will only display
/sys/devices/platform/s3c2410-i2c/i2c-0/0-0008/battvolt, and not its
value. Hence you need to cat it.
SK