Skip to content

Instantly share code, notes, and snippets.

@asciant
Created June 12, 2016 23:42
Show Gist options
  • Save asciant/a0c1d9c1084f0be0b4f35624d0c6cd71 to your computer and use it in GitHub Desktop.
Save asciant/a0c1d9c1084f0be0b4f35624d0c6cd71 to your computer and use it in GitHub Desktop.
lm75
#!/bin/bash
while true;
do
i2cget -y 1 0x48 0x00 w |
awk '{printf("%.1f\n", (a=( \
(("0x"substr($1,5,2)substr($1,3,1))*0.0625)+0.1) \
)>128?a-256:a)}'
sleep 3
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment