The block sets the specified motor of the Quarky Expansion board to the specified direction (“FORWARD” or “BACKWARD”) and specified speed for the specified time. After that, the robot turns OFF.


The block sets the specified motor of the Quarky Expansion board to the specified direction (“FORWARD” or “BACKWARD”) and specified speed for the specified time. After that, the robot turns OFF.


In this example, we are going to learn how to program Quarky to detect the temperature (using DHT Sensor) and make the fan ON and OFF accordingly.


The following script displays the real-time sensor reading.

Download Code: https://pictoblox.page.link/eHAFsRRW6CoEifmn9
Connect Quarky and you will start getting the readings.

The following makes the fan motor turn ON at 50% speed for 1 second, then turn OFF for 1 second, then turn ON at 100% speed for 1 second and finally turn OFF for 1 second. This will repeat in a loop.

Download Code: https://pictoblox.page.link/vWTfiWkgi2w8BhsNA
The following scripts, make the fan turn ON whenever the temperature is greater than 26 degrees.


You can also make the automatic lighting work independent of PictoBlox using the Upload Mode. For that switch to upload mode and replace the when green flag clicked block with when Quarky starts up block.


Click on the Upload Code button.
Copyright 2025 – Agilo Research Pvt. Ltd. All rights reserved – Terms & Condition | Privacy Policy