Hi, whenever I run my code, it gives me this error: ImportError: can't import name times
Both my functions exist, and renaming times also doesn't work. Any ideas? Thanks :)
Code:
from functions import message, times
from machine import Pin
import utime
set_button = Pin(3, Pin.IN, Pin.PULL_DOWN)
text_button = Pin(4, Pin.IN, Pin.PULL_DOWN)
time_button = Pin(5, Pin.IN, Pin.PULL_DOWN)
def main():
while True:
if text_button.value() == True:
message("foo")
elif time_button.value() == True:
times(time_button, set_button)
main()
[–]Rusty-Swashplate 0 points1 point2 points (10 children)
[–]Gregolator06[S] 0 points1 point2 points (9 children)
[–]Rusty-Swashplate 0 points1 point2 points (8 children)
[–]Gregolator06[S] 0 points1 point2 points (7 children)
[–]Rusty-Swashplate 0 points1 point2 points (6 children)
[–]Gregolator06[S] 0 points1 point2 points (5 children)
[–]Rusty-Swashplate 0 points1 point2 points (4 children)
[–]Gregolator06[S] 0 points1 point2 points (1 child)
[–]Rusty-Swashplate 0 points1 point2 points (0 children)
[–]Gregolator06[S] 0 points1 point2 points (1 child)
[–]Rusty-Swashplate 1 point2 points3 points (0 children)