silver2row

replace_seek_and_Write

Apr 9th, 2026
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. # Testing on Fading
  2. while True:
  3. f.seek(0)
  4. f.write(str(round(pwmPeriod*brightness)))
  5. brightness += step
  6. if(brightness >= max or brightness <= min):
  7. step = -1 * step
  8. time.sleep(ms/1000)
Advertisement
Add Comment
Please, Sign In to add comment