CategoriesLed Raspberry Pi Pico Uncategorized

#1 Get Started with PicoBricks – PicoBlink

blink

In real life, the employee, who has just started to learn the job, first undertakes the most basic task.The cleaner first learns to use the broom, the cook learns to use the kitchen utensils, the waiter to carry a tray. We can increase these examples. The first code written by newcomers to software development is known as “Hello World”. Printing “Hello World” as soon as the program starts on the screen or console window in the language they use is the first step in programming. Like a baby starting to crawl… The first step to robotic c oding, also known as physical programming, is the Blink application. It means winking at robotic coding.

Details and Algorithm

There are 1 x 5mm red LED and 1 x WS2812B RGB LED on Picobricks. While normal LEDs can light up in one color, RGB colors can light up in different colors, both primary and secondary colors. In this project we will use the red LED on Picobricks.

In the project, we will write the necessary codes to turn on the red LED on Picobricks, turn it off after a certain time, turn it on again after a certain time, and repeat these processes continuously.

Components

1X PicoBricks

Wiring Diagram

MicroBlocks Codes of the PicoBricks

189116357 6116b522 d348 4503 81b9 71581c26c834

You can access the Microblocks codes of the project by dragging the image to the Microblocks Run tab or click the button

MicroPython Codes of the PicoBricks

				
					from machine import Pin #to access the hardware on the pico
import utime #time library
led = Pin(7,Pin.OUT)#initialize digital pin 7 as an output for LED
while True: #while loop
    led.toggle()# LED on&off status
    utime.sleep(0.5)#wait for a half second
				
			

Arduino C Codes of the PicoBricks

				
					void setup() {
  // put your setup code here, to run once:
  pinMode(7,OUTPUT);//initialize digital pin 7 as an output

}

void loop() {
  // put your main code here, to run repeatedly:
  digitalWrite(7,HIGH);//turn the LED on by making the voltage HIGH
  delay(500);//wait for a half second
  digitalWrite(7,LOW);//turn the LED off by making the voltage LOW
  delay(500);//wait for a half second

}
				
			

Project Image

Project Video

Project Proposal 💡

Can we light the LED with different time intervals? For example; flashing of the LED several times per second, several times every half second.

Leave a Reply

Your email address will not be published.