Pin Example Error

Discussion related to "under the hood" OpenMV topics.
ARedGear
Posts: 11
Joined: Tue Oct 01, 2019 4:56 pm

Pin Example Error

Postby ARedGear » Tue Oct 08, 2019 8:59 am

Hey all,

I went to run this example model from this documentation:
http://docs.openmv.io/library/machine.P ... d%20signal

but when I do I get an error "TypeError: Can't convert 'int' object to str implicitly"

Am I doing something wrong here? I'm trying to read in a 3.3 volt singal from the main board.
User avatar
iabdalkader
Posts: 1141
Joined: Sun May 24, 2015 3:53 pm

Re: Pin Example Error

Postby iabdalkader » Tue Oct 08, 2019 9:32 am

Hi, use strings for pin names/numbers ex: "P0", "P2" etc...
ARedGear
Posts: 11
Joined: Tue Oct 01, 2019 4:56 pm

Re: Pin Example Error

Postby ARedGear » Tue Oct 08, 2019 9:47 am

When trying this it still throws the same error.

I tried:
X = Pin(0, Pin.OUT)

No luck =/
User avatar
kwagyeman
Posts: 3806
Joined: Sun May 24, 2015 2:10 pm

Re: Pin Example Error

Postby kwagyeman » Tue Oct 08, 2019 10:14 am

Pin("P0", ...)
Nyamekye,
ARedGear
Posts: 11
Joined: Tue Oct 01, 2019 4:56 pm

Re: Pin Example Error

Postby ARedGear » Tue Oct 08, 2019 10:20 am

That fixed it! Thank you!

Return to “Technical Discussion”

Who is online

Users browsing this forum: Google [Bot], MSN [Bot] and 4 guests