Skip to content

Fixed length pin string names #180

@PeteLawler

Description

@PeteLawler

So I'm of the habit that when I'm dealing with numbers or strings of generally a specified length, that I include leading 0's if needs be.

Thus in a numbering scheme where we go from 0 to 99, I'll tend to use 00, 01, 02, 03... etc. up to 99. This can make, if I need to, string manipulation easier.

After a month or two of tracking down a 'bug', I've finally nailed it. Can you see where I'm going?

Bug:
SystemError: returned NULL without setting an error

Cause:
GPIO.setup("P8_07", OUT )
Fix:
GPIO.setup("P8_7", OUT )

I'm wondering if, apart from within source, this should be noted on the README, or whether the source could be updated. I'm not sure about the latter because I don't quite know about external compatibilies you may be wishing to maintain. I'm happy to do any diff, just eager for any guidance....

I can't believe... ok I can... that it took this long to track down.

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