avr: set ADLAR bit in ADC to get a value scaled to 16-bit

This commit is contained in:
Ayke van Laethem
2018-09-20 21:24:41 +02:00
parent 40f834d58f
commit de694b5857
2 changed files with 7 additions and 5 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ func main() {
for {
val := sensor.Get()
if val < 512 {
if val < 0x8000 {
led.Low()
} else {
led.High()