Skip to content

Small "Doc Bug" in "circuitpython.readthedocs.io/en/latest/shared-bindings/countio/index.html" #4352

Closed
@ThomasAtBBTF

Description

@ThomasAtBBTF

The small example in the section above contains an small error:

import countio
import time
from board import *

# error "board not defined" here -> pin_counter = countio.Counter(board.D1)
pin_counter = countio.Counter(D1) # this is the fix
#reset the count after 100 counts
while True:
    if pin_counter.count == 100:
        pin_counter.reset()
    print(pin_counter.count)

Thomas

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions