Archive.png This article or section documents something not included in the current version of Scratch (3.0). It is only useful from a historical perspective.
Document stub.png This article is a stub. It may be incomplete, unfinished, or have missing parts/sections. If the article can be expanded, please do so! There may be suggestions on its talk page. (July 2018)

Scratch Plugins are simple extensions created for Scratch to supply extra code, usually sending data via Mesh. The easiest way to make one is with a Scratch Modification, such as the Snap! modification.

How to Code

In this example, Snap! will be used. Use this in Snap!:

when I receive [ascii for letter v]
set [ascii v] to (ascii for ([letter v] sensor value::sensing)::operators)
broadcast [ready v]

Save that as plugin.ypr. Now use this in Scratch:

when gf clicked
forever
ask [Letter:] and wait
set [letter v] to (answer)
broadcast [ascii for letter v] and wait
end
when I receive [ready v]
set [ASCII v] to ([ascii v] sensor value::sensing)

Save that as connect.sb. Now, connect Snap! and Scratch using Mesh and start connect.sb. Enter a letter. The variable (ASCII) will contain the ASCII code.

See Also

Cookies help us deliver our services. By using our services, you agree to our use of cookies.