The function reports how loud the noise 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.
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")