piface / pifacedigitalio

The PiFace Digital input/output module.
GNU General Public License v3.0
110 stars 48 forks source link

Problems with PiFace Emulator and Scratch #15

Open bobsparkes opened 10 years ago

bobsparkes commented 10 years ago

I have three PiFaces connected to a PiRack, which work well with python3 commands of the type p.digital_write(0,1,2) to switch on LED 0 on Board 2. I have downloaded the newest version of the Emulator (my RPi says it's the newest version), but this does not look like the picture of one as shown in the PiFace Guide; mine does not have the "View" option, so I cannot select which Board number I wish to address. Is there something else I need to do?

Similarly, I want to use these PiFaces with Scratch. I have carried out all the Guide instructions to enable Scratch to be used with the PiFace, but my version of Scratch does not produce the option to “Host Mesh” or “Join Mesh” when I shift-click the Share option. Instead I get “Stop Hosting Mesh” so, again, I assume I have an earlier version of Scratch, even though the RPi assures me I have the newest version. I cannot therefore configure the control instructions to talk to the PiFace at all (not even to Board 0) . Could someone please tell me what to try next?

tompreston commented 10 years ago

Ah, it appears that the documentation on our main website is out of date. I've put it on the todo list.

The latest version does not have a view control. Instead, a new window is created when you make a new PiFace Digital instance. For example (with only PiFace Digital 0 connected):

python3
>>> import pifacedigital_emulator
>>> pfd0 = pifacedigital_emulator.PiFaceDigital(0)
>>> pfd1 = pifacedigital_emulator.PiFaceDigital(1)
No PiFace Digital detected, running without PiFace Digital.
>>>

This will bring up two emulator windows. You can put this into a script if you like for quick launching.

'Stop hosting mesh' sounds like MESH is already running. Does the scratch handler not work?