Sensing Blocks and Examples in PictoBlox
Sensing Blocks and Examples in PictoBlox
Sensing
Extension Description
Sensing blocks are associate with sprites and stage detecting conditions.
Introduction
Sensing is one of the ten categories of default Scratch blocks. They are color-coded cyan and are used
to detect different factors of a project.
Read More
PictoBlox Blocks
The block checks if its sprite is touching the mouse-pointer, edge, or another sprite. If the sprite is
touching the selected object, the block returns true; if it is not, it returns false.
The block checks whether its sprite is touching a specified color. If it is, the block returns “true”.
The block checks whether a color on its sprite is touching another color. If it is, the block returns “true”.
The block reports the Euclidean distance, in pixels, between it and the mouse-pointer or a specified
sprite’s costume center.
The block will make an input box (with the specified text above it) show at the bottom of the screen.
Scratchers can input text into it and submit it, and the input is stored then in the Answer block. The
Answer block automatic updates to the most recent input.
The block holds the most recent text imputed with the Ask () and Wait block. When nothing has been
inputted yet, the value will hold nothing.
The block checks if the specified key is pressed. If the key is being pressed, the block returns “true”; if it
is not, it returns “false”.
The block checks if the computer mouse’s primary button is activated (being clicked).
9
The block holds (reports) the mouse-pointer’s current Mouse X.
10
11
The block reports how loud the noise is that a microphone receives, on a scale of 0 to 100. To use this
block, a microphone must be used, and so a message will appear on the screen, asking for permission
to use the microphone. If you deny it, the block will report a loudness of 0 or -1.
12
The block starts at 0 when Scratch is launched and increases gradually; every second it will have
increased by 1.
13
The block sets the timer’s value back to 0.0. When this block is present, the project typically utilizes the
Timer output block; usually the timer must be reset at the beginning of a project for the Timer block to
hold the right value.
14
The block will report a specified value of the specified sprite or the Stage.
15
It reports either the current local year, month, date, day of the week, hour, minutes, or seconds,
depending on the argument. The block gets the data based on the user’s computer’s clock and set in 24-
hour clock.
16
It reports the number of days (and fractions of a day) since 00:00:00 1 January 2000 (UTC).
4
Mouse Tracker
The example demonstrates how to implement mouse
tracking.
5 Reciting Table
The example demonstrates how to use a repeat block to
recite a table in PictoBlox.
7
Stamping Tobi
The example demonstrates how to use stamping and the
mouse location sensing in Block coding.
Python Functions
1
istouching()
The function checks if its sprite is touching the mouse-pointer, edge, or another sprite. If the sprite is
touching the selected object, the block returns true; if it is not, it returns false.
Syntax: istouching(object_name = “_edge_”)
2
distance()
The function reports the Euclidean distance, in pixels, between it and the mouse-pointer or a specified
sprite’s costume center.
Syntax: distance(object_name = “_edge_”)
3
input()
The function will make an input box (with the specified text above it) show at the bottom of the screen.
Users can input text into it and submit it, and the input is stored then in the Answer. The Answer
automatic updates to the most recent input.
Syntax: input(question = “What is your name”)
4
answer()
The function returns the most recent text imputed with the input() function. When nothing has been
inputted yet, the value will hold nothing.
Syntax: answer()
5
iskeypressed()
The function checks if the specified key is pressed. If the key is being pressed, the block returns “true”; if
it is not, it returns “false”.
Syntax: iskeypressed(key = “space”)
6
mousex()
The function reports the mouse pointer’s current X position on the stage.
Syntax: mousex()
7
mousey()
The function reports the mouse pointer’s current y position on the stage.
Syntax: mousey()
8
loudness()
The function reports how loud the noise that a microphone receives, on a scale of 0 to 100.
Syntax: loudness()
9
timer()
The function reports the time lapsed since the PictoBlox is launched and increases gradually; every
second it will have increased by 1.
Syntax: timer()
10
resettimer()
The function sets the timer’s value back to 0.
Syntax: resettimer()
11
dayssince2000()
The function reports the number of days (and fractions of a day) since 00:00:00 1 January 2000 (UTC).
Syntax: dayssince2000()
1
Ball Movement – Python
The example demonstrates how to add movement to a sprite.
4
Mouse Tracker – Python
The example demonstrates how to implement mouse
tracking in Python.
7
Sprite Direction – Python
The example demonstrates the sprite direction in Python.
Company
About Us
Blog
Partners and Distributors
Terms and Conditions
Privacy Policy
Careers
Community
Codeavour - AI Competition
Community Projects
Projects by STEMpedia
Example Projects
International Python Bootcamp
International Junior Blocks Bootcamp
International 3D and XR Studio Bootcamp
Products
Quarky - AI & Robotics Kit
Quarky Addon Kits
evive - STEM Kit
PictoBlox Software
Dabble App
School Programs
AI & Robotics Lab
Atal Tinkering Labs
STEM Innovation Lab
CBSE Aligned Coding & AI Lab
ICSE Aligned Robotics & AI Lab
Impact Programs
CSR & Government Impact Program
Learning Resources
Education Center
Courses & Teacher Resources
Product Documentation
Quarky Kits
evive Kits
PictoBlox Software
PictoBlox Extensions & Libraries
Dabble App
Arduino with PictoBlox
Get in Touch
Contact Us
Book a Demo
Request a Quote
Follow Us
PictoBlox - Block & Python Coding for Kids
Copyright 2024 – Agilo Research Pvt. Ltd. All rights reserved – Terms & Condition | Privacy Policy