update to LOLIN32 Lite compatibility

This commit is contained in:
Silver Kuusik 2018-03-24 17:59:52 +02:00 committed by GitHub
parent 14dd893df3
commit 32f9e26ef9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

6
hal.py
View File

@ -32,7 +32,7 @@ class Sumorobot(object):
pwm_right = PWM(Pin(4), freq=50, duty=0) pwm_right = PWM(Pin(4), freq=50, duty=0)
# bottom LED # bottom LED
bottom_led = Pin(5, Pin.OUT) bottom_led = Pin(22, Pin.OUT)
# bottom LED is in reverse polarity # bottom LED is in reverse polarity
bottom_led.value(1) bottom_led.value(1)
# sensor LEDs # sensor LEDs
@ -43,6 +43,10 @@ class Sumorobot(object):
# battery gauge # battery gauge
adc_battery = ADC(Pin(32)) adc_battery = ADC(Pin(32))
# the pullups for the phototransistors
Pin(19, Pin.IN, Pin.PULL_UP)
Pin(23, Pin.IN, Pin.PULL_UP)
# the phototransistors # the phototransistors
adc_line_left = ADC(Pin(34)) adc_line_left = ADC(Pin(34))
adc_line_right = ADC(Pin(33)) adc_line_right = ADC(Pin(33))