Skip to content

Commit

Permalink
Minor update to class code
Browse files Browse the repository at this point in the history
  • Loading branch information
slabua committed Mar 23, 2024
1 parent 7883815 commit ec81084
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 21 deletions.
26 changes: 6 additions & 20 deletions OLED/picomotodash_gps.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,23 +95,9 @@ def __exit__(self, exception_type, exception_value, traceback):


if __name__ == "__main__":
pass
# from machine import PWM
# from utime import sleep

# pwm2 = PWM(Pin(2))
# pwm2.freq(800)
# pwm2.duty_u16(32768)

# rpm = RPM(pin=pin, factor=PWM2RPM_FACTOR)

# while True:
# _ = rpm.rpm()
# if not rpm.timeout:
# print(rpm.RPM_ESTIMATE)
# else:
# print("TIMEOUT", rpm.RPM_ESTIMATE)
# sleep(0.5)
# rpm.reset()

# sleep(0.02)
gps = GPS(local_offset=9, location_formatting="dd")

while True:
gps.update_gps()

sleep(0.5)
2 changes: 1 addition & 1 deletion OLED/picomotodash_rpm.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def __exit__(self, exception_type, exception_value, traceback):
rpm = RPM(pin=pin, factor=PWM2RPM_FACTOR)

while True:
_ = rpm.estimate_rpm()
rpm.estimate_rpm()
if not rpm.timeout:
print(rpm.RPM_ESTIMATE)
else:
Expand Down

0 comments on commit ec81084

Please sign in to comment.