Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PCA9685.py -- raise ValueError('Reading Pi type error, Your Pi "{0}"" is not in the list #21

Open
vshomepi opened this issue Jun 10, 2017 · 2 comments

Comments

@vshomepi
Copy link

vshomepi commented Jun 10, 2017

This is occurring on a Raspberry PI ZERO. Other versions I've used 2 and 3 are working fine.

UPDATE: The library does work by defaulting the bus to 1. NOT recommended... It does get me by for now.

def _get_bus_number(self):
	pi_type = GPIO.RPI_INFO['TYPE']
	print ('----------pi_type----------')
	print (pi_type)
	print ('---------------------------')
	if pi_type in self._BUS_0_TYPES:
		bus_number = 0
	elif pi_type in self._BUS_1_TYPES:
		bus_number = 1
	else:
		bus_number = 1
		#raise ValueError('Reading Pi type error, Your Pi "{0}"" is not in the list.\n  Please post an Issus at our Github Page or contract us\n    Github page: https://github.com/sunfounder/Sunfounder_Smart_Video_Car_Kit_for_RaspberryPi/issues\n    Email: [email protected]\n    SunFounder'.format(pi_type))
@sunfounder
Copy link
Collaborator

Can you post out your error information for us, sothat we could solve this problem for the others, thank you.

@vshomepi
Copy link
Author

Please note the else statement and the commented out line. This is the error I see. Now see the print statements. The "pi_type" variable displays "unknown", this was causing the raise statement to execute. Hope this helps...

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

No branches or pull requests

1 participant