OPERATING SYSTEMSOS Linux

Raspberry Pi Pico – First Look and Project!

Today we get to see a little board with a lot of potential. The Raspberry Pi Pico is the latest board from the Raspberry Pi Foundation. Rather than their traditional fair of a Single Board Computer, this device is a microcontroller similar to the Arduino line. Lets see what it has to offer for its miniscule 4 dollar price tag.

Pick up your board here!
https://www.raspberrypi.org/products/raspberry-pi-pico/

— Follow me on the Intrawebs! —
Twitter – @jcprintnplay
Instagram – @jcprintnplay
Facebook – https://www.facebook.com/jcprintnplay/
Thingiverse – https://www.thingiverse.com/jcprintnplay/designs
Reddit – https://www.reddit.com/r/PrintNPlayYT/

— Like what I’m doing here? Want early access to content, models, and more? Check me out on Patreon !
www.patreon.com/jcprintnplay

—Morse Code Sample—

from machine import Pin
from time import sleep

led = Pin(25, Pin.OUT)

message = ‘thanks for watching’

fast = 0.2
slow = 0.6

led.low()

def blinkletter(letter):
print(letter)
if (letter == ‘a’):
blink(fast)
blink(slow)

if (letter == ‘b’):
blink(slow)
blink(fast)
blink(fast)
blink(fast)

if (letter == ‘c’):
blink(slow)
blink(fast)
blink(slow)
blink(fast)

if (letter == ‘d’):
blink(slow)
blink(fast)
blink(fast)

if (letter == ‘e’):
blink(fast)

if (letter == ‘f’):
blink(fast)
blink(fast)
blink(slow)
blink(fast)

if (letter == ‘g’):
blink(slow)
blink(slow)
blink(fast)

if (letter == ‘h’):
blink(fast)
blink(fast)
blink(fast)
blink(fast)

if (letter == ‘i’):
blink(fast)
blink(fast)

if (letter == ‘j’):
blink(fast)
blink(slow)
blink(slow)
blink(slow)

if (letter == ‘k’):
blink(slow)
blink(fast)
blink(slow)

if (letter == ‘l’):
blink(fast)
blink(slow)
blink(fast)
blink(fast)

if (letter == ‘m’):
blink(slow)
blink(slow)

if (letter == ‘n’):
blink(slow)
blink(fast)

if (letter == ‘o’):
blink(slow)
blink(slow)
blink(slow)

if (letter == ‘p’):
blink(fast)
blink(slow)
blink(slow)
blink(fast)

if (letter == ‘q’):
blink(slow)
blink(slow)
blink(fast)
blink(slow)

if (letter == ‘r’):
blink(fast)
blink(slow)
blink(fast)

if (letter == ‘s’):
blink(fast)
blink(fast)
blink(fast)

if (letter == ‘t’):
blink(slow)

if (letter == ‘u’):
blink(fast)
blink(fast)
blink(slow)

if (letter == ‘v’):
blink(fast)
blink(fast)
blink(fast)
blink(slow)

if (letter == ‘w’):
blink(fast)
blink(slow)
blink(slow)

if (letter == ‘x’):
blink(slow)
blink(fast)
blink(fast)
blink(slow)

if (letter == ‘y’):
blink(slow)
blink(fast)
blink(slow)
blink(slow)

if (letter == ‘z’):
blink(slow)
blink(slow)
blink(fast)
blink(fast)

sleep(1.2)

def blink(speed):
led.toggle()
sleep(speed)
led.toggle()
sleep(speed)

while True:
for c in message:
blinkletter(str.lower(c))

sleep(3)

Music Info:
Newer Wave by Kevin MacLeod
Link: https://incompetech.filmmusic.io/song/7016-newer-wave
License: https://filmmusic.io/standard-license

#RaspberryPi #Pico #PicoPi

source

by Print ‘N Play

linux foundation

Leave a Reply

Your email address will not be published. Required fields are marked *