80 likes | 167 Views
Commands and functions for sensing ( 1 / 8 ). Select 'Sensing' code block at the left-upper corner of Scratch editor. Commands and functions for sensing ( 2 / 8 ). There are eight classes of commands and functions: 'touching' 'ask' and 'answer' 'mouse' 'key pressed' 'distance' 'timer'
E N D
Commands and functions for sensing (1/8) • Select 'Sensing' code block at the left-upper corner of Scratch editor
Commands and functions for sensing (2/8) • There are eight classes of commands and functions: • 'touching' • 'ask' and 'answer' • 'mouse' • 'key pressed' • 'distance' • 'timer' • 'loudness' • 'sensor'
Commands and functions for sensing (3/8) • 'touching' gives information about the fact of that the sprite has touched e.g. other sprite
Commands and functions for sensing (4/8) • 'ask' function makes an iteraction to get information from the user • 'answer' contains the data given back from the user
Commands and functions for sensing (5/8) • 'mouse' and 'keypressed' functions are for collecting information about position of mouse or the pressed button from the keyboard
Commands and functions for sensing (6/8) • 'distance' gives back information about the distance between objects (e.g. between two sprites)
Commands and functions for sensing (7/8) • 'timer' gives back information about time in seconds elapsed from the start of Scratch • 'timer' can be set to zero by 'reset timer function'
Commands and functions for sensing (8/8) • 'loudness' senses the level of microphone activity (e.g. size of a sprite can be changed dinamically by the loudness of human speech to the microphone) • 'sensor' is able to get infromation about a demo board attached to PC (e.g. Scratch can detect a buttonpress on a demo board)