This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2013-05-01 09:12:48

New Scratcher
Registered: 2013-05-01
Posts: 1

Python and remote sensor protocol

Hi everybody,

I wanted to connect to scratch 1.4. running on win7 via remote sensor ctrl through python from my linux laptop.

1) In scratch, I did click "enable remote sensor connections" as suggested in the wiki.
2) I wrote a scratch Programm: "When i receive hallo turn 15 degrees". I started the script.
3) i connected from python3 on my other computer via
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(('', 42001))

I received 20, obviosly the length of the transmitted string. Moreover, wireshark showed the communication:
my laptop sending the command, the scratch pc responding with 20.

But in scratch nothing happens, i.e. the cat didn't turn 15 degrees.

Can someone help please?
Thanks, Markus



Board footer