The function gives its sprite a thought bubble with the specified text, which stays for the specified amount of seconds.
If the value of time is 0 then, the thought bubble stays until a speech or thought block with its text block empty is activated, or the stop sign is pressed.
Parameters
Name
Type
Description
Expected Values
Default Value
message
string
The text you want to write.
String
"Hello!"
time
int
Time for which the message is displayed. If value is 0 then the sprite will say until another speech or thought block is activated, or the stop sign is pressed.
Now we will connect the Ultrasonic Sensor to the Robot. The sensor and the robot have the following pins:
Ultrasonic Sensor Pins:
VCC
GND
Trig
Echo
Quarky Pins:
GND
V
D1
D2
We will start with connecting the ultrasonic sensor with Quarky using the 4 set wire provided in the kit. But, first, make the connection in the following way:
First, connect the VCC of the ultrasonic sensor with the V pin on the Quarky.
Connect the GND of the ultrasonic sensor with the Ground pin on the Quarky.
Connect Trig of the ultrasonic sensor with D1 pin on the Quarky.
Finally, connect the Echo of the ultrasonic sensor with the D2 pin on the Quarky.
Now we will connect the Ultrasonic Sensor to the Robot. The sensor and the robot have the following pins:
We will start with connecting the ultrasonic sensor with Quarky using the 4 set wire provided in the kit. But, first, make the connection in the following way:
First, connect the VCC of the ultrasonic sensor with the V pin on the Quarky.
Connect the GND of the ultrasonic sensor with the Ground pin on the Quarky.
Connect Trig of the ultrasonic sensor with D1 pin on the Quarky.
Finally, connect the Echo of the ultrasonic sensor with the D2 pin on the Quarky.
sprite = Sprite('Cassy Dance')
quarky = Quarky()
import time
sprite.switchcostume('cassy-a')
sprite.gotoxy(0, 0)
while True:
if quarky.ispadtouched("T1"):
quarky.playsound("QuarkyIntro")
if quarky.ispadtouched("T2"):
quarky.showpattern("party colors")
if quarky.ispadtouched("T3"):
time.sleep(0.2)
sprite.nextcostume()
if quarky.ispadtouched("T4"):
quarky.stopaudio()
A waste management system that will differentiate the waste based on its type. If it detects biodegradable waste, the LEDs Quarky’s matrix will turn green. If it’s non-biodegradable waste, the LEDs will turn blue.
A waste management system that will differentiate the waste based on its type in Python Coding Environment. If it detects biodegradable waste, the LEDs Quarky’s matrix will turn green. If it’s non-biodegradable waste, the LEDs will turn blue.
sprite = Sprite('Tobi')
pose = Posenet()
pose.video("on", 0)
pose.enablebox()
while True:
pose.analysecamera()
bodyPartCount = 0
for i in range(21):
if pose.isdetected(i, 1):
bodyPartCount += 1
sprite.say(str(bodyPartCount) + " Parts Detected")