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

More than one piface with scratch? #6

Open
BerryGatherer opened this issue Apr 7, 2015 · 2 comments
Open

More than one piface with scratch? #6

BerryGatherer opened this issue Apr 7, 2015 · 2 comments

Comments

@BerryGatherer
Copy link

Hi!

Can't find a way to use more than one piface with a pirack in scratch on a raspberry Pi.
Is it possible to implement this in the scratch handler?

Thanks.

Can this work also with byob/Snap! ?

@tompreston
Copy link
Member

Probably, you can specify which board number you are talking to by giving arguments to the PiFace Digital object initialiser on this line.

See: http://pifacedigitalio.readthedocs.org/reference.html#pifacedigitalio.core.PiFaceDigital

So, you can say:

import pifacedigitalio
pfd1 = pifacedigitalio.PiFaceDigital(hardware_addr=1)

I'm not sure how to integrate this into scratch at the moment though. Probably by changing the sensors presented. Unfortunately, I don't have time to work this in at the moment because we're extremely busy with the CodeBug project but if anyone wants to submit a pull request I'd be happy to review, test, merge and upload the package. :)

@BerryGatherer
Copy link
Author

Thank you fort your hints, but i could not manage. Is there a chance to get this working more easy?

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

2 participants