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

#1 2009-07-18 05:10:15

redware
Scratcher
Registered: 2007-05-21
Posts: 92

Can we have some technical information on scratch sensors please ?

I am struggling a little with writing a server to access the "enable remote sensors" feature. I have the basics working and can issue the following commands:
broadcast "cat"
broadcast "Scratch-StartClicked"
sensor-update "fred" 22.5

It seems that the quotation marks are not necessary and you can also send a string value to a semote sensor.

However this does not seem to work with the scratch board sensors. So if you try to update the slider sensor - it creates you a new sensor variable insread of updating the sensor board value. There must be a trick here.

So I have two questions:
1. How to update the scratch board sensors using the scratch connection on port 42001.
2. Are there more options to communicate with scratch beyong boradcast and snsor update ?

A technical specification would be nice. I have seen John Maloneys protocol document and looked on the connections wiki. There seems to be a link mentioned in the forums to the following document but it is no longer there.

http://scratch.mit.edu/files/scratchboard/ScratchBoard_Tech_InfoR1.pdf

I know 'enable remote sensors' is beta but it looks pretty good to me and I want to use it. Anyone got any documentationf for me ?

Thanks.

Stamati at redware

Offline

 

#2 2009-07-18 06:43:10

lxt
Scratcher
Registered: 2008-07-11
Posts: 27

Re: Can we have some technical information on scratch sensors please ?

I'm not sure what you're trying to do - what's the benefit to being able to update the Pico Board sensors without a pico board? Presumably you could just create your own sensing variables, and update those. I am not sure if you will be able to 'overwrite' the sensor board blocks through the networking protocol. From memory, the file you linked to above is really about hardware specs of the Pico Board, rather than networking protocols.

Offline

 

#3 2009-07-18 11:55:21

chalkmarrow
Scratcher
Registered: 2007-05-18
Posts: 100+

Re: Can we have some technical information on scratch sensors please ?

I believe that the external sensor variables from the picoboard can only be updated by the picoboard through the serial/usb connection, not by some other entity through the socket connection(s).

Last edited by chalkmarrow (2009-07-18 11:58:33)

Offline

 

#4 2009-07-18 12:07:10

Magnie
Scratcher
Registered: 2007-12-12
Posts: 1000+

Re: Can we have some technical information on scratch sensors please ?

The ZionPlug was pretty good for changing sensors without a Pico/Scratch Board. (scratch connections site)

Offline

 

#5 2009-07-19 00:31:22

chalkmarrow
Scratcher
Registered: 2007-05-18
Posts: 100+

Re: Can we have some technical information on scratch sensors please ?

Yep.The virtual zionboard apparently updates the sensor values without having a sensor board attached, so you may want to look at its code. I suspect that it does not use a port 42001 TCP socket for that, though, but I could be wrong...

Offline

 

#6 2009-07-20 03:59:59

billyedward
Scratcher
Registered: 2008-01-03
Posts: 500+

Re: Can we have some technical information on scratch sensors please ?

I am afraid you have done all that is possible.
There is nothing more you can do besides sensors and broadcasts, and you cannot update scratch board sensors. You can, however, use variables to get the sensor values, and toggle between setting them based on the actual sensor or virtual ones.


"I'd love to change the world, but they haven't released the source code yet."
Check out the latest version of Streak --> http://billy.scienceontheweb.net/Streak

Offline

 

#7 2009-07-20 15:22:31

redware
Scratcher
Registered: 2007-05-21
Posts: 92

Re: Can we have some technical information on scratch sensors please ?

Thanks for the responses....

I was looking at this post on the scratch connections wiki which seemed to update the scratchboard sensors - http://scratchconnections.wik.is/User:Sburlappp/Emulating_a_ScratchBoard_with_an_Arduino

Looking at is again following the comments above - it is probably updating the serial port as suggested by chalkmarrow although I cannot quite work out the bits and bytes and presumably it is trying to communicate on COM1.

The reason that I want to know how it is done is because it would be nice if we were using different hardware at school to connect using the real sensors. I suppose it is only cosmetic and the remote sensors will do. If I could do it through port 42001 I would have a go but I do not want to add serial port connectivity to my skill set right now.

I would have a look at the source code in Scratch but it is in some sort of image file and although I downloaded squeak - it is not really obvious how to open the code. For the same seasons I am not sure if I have done everything I can on the remore sensors. For example - if we can broadcast "Scratch-StartClicked" it would make sense maybe that there is "Scratch-StopClicked".

Thanks again for the responses....

Offline

 

Board footer