piface / pifacedigital-scratch-handler

Allows Scratch to control PiFace Digital through MESH.
GNU General Public License v3.0
9 stars 5 forks source link

More than one piface with scratch? #6

Open BerryGatherer opened 9 years ago

BerryGatherer commented 9 years ago

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 commented 9 years ago

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 commented 9 years ago

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