Skip to content
Discussion options

You must be logged in to vote

Sorry, I thought I highlighted that code properly. I'm using micropython v1.21.0 (2023-10-06). Yes, the code runs and the LED is flashing, but I don't understand the ambiguous traceback error. I'm not manually interrupting the program and the syntax is fine, so it seems to me I shouldn't see any Traceback message.

An example of other code that is not executing properly not be executing was like this:

from machine import Pin, PWM
from time import sleep

RPM=2900

sleep(.0001)    
duty= int((float(RPM)+3908.7)/.3406)
print(duty)
Brush=PWM(Pin(17))
Brush.freq(1000)
while True: 
    Brush.duty_u16(duty)

and the error reads:

Line 12 is the last line of this code.

In the meantime, I have recr…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@keswitzer1
Comment options

Answer selected by keswitzer1
@sophiedegran
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants