111 ta blokli loyiha · Arduino · ESP32 · Pico
Arduino, ESP32 va Pico loyihalari uchun blokli dasturlash
Kodni qatorma-qator o‘qish o‘rniga rangli bloklarni kuzat. BlueGrays da 111 ta loyihaning blokli ko‘rinishi tayyor; har bir blok plataga yuklanadigan haqiqiy kodning bir qatoriga to‘g‘ri keladi.
Blokli dasturlash nima?
Blokli dasturlash dasturni yozish o‘rniga jumboq bo‘lakchasiga o‘xshash bloklar bilan tuzish usuli. «Pinni chiqish qil», «LED ni yoq», «1 soniya kut» kabi har bir buyruq bitta blok; bloklar ketma-ket terilgach, dastur hosil bo‘ladi. Nuqta-vergul, qavs yoki yozuv xatosi tashvishi bo‘lmagani uchun dasturning mantig‘iga e’tibor qaratasan.
BlueGrays ning bloklari o‘zimiz tayyorlagan blok to‘plami bilan yasalgan va ilova tilida ko‘rinadi: ilovani o‘zbek tilida ishlatsang, bloklarda ham shu tilda yoziladi. Arduino va ESP32 loyihalarida bloklar C++ kodiga, Raspberry Pi Pico loyihalarida MicroPython kodiga mos keladi.
Maqsad blokda qolish emas, kodni tushunish. Bir loyihaning bloklariga va kodiga yonma-yon qarasang, qaysi qator nima ish qilishini ko‘rasan; bir necha loyihadan keyin kodni bloksiz ham o‘qiy boshlaysan.
BlueGrays da blokli dasturlash qanday ishlaydi?
Bloklar ilovada har bir blokli loyihaning kod bo‘limida. To‘rt qadamda:
- 01
Blokli loyihani tanla
Loyihalar ro‘yxatida blok nishoni bor loyihalar blokli ko‘rinishi bilan keladi. Filtrdan faqat blokli loyihalarni ham ko‘rsatishing mumkin.
- 02
«Bloklar bilan ko‘rsat» ni yoq
Kod bo‘limidagi kalit bilan kod bloklarga aylanadi. Rasmga bossang, to‘liq ekranda ochiladi, kattalashtirib, qulay ko‘rib chiqasan.
- 03
Bloklarni tushun
«Bloklarni tushun» yorlig‘i dasturni qadamma-qadam tushuntiradi: har bir qadamda faqat shu qadamning bloklari va nima qilishi ko‘rinadi.
- 04
Haqiqiy kodga o‘t
Kalitni o‘chirsang, xuddi shu dasturning kodi keladi. Kodni nusxalab, Arduino IDE ga (Pico da Thonny ga) qo‘yasan va platangga yuklaysan.
Bitta dastur: bloklar va kod
Chapda loyihaning bloklari, o‘ngda plataga yuklanadigan kodi. Bloklardagi har bir qatorning kodda mosi bor.
Bloklar

Kod
1// ─────────────────────────────────────────
2// BlueGrays · bluegrays.com
3// LED Blink
4// ─────────────────────────────────────────
5// Blinks a single LED on and off every 100 ms. Shows the basic use of the
6// digitalWrite and delay functions.
7//
8// Pins:
9// D9 -> LED (with a 220 ohm resistor)
10
11void setup() {
12 pinMode(9,OUTPUT); // LED pin as output
13}
14
15void loop() {
16 digitalWrite(9,HIGH); // Turn the LED on
17 delay(100); // Wait 100 ms (1000 ms = 1 s)
18 digitalWrite(9,LOW); // Turn the LED off
19 delay(100);
20}
21Blokli loyihalar
Blokli ko‘rinishi bor barcha loyihalar platforma bo‘yicha. Bepul loyihalar oldinda; 31 ta loyihaning bloklari va kodi butunlay bepul.
Arduino loyihalari74 ta blokli loyiha

LED Blink
The very first hello of electronics: switching a single LED on and off. The Arduino turns the LED on and off at short intervals, so the light blinks quickly.

Two LEDs Blinking Alternately
Two LEDs blink quickly in turn: when one lights up the other goes off, as if they were tossing a ball back and forth.

Traffic Light
A tiny copy of the traffic light you see on the road every day. Red stays on for two seconds, yellow flashes for a moment, green stays on for two seconds, then it goes back to red through yellow…

LED Police Lights
Just like the lights on a police car: the red LED flashes three times in quick succession, then the blue LED flashes three times, and the pattern keeps repeating without a break.

LED Chaser
Lights that switch on one after another, as if they were running. The Arduino lights six LEDs one at a time; each glows for a brief moment and goes out, so the light walks from start to end and then…

Knight Rider LED Effect
The classic scanner light: a dot of light slides from one end of six LEDs to the other and then comes back.

LED Chaser with Adjustable Speed
Six LEDs light up one after another, so the light seems to run from one end to the other.

Knight Rider LED Effect with Adjustable Speed
A light runs from one end of six LEDs to the other, turns around and runs back again.
Arduino loyihalari: barcha blokli loyihalar
- AR-9LED Control with a Push Button (Push)Bepul
- AR-10Toggle an LED with a Button (On/Off)Bepul
- AR-11Measuring Light Intensity with an LDRBepul
- AR-12Night Light with LdrBepul
- AR-13Using a BuzzerBepul
- AR-14Frequency Setting with BuzzerBepul
- AR-27HC-SR04 Distance Measurement (Serial Display)Bepul
- AR-37Reading a Reed SwitchBepul
- AR-45DS1302 RTC Clock Module SetupBepul
- AR-55Temperature and Humidity with DHT11Bepul
- AR-613x4 Keypad OperationBepul
- AR-16Reading IR Remote Control Codes
- AR-17Led On/Off with IR Receiver and Remote Control
- AR-19Lighting 220V Bulb with Push Button
- AR-20Lighting 220V Bulb with Button (On-Off)
- AR-21Lighting 220V Bulb with Remote Control
- AR-22Laser Warning System
- AR-23Laser Security System
- AR-24Motion Detector with Motion Sensor
- AR-25Doorbell and Light with Motion Sensor
- AR-26Simple Piano with Buzzer and Button
- AR-28Parking Sensor with HC-SR04
- AR-29Print Message on 2x16 LCD Screen
- AR-30Bouncing Text Animation on LCD
- AR-31Measuring Distance Using LCD Display
- AR-32Using LCD Screen with I2C
- AR-33Height Measurement Project
- AR-34Control an LED from Your Phone via Bluetooth
- AR-35Using a Servo Motor
- AR-36Servo Motor Operation with Potentiometer
- AR-38Reed Switch Door Sensor
- AR-39Using an RGB LED
- AR-40Smooth Color Transition with RGB Led
- AR-42Displaying Numbers 0-99 on a 7-Segment Display
- AR-43Counter with 7-Segment Display and Buttons
- AR-44Temperature Measurement with NTC and 2x16 Lcd Display
- AR-46DS1302 RTC Clock with LCD Display
- AR-47Displaying 0-9999 on a 4-Digit 7-Segment Display
- AR-48Digital Clock with 4-Digit 7-Segment Display
- AR-49Bomb Animation with 4-Digit 7-Segment Display
- AR-50Using a Flame Sensor
- AR-51Using a Gas Sensor
- AR-52Flame and Gas Sensor Alarm
- AR-53RFID Value Reading
- AR-54RFID Authentication
- AR-56Digital Voltmeter with LCD Display
- AR-58Two-Way Communication Between 2 Arduinos
- AR-59Led Control with Joystick
- AR-60Servo Control with Joystick
- AR-62LED Control with a 3x4 Keypad
- AR-634x4 Keypad Operation
- AR-64Password Lock with 4x4 Keypad and LCD
- AR-67Using a Stepper Motor
- AR-68360-Degree Servo from a Stepper Motor
- AR-69Using a WS2812B LED Strip
- AR-70Police Lights with WS2812B
- AR-71WS2812B LED Chaser
- AR-72WS2812B LED Chaser (Fill Effect)
- AR-73WS2812B Knight Rider Effect
- AR-74WS2812B Knight Rider Effect (3 LEDs)
- AR-75WS2812B Animation 1
- AR-77Reading Reflection (Proximity) with TCRT5000
- AR-78TCRT5000 Black and White Surface Detection
- AR-82Smart Stair and Corridor Lighting
- AR-83Smart Irrigation Station
- AR-95Arduino Reaction Time Test with Sound Cue: Measure Your Reflexes in Milliseconds (LCD + Buzzer + 3 LEDs)
ESP32 loyihalari23 ta blokli loyiha

LED Blink with ESP32
Teaches basic GPIO output usage with ESP32. We achieve a blinking effect by turning an LED on and off from a digital pin. ESP32 version of the classic blink project on Arduino UNO; the basic blink commands in the Arduino environment are the same, but the ESP32's pin layout and 3.3 V GPIO levels differ from those of the Arduino UNO.

ESP32 LED Control with Push Button (Push)
The LED lights up when the button is pressed and turns off when released. Shows how the ESP32's digital input pin and internal pull-up resistor are used. The INPUT_PULLUP mode eliminates the need for an external resistor.

ESP32 LED Control with Pushbutton (Toggle)
Each time the button is pressed the state of the LED changes: if it is on it turns off, if it is off it turns on. Classic toggle pattern. With debounce we clean up the mechanical noise of the pushbutton to ensure a single toggle with a single press.

ESP32 Built-in LED Blink
Blinking the built-in blue LED on the ESP32 DevKit V1. No external components required! The first project you should try when you buy an ESP32. GPIO 2 is connected to the built-in LED.

ESP32 Traffic Light
Real traffic light simulation with 3 LEDs red-yellow-green. Timings close to real traffic logic: red long, yellow short, green long. Classic example of sequential GPIO control.

ESP32 Knight Rider LED
6 LEDs moving sequentially from left to right and right to left (Knight Rider style). A basic example of using for loops and arrays. Teaches the logic of direction change.

ESP32 LED Fade with PWM
Smoothly changing the brightness of the LED from 0 to max, from max to 0. We control PWM with analogWrite() as in Arduino - the same syntax as ESP32 Arduino Core 3.0+ works without problems. Pin definition + pinMode + analogWrite is enough.

ESP32 RGB LED Control
Unlimited color generation with a single RGB LED instead of 3 separate LEDs. As in Arduino, we make a rainbow transition by setting the R/G/B values with analogWrite(). Color theory (such as red+green=yellow) is seen practically.
ESP32 loyihalari: barcha blokli loyihalar
- ES-11Reading Light Intensity with the ESP32 LDR ModuleBepul
- ES-14ESP32 HC-SR04 Ultrasonic Distance SensorBepul
- ES-15ESP32 DHT22 Temperature and Humidity (with LCD Display)Bepul
- ES-20ESP32 MQ-2 Gas/Smoke Detector AlarmBepul
- ES-21ESP32 RFID RC522 Card Reader (with LCD)Bepul
- ES-7ESP32 Police Strobe Light Effect
- ES-10ESP32 Night Light with LDR
- ES-12ESP32 Melody Playback with Buzzer
- ES-13ESP32 LED Brightness Control with a Potentiometer (Analog → PWM)
- ES-16ESP32 Servo Motor (Potentiometer Control)
- ES-17ESP32 I2C LCD Display (16x2)
- ES-18Digital Clock with ESP32 and DS1307 RTC (I2C + LCD)
- ES-19Automatic Lighting with the ESP32 PIR Motion Sensor
- ES-23ESP32 TM1637 4-Digit 7-Segment Display
- ES-24ESP32 WS2812B NeoPixel Strip Control
Raspberry Pi Pico loyihalari10 ta blokli loyiha

Raspberry Pi Pico Onboard LED Blink (Pico and Pico W)
The opening project of the Raspberry Pi Pico series! We blink the Pico's green built-in LED to confirm the board works, the classic "Hello World" first experiment. No external parts needed, just the Pico and a USB cable. The code is written in MicroPython, the language officially supported by the Raspberry Pi Foundation.

Raspberry Pi Pico: Controlling an External LED (Breadboard)
The next step after the Pico's built-in LED: connect an external LED on a breadboard and control it through pin GP14. You'll learn how to use any of the Pico's GPIO pins as an output, the LED's polarity (long leg = anode/+, short leg = cathode/–) and why a current-limiting resistor (220Ω) is a must. Without the resistor, too much current flows through the LED and it can burn out.

Raspberry Pi Pico Alternating Two LEDs (Blink-Flip Pattern)
The next step after the Pico's single LED: the classic flip-flop animation, with two LEDs blinking in turn. One LED turns off as the other turns on, the most basic example of handling multiple GPIOs. Two LEDs of different colors (red on GP14, green on GP13) swap every 500 ms. With MicroPython's Pin.toggle() method, the code stays short and readable.

Raspberry Pi Pico Traffic Light Simulator (3 LEDs Sequential)
We recreate real traffic light logic with red, yellow and green LEDs, the first Pico project to move up to 3 LEDs! Green says "go" for 4 seconds, yellow "get ready" for 1.5 seconds, red "stop" for 3 seconds, and red+yellow "set off" for 1 second (the European traffic light pattern). You'll learn to define functions (def all_off()), state machine logic and multi-GPIO synchronization.

Raspberry Pi Pico Police Strobe Light Effect (Red + Blue)
We simulate a police car's light bar with a Raspberry Pi Pico in its simplest form! The red and blue LEDs take turns (flip-flop): while red is on, blue is off, and they swap every 0.3 seconds, forever. The code writes the two steps directly in a single while True loop; the speed is set with the WAIT_MS constant.

Raspberry Pi Pico 3-Burst Police Flip-Flop (2 LEDs)
Rhythmic variation of the police strobe project — 3-burst flip-flop! Same 2-LED circuit (GP11 red + GP12 blue), but a different pattern: red LED flashes 3 times rapidly, then blue flashes 3 times, forever. This "burst + switch" pattern is the most recognizable rhythm of real police siren lights. Learn parametrized function def burst(led, count, duration_ms), rhythm design, and generating different visual effects with code on same circuit.

Raspberry Pi Pico Button Toggle LED
Button + LED — next level! Unlike the basic button project, there is no need to hold the button. Press and release → LED on. Press and release again → LED off (toggle). Same circuit (LED GP14, Button GP2), but big code difference. Learn edge detection (capturing the 1→0 falling moment), state tracking, debounce (mechanical bounce filter). MicroPython's led.toggle() swaps state in one line. Foundation of all interactive button projects (mode switcher, IRQ, double-click).

Raspberry Pi Pico PWM LED Fade (Breathing Effect)
The LED doesn't just blink anymore, it breathes! With the Raspberry Pi Pico's PWM (Pulse Width Modulation), the LED's brightness slowly rises and then slowly fades, a calm "breathing" effect like a sleeping laptop's light. You'll learn the machine.PWM class, the 16-bit brightness value from 0–65535 with duty_u16() and the PWM frequency.
Raspberry Pi Pico loyihalari: barcha blokli loyihalar
Kimlar uchun?
Bolalar va oilalar
Bolalar uchun dasturlashni ekran qarshisida emas, yonib turgan LED bilan boshlash ancha yodda qoladi. Bloklar dasturni o‘qiladigan qiladi, sxemani birga yig‘asizlar.
O‘qituvchilar va to‘garaklar
Robototexnika yoki dasturlash darsida bir xil loyihani avval bloklar bilan tushuntirib, keyin kodiga o‘tishing mumkin. Har bir loyihada komponentlar ro‘yxati va elektr sxemasi tayyor.
Yangi boshlovchilar
Arduino uchun blokli dasturlash dastlabki bir necha loyihada kodning mantig‘ini tushunishning eng tez yo‘li. Bloklar bilan boshla, o‘zingni tayyor his qilganingda kodga o‘t.
Ko‘p so‘raladigan savollar
Blokka asoslangan dasturlash nima?
Buyruqlar yozuv o‘rniga jumboq bo‘lagidek bir-biriga ulanadigan bloklar bilan ko‘rsatiladigan dasturlash usuli. Yozuv xatosi qilib bo‘lmagani uchun yangi boshlovchilar va bolalar dasturning mantig‘ini osonroq tushunadi.
BlueGrays da nechta loyiha bloklar bilan keladi?
Hozir 111 ta loyiha: 76 ta Arduino, 25 ta ESP32 va 10 ta Raspberry Pi Pico loyihasi. Yangi loyihalar aylantirilgan sari ro‘yxat kengayib boryapti.
Blokli dasturlash bepulmi?
Ilova bepul. 31 ta blokli loyihaning bloklari va kodi hamma uchun ochiq. Boshqa loyihalarda bloklar ham kod kabi Premium bilan ochiladi.
Bloklarni to‘g‘ridan-to‘g‘ri plataga yuklay olamanmi?
Yo‘q. Bloklar dasturni o‘qish va tushunishni osonlashtiradi; plataga yuklanadigan har doim shu loyihaning haqiqiy kodi. Kodni Arduino IDE ga yoki Pico uchun Thonny ga nusxalab yuklaysan.
O‘z bloklarimni terib dastur yoza olamanmi?
Hozircha yo‘q. Bloklarni har bir loyiha uchun biz tayyorlaymiz va kod bilan birma-bir moslaymiz. Shunday qilib, ko‘rgan bloklaring doim ishlaydigan, sinalgan dasturga to‘g‘ri keladi.
Scratch yoki mBlock dan farqi nima?
Scratch va mBlock da bloklarni kompyuterda sudrab, o‘z dasturingni yozasan. BlueGrays da esa har bir blokli loyiha elektr sxemasi, komponentlar ro‘yxati va haqiqiy kodi bilan birga keladi; bloklar shu kodning o‘qiladigan ko‘rinishi. Ikkalasi bir-birini to‘ldiradi.
Bolalar uchun mosmi, necha yoshdan boshlasa bo‘ladi?
O‘qishni yaxshi biladigan 9-10 yosh va undan katta bolalar kattalar bilan birga boshlashi mumkin. Dastlabki loyihalar kavsharlashni talab qilmaydi; breadboard ustida LED, tugma va buzzer bilan yig‘iladi.
Bloklar qaysi tillarda?
Turk, ingliz, nemis, ispan, fransuz va italyan tillarida. Bloklar ilovani qaysi tilda ishlatsang, shu tilda ko‘rinadi.

