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

#1 2008-09-17 19:28:54

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

Projects with remote sensors

Hi all,
I'd be really interested to hear what kinds of projects people might be cooking up with the remote sensor functionality in 1.3...I've been using it to introduce additional sensor functionality for use in end-user projects - for example, I have a small Processing/Java applet that provides Scratch with x/y co-ordinates for trackable objects moved in front of a camera (eg, moving a paper cut-out of a sprite in front of a camera results in the same sprite moving inside of Scratch).

Obviously fairly complicated to program, but for an end-user they have instant access via the sensor blocks to some new 'virtual' sensors to play with. I know there's a potential to use this functionality to interface with devices such as motors, accelerometers, etc - what kinds of things are people using remote sensors for?

Offline

 

#2 2008-09-17 23:14:51

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

Re: Projects with remote sensors

lxt:

That sounds extremely cool. I've been working a bit with interfacing with an Arduino board using Processing:

http://sites.google.com/site/chalkmarrowfiles/

Offline

 

#3 2008-09-18 04:43:46

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: Projects with remote sensors

lxt wrote:

Hi all,
I'd be really interested to hear what kinds of projects people might be cooking up with the remote sensor functionality in 1.3...I've been using it to introduce additional sensor functionality for use in end-user projects - for example, I have a small Processing/Java applet that provides Scratch with x/y co-ordinates for trackable objects moved in front of a camera (eg, moving a paper cut-out of a sprite in front of a camera results in the same sprite moving inside of Scratch).

Obviously fairly complicated to program, but for an end-user they have instant access via the sensor blocks to some new 'virtual' sensors to play with. I know there's a potential to use this functionality to interface with devices such as motors, accelerometers, etc - what kinds of things are people using remote sensors for?

That sounds amazing!  What sort of vision system are you using to allow the camera to locate the sprite cutout?


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#4 2008-09-18 11:48:53

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

Re: Projects with remote sensors

There are a couple of ways it could be done - mine is fairly simple, the back of each cut-out is tagged with a special symbol that is trackable via a GPL piece of software called reacTIVision (originally designed for multi-touch surfaces) in conjunction with a Processing library.

With that, I only had to write a fairly simple Processing sketch to translate the data I'm passed to something more Scratch-friendly and pass them on (although there's some more complex code in there for performance, detecting 'true' movement from errors, distinguishing tags, etc)

So, cutouts can be placed on a flat (transparent) surface and moved around with a camera beneath them, or alternatively mounted onto sticks and used as puppets, with the camera behind.

Like I said, there are other ways of doing it, but I think using visual markers is by far the cheapest (ie, free) - especially given that I can pass processing not just x/y co-ordinates, but angle of rotation as well. There were other methods I had thought of (eg, using IR LEDs on the cut-outs to be picked up by the camera), but I'm pretty happy with what I've got so far.

The great benefit is that someone can come along and - as long as the Processing applet is running - just drag and drop sensor blocks and use the 'virtual' sensors to quickly get motion tracking up and running. I could definitely see some applications, such as putting on 'virtual' puppet shows in class, etc. for which this could be beneficial.

Offline

 

#5 2008-09-18 12:16:09

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

Re: Projects with remote sensors

lxt wrote:

There are a couple of ways it could be done - mine is fairly simple, the back of each cut-out is tagged with a special symbol that is trackable via a GPL piece of software called reacTIVision (originally designed for multi-touch surfaces) in conjunction with a Processing library.

With that, I only had to write a fairly simple Processing sketch to translate the data I'm passed to something more Scratch-friendly and pass them on (although there's some more complex code in there for performance, detecting 'true' movement from errors, distinguishing tags, etc)

So, cutouts can be placed on a flat (transparent) surface and moved around with a camera beneath them, or alternatively mounted onto sticks and used as puppets, with the camera behind.

Like I said, there are other ways of doing it, but I think using visual markers is by far the cheapest (ie, free) - especially given that I can pass processing not just x/y co-ordinates, but angle of rotation as well. There were other methods I had thought of (eg, using IR LEDs on the cut-outs to be picked up by the camera), but I'm pretty happy with what I've got so far.

The great benefit is that someone can come along and - as long as the Processing applet is running - just drag and drop sensor blocks and use the 'virtual' sensors to quickly get motion tracking up and running. I could definitely see some applications, such as putting on 'virtual' puppet shows in class, etc. for which this could be beneficial.

Do you have the source code for the Processing program available, and would you be willing to share it with people on this forum?  Sounds like it would be fun to play with.

Offline

 

#6 2008-09-18 12:39:08

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

Re: Projects with remote sensors

Sure, I'll just tidy it up a bit. This whole thing is for a project due Friday week, so I'll post whatever I have by then.  smile

Offline

 

#7 2008-09-26 14:11:51

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

Re: Projects with remote sensors

As a simple example of how to take information from a website and send it to Scratch, I uploaded a project that allows Gobo to read news headlines from RSS feeds:

http://scratchconnections.wik.is/Projects

Offline

 

#8 2008-09-26 14:54:53

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: Projects with remote sensors

chalkmarrow wrote:

As a simple example of how to take information from a website and send it to Scratch, I uploaded a project that allows Gobo to read news headlines from RSS feeds:

http://scratchconnections.wik.is/Projects

That looks like a fun application!

I've also posted my System Clock application to the same area.  It has a Python script that sends PC system clock information to Scratch every second.  The scratch project provided moves the hands of a clock and chimes on the quarter hour and tolls out the hours.  It could be a good start on other time based projects, such as calendars, data recorders, whatever.


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#9 2008-09-29 17:16:05

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

Re: Projects with remote sensors

Paddle2See wrote:

chalkmarrow wrote:

As a simple example of how to take information from a website and send it to Scratch, I uploaded a project that allows Gobo to read news headlines from RSS feeds:

http://scratchconnections.wik.is/Projects

That looks like a fun application!

I've also posted my System Clock application to the same area.  It has a Python script that sends PC system clock information to Scratch every second.  The scratch project provided moves the hands of a clock and chimes on the quarter hour and tolls out the hours.  It could be a good start on other time based projects, such as calendars, data recorders, whatever.

I really like the clock. Very useful scripts in there that can be re-used by a lot of people.

Offline

 

Board footer