- 33
- 213 072
D-I-Ry
United States
เข้าร่วมเมื่อ 16 มี.ค. 2020
Hi, I'm Ryan! I want to teach people how to be good, confident programmers and robot builders. And my cat, Oatie, may jump into the videos, too.
Let's build Baby Tetris!
We're going to use a Seeed Studio RP2040 chip, an SSD1306 OLED display, and a couple of wires to build a 1-inch version of Tetris!
If any updates need to be made in the future, I'll add them here.
For now, here's the software we'll need:
* Python 3: www.python.org/downloads/
* Thonny text editor: thonny.org/
Parts list (Amazon affiliates links):
* Seeed Studio RP2040 chip: amzn.to/3TA1qlH
* breadboard: amzn.to/3TBMweK
* push buttons: amzn.to/43CmRag
* jumper wires: amzn.to/43Aaxr7
* OLED display: amzn.to/3VCrGyg
and if you want to know what solder and soldering I use:
* solder: amzn.to/3xjybw8
* soldering iron: amzn.to/3TAG5Zf (yipes! it's expensive, but it's amazing!)
Download the code:
gitlab.com/ryanlogsdon/baby-tetris
Timestamps:
0:00 - intro
1:21 - parts list
1:52 - software setup
2:20 - soldering help
3:43 - chip firmware update (MicroPython)
5:02 - Hello world (Seeed Studio RP2040)
5:47 - Hello world (push buttons)
8:56 - Hello world (OLED display)
11:53 - Baby Tetris!
13:19 - code explanation
Shout out to my friend, Karl! Sorry I forgot to give you a shout out in the video!
If any updates need to be made in the future, I'll add them here.
For now, here's the software we'll need:
* Python 3: www.python.org/downloads/
* Thonny text editor: thonny.org/
Parts list (Amazon affiliates links):
* Seeed Studio RP2040 chip: amzn.to/3TA1qlH
* breadboard: amzn.to/3TBMweK
* push buttons: amzn.to/43CmRag
* jumper wires: amzn.to/43Aaxr7
* OLED display: amzn.to/3VCrGyg
and if you want to know what solder and soldering I use:
* solder: amzn.to/3xjybw8
* soldering iron: amzn.to/3TAG5Zf (yipes! it's expensive, but it's amazing!)
Download the code:
gitlab.com/ryanlogsdon/baby-tetris
Timestamps:
0:00 - intro
1:21 - parts list
1:52 - software setup
2:20 - soldering help
3:43 - chip firmware update (MicroPython)
5:02 - Hello world (Seeed Studio RP2040)
5:47 - Hello world (push buttons)
8:56 - Hello world (OLED display)
11:53 - Baby Tetris!
13:19 - code explanation
Shout out to my friend, Karl! Sorry I forgot to give you a shout out in the video!
มุมมอง: 121
วีดีโอ
How to fix the routing bug for Angular and Apache2
มุมมอง 6K2 ปีที่แล้ว
If you host your Angular website with Apache2, you'll see the 404 routing bug pop up all the time. We're going to fix that so your websites will display without seeing "The requested URL was not found on this server"! Steps to complete: 1) navigate to the folder with your index.html file 2) sudo nano .htaccess 3) paste in this code: RewriteEngine On # If an existing asset or directory is reques...
Setting up a Raspberry Pi for Robotics Projects
มุมมอง 2.1K2 ปีที่แล้ว
Download the code: gitlab.com/ryanlogsdon/raspberry-pi-settings-for-robotics This is how I've set up my Raspberry Pi 4 computers for the past 3 years whenever I make a new robotics project. We're going to install the new OS the easiest way possible. Then we'll update the computer and install extra software like Visual Studio Code. We'll make it so the Raspberry Pi uses the right libraries when ...
The best way to web scrape Zillow in Python
มุมมอง 2.2K2 ปีที่แล้ว
Download the code: gitlab.com/ryanlogsdon/zillow-scraper-simple Timestamps: 0:00 - intro 0:32 - create a Python notebook 1:45 - simple GET request 2:40 - detailed Zillow parsing Thumbnail Photo by Ales Nesetril on Unsplash
Auto run any script on startup for Raspberry Pi 4
มุมมอง 30K3 ปีที่แล้ว
Download the code: gitlab.com/ryanlogsdon/rpi-run-on-reboot We're going to make our Raspberry Pi 4's auto-run any scripts we want every time they boot up! This is done with crontab, and since we don't control the boot order, I'll show you what we need to do to make Python execute our scripts every time. Timestamps: 0:00 - intro 0:13 - code 0:33 - crontab command 1:10 - verification Thumbnail Ph...
how to add reCAPTCHA (captcha) to Angular apps
มุมมอง 16K3 ปีที่แล้ว
Download the code: gitlab.com/ryanlogsdon/captcha reCAPTCHA setup: www.google.com/recaptcha/admin/create reCAPTCHA admin dashboard: www.google.com/recaptcha/admin We're going to add the "I'm not a robot" captcha box to our Angular 12 apps! Timestamps: 0:00 - intro 0:26 - create reCAPTCHA keys 1:09 - create an Angular app 1:56 - add reCAPTCHA to Angular Thumbnail Photo by Tara Winstead from Pexels
Solving LeetCode's hardest coding problem, 420 Strong Password Checker
มุมมอง 3.2K3 ปีที่แล้ว
We're solving LeetCode's hardest coding problem, question 420, "Strong Password Checker", because I want to show how to turn any hard problem into a series of easier & approachable problems. And why not start with the hardest one there is! I PROMISE it'll be doable! I want to make programmers at every level more confident in their abilities! LeetCode problem: leetcode.com/problems/strong-passwo...
How to automate anything with voice controls for Google Assistant or Alexa (Raspberry Pi)
มุมมอง 5083 ปีที่แล้ว
Download the code: gitlab.com/ryanlogsdon/google-home-automation We're going to use a Raspberry Pi, Adafruit IO, and IFTTT (If-This-Then-That) to connect to our voice assistants (Google Assistant or Amazon Alexa) to control anything we can imagine! I'll be controlling my fish tank's food and lights, and for this project, we'll be controlling an LED with our voices. Come see how easy and fast we...
How to hack the 8Bitdo Nintendo Controller in Python
มุมมอง 4993 ปีที่แล้ว
Download the code: gitlab.com/ryanlogsdon/game-controller-hacks Adorable 8Bitdo controller: amzn.to/2X8XXl3 (Amazon Affiliates) We're going to hack the 8Bitdo (dough? dooo?) wireless controller in Python to add it to a Raspberry Pi robotics project. There's no encryption, so all we need to do is find out how the 8Bitdo communicates with our Pi, and from there, we'll decode the events and values...
How to hack the PS5 DualSense Controller in Python
มุมมอง 6K3 ปีที่แล้ว
Download the code: gitlab.com/ryanlogsdon/game-controller-hacks Pick up a cheaper PS5 controller: amzn.to/3ncHFBY (Amazon Affiliates) We're going to hack the PlayStation 5 DualSense wireless controller in Python to add it to a Raspberry Pi robotics project. There's no encryption, so all we need to do is find out how the DualSense communicates with our Pi, and from there, we'll decode the events...
AutoML from start to finish, step-by-step
มุมมอง 9703 ปีที่แล้ว
Download the code: gitlab.com/ryanlogsdon/automl Download gsutil: cloud.google.com/storage/docs/gsutil_install Download the flower images dataset: download.tensorflow.org/example_images/flower_photos.tgz We'll work with Google Cloud AutoML and its vision & image classification and identification system. We'll automate the tag creator process, and we'll get it to run our own image classifier fro...
Upload YouTube thumbnails in Python
มุมมอง 6503 ปีที่แล้ว
Download the code: gitlab.com/ryanlogsdon/youtube-thumbnail-replacer We're going to use the TH-cam API v3 and the Google Cloud Platform to automatically replace TH-cam thumbnails with any image of our choosing. We're also going to fix the "Error 400: redirect_uri_mismatch" that happens when the OAuth parameters aren't correct. Timestamps: 0:00 - intro 0:21 - enable the TH-cam API 0:33 - OAuth c...
Send data from Cloud Functions to PubSub in Python
มุมมอง 10K3 ปีที่แล้ว
Download the code: gitlab.com/ryanlogsdon/cloud-function-to-pubsub We're going to write a Cloud Function in Python. We'll have it listen with Flask for incoming HTTP and HTTPS data POSTs. And then it'll extract the payload and send that data to Pub/Sub for a more robust message-passing architecture. Timestamps: 0:00 - intro 0:22 - set up PubSub 0:50 - write a Cloud Function 4:11 - testing in Py...
Wireless Arduino communication with an NRF24L01+ radio chip (RF24)
มุมมอง 6783 ปีที่แล้ว
Download the code: gitlab.com/ryanlogsdon/arduino-wireless-communication-nrf24l01 Parts: NRF24L01 chips that I'm using (RF24): amzn.to/3rRIxw8 a nice adaptor for the chips on a breadboard: amzn.to/37i6Xp5 Library: github.com/nrf24/rf24 We're going to let one Arduino Uno R3 send messages wirelessly to another Arduino with a Nordic Semiconductor RF24 chip. The code's very simple and comes from De...
Inside Google's SECRET coding interview (Foobar)
มุมมอง 5243 ปีที่แล้ว
I took part in "Foobar," Google's invite-only & somewhat secret coding challenge and interview process. I thought it'd be really fun to share my experiences. So here's Question 1! The cake is not a lie! Commander Lambda has had an incredibly successful week: she completed the first test run of her LAMBCHOP doomsday device, she captured six key members of the Bunny Rebellion, and she beat her pe...
Hologram Nova to Google Cloud Platform with Python
มุมมอง 5613 ปีที่แล้ว
Hologram Nova to Google Cloud Platform with Python
Cloud Firestore deep queries and soft deletions with Angular
มุมมอง 2K3 ปีที่แล้ว
Cloud Firestore deep queries and soft deletions with Angular
Test Google Cloud Functions in Python Locally #short
มุมมอง 5K3 ปีที่แล้ว
Test Google Cloud Functions in Python Locally #short
Cloud Functions: from Pubsub to Firebase Cloud Firestore in Python
มุมมอง 3.7K3 ปีที่แล้ว
Cloud Functions: from Pubsub to Firebase Cloud Firestore in Python
Atlas Scientific pH sensor - switch between UART and I2C modes
มุมมอง 1.9K3 ปีที่แล้ว
Atlas Scientific pH sensor - switch between UART and I2C modes
Cloud Functions: moving data from Pubsub to Firebase Cloud Firestore in TypeScript
มุมมอง 3.2K3 ปีที่แล้ว
Cloud Functions: moving data from Pubsub to Firebase Cloud Firestore in TypeScript
Generating HTTPS certificates for websites in a Virtual Machine
มุมมอง 1473 ปีที่แล้ว
Generating HTTPS certificates for websites in a Virtual Machine
Git Graph: the easiest way to start using git
มุมมอง 17K3 ปีที่แล้ว
Git Graph: the easiest way to start using git
Drag & Drop file uploader with Angular and Firebase
มุมมอง 4.1K3 ปีที่แล้ว
Drag & Drop file uploader with Angular and Firebase
Quickly add Firebase login to Angular (speedrun!)
มุมมอง 9K3 ปีที่แล้ว
Quickly add Firebase login to Angular (speedrun!)
Nice!
Glad it helped
You look so happy while making this video. Thank you so much, I found it very informative.
Haha thank you!
I love you
😹
Hey Ryan, thank you so much!! I was feeling very insecure with Git and using it via the terminal. This tutorial helped me so much! Thanks and greetings from Germany :)
I’m so happy to hear (that’s exactly why I made the video)
Great thanks, but how do i go back on to the rasberry pi normally when i need it? I just did the same as you but added a & to keep the script running
There shouldn’t be any issue logging in normally
@d-i-ry how do I tho? Everytime I turn it on there is just a black screen while the code is running
@@crebz that sounds like there's a problem with the script. it shouldn't block you from any normal actions
@d-i-ry what should happen? Does it turn on as usual but a terminal automatically opens with the code running?
@@crebz yeah, that's all that should happen. i hope you can find the issue. when you get access again (you might need to reimage your Pi), just start slow, and use the exact code I've written. when you see that working, start moving your code into there bit by bit.
very simple explanation, thank you sir
You’re welcome!
I need that every time the Raspberry Pi starts, it opens a photo in a specific folder and puts the photo in slideshow mode. How can I do this?
If this isn’t working for you, then your script is probably trying to use an import that’s not available yet - the script is running before that resource has loaded
what a great video! thanks so much!
You’re welcome!
Could someone theoretically use a ps5 controller as a keylogger and data running device for nearby devices (Bluetooth)? I have concerns about people using internet of things devices, such as ps5 controllers, to surveil and try to infiltrate my cloud and device accounts.
The only reason this works is because the communication is unencrypted. Use encrypted communication, and you’re safe
@@d-i-ry now, white hat concern here: what if the apps have been hacked to send/identify communications as "encrypted" but they're not, or they are shared encryptions (like a parallel concept of a shared SSL certificate). It would be the equivalent of antivirus skipping .nomedia files, and a virus cache folder just plopping a .nomedia in there. And the problem is that once, say, a trafficking victim is "securely contained", they can't a) contact hardware, software, or service providers as they're essentially air gapped and b) their location would be surveilled and any in person attempts to troubleshoot or correct would be met with a socially-engineered intervention. So what's the solution?
7/16 spanners please
🫡
Thank you for your video. I am newbie in Firebase and Google Cloud. May I know, are the steps you mention still necessary? Because I just learn that Firebase function provides @pubsub_fn.on_message_published. Are we able to accomplish the same thing, by just sticking with Firebase? Thanks.
Hi, I’m glad you liked the video! You’re correct, you can trigger a function now, just specify the pubsub topic firebase.google.com/docs/functions/pubsub-events?gen=2nd
nice work man, i am not aa embedded progrmming expert but i understand, do i need to use specificaly a rasberry or i can just use a arduino or some random linux distro (Sorry for bad english)
Hey, any Raspberry Pi will work (arduinos might work? But not with this code)
Thanks
Welcome!
Great video and thanks for sharing the code! One note, for some reason on my DualSense some of the values were incorrectly labeled, therefor the outputs were incorrect. I was able to rework things and got the output I was hoping for. Thanks again!
Welcome!!!
Thanks MANG, this did the trick. used it shell script, to run the pi security camera to the home assistant in motionEye to stream rtsp
Nice work!
Thank you sir 🫡
Glad it helped!
Hello Im trying to text myself via twilio whenever my Raspberry pi restarts ( in case of a power outage) , to know its up and running some sensors. When I run the program through terminal it runs fine, but it wont run if I try it through crontab and restart. My other programs worked in contab on restart tho. Any ideas?
Hey, first off, that sounds like a great project! very nice idea! your debugging approach is great. by the fact that you tried it in the terminal and you know that it works there, you've told me enough to help give you a hint why it's not working on reboot. there's a library (or maybe a few libraries) that your script depends on that haven't loaded yet on reboot. so your script is running before the libraries that it needs are ready to be used. I know you there's an option for you to delay the launch of your app ... if that hint helps you find the solution, please let me know how you got it fixed :)
I have a list of 1000s addresses with no urls. Is it possible to return beds and baths for each, given I don’t know the zpids?)
Yeah you can definitely do that, but you’re going to probably run into a few problems having a list that long: You need to go sloooooooow. The more pages you go to, the more likely you’re going to be flagged as a bot. So try running 100 at a time And remember to have your script sleep for 5 or 10 seconds between every page you go to :) good luck
@@d-i-ry how do I do that? I don’t have ZPIDs. Nor am I a program. I’ve tried to use AI and was plugging in python into google colabortory. No luck
This is a fantastic video, but I have a question about the premise. Since Angular is client side, does adding this reCaptcha actually hide your email from web scrapping if it can be seen when inspecting the elements? Or do web scrapers only view visible content? Thanks again for the video!
Thank you!!! I think your question is: if someone web scrapes your site, can they grab your email? Yeah they can. There's really no way around that, and scrapers are supposed to read and obey whatever wishes you put into a my-website.com/robots.txt file, but they don't have to comply :( If you're worried about getting spammed, I'd create an admin email address for yourself instead of using your real / personal address :)
Great video thanks 😃, super useful.
You’re welcome!
Perfect! and a beginner friendly tutorial!
Thanks!
Great video ! I learned a lot from it. Thanks!
Welcome!
Should I change the req_headers?
Only if you’re seeing a problem. Otherwise, it should all work with the video’s code
why the popup modal is not opened
What do you mean?
@@d-i-ryCould you please upload video on invisible reacptcha in angular
@@kkk9619kk I love that idea. thanks
Beautiful explanation, thank you so much !!!!
I’m really glad it helped!
Excellent tutorial, straight to the point. You made my day. Thank you so much!
I’m really glad to hear
Amazing and to the point! Thanks man👌
Glad it helped!
Hi there, how can I run a terminal command on pi on startup?
Hi what error are you getting (or what’s happening when you try the way I laid out in the video)?
hi. are you using gpio to input the audio? if yes, then how?
Hi, there were no tricks. Just what I showed in the video
your 3 mins video is better than 30 min thank you so much
Haha thanks!!!
Great, concise tutorial, thanks a lot!
Glad it was helpful!
Thank you very much for this tutorial -- your excellent explanation helped me to make first steps in using git yesterday! Thank you!
I’m glad it helped you! Thanks for letting me know :)
What if I notice I made an error, for example, not in the last commit but 4 commit before? How can I undo 4 commit?
I’ve been there! What I would do is check in the current code so I don’t lose it (right or wrong, don’t lose it!). Then it’s your choice if you want to undo the commit 4 times (I would). Then I’d make the fix, but I wouldn’t try to re-commit the next 3 things. I’d jump between branches. And by that, I mean I’d make the fix you want, then I’d go back to the newest code, just copy the good parts of code that you like, and I’d come back to that code from 4 commits ago that you fixed, and I’d paste the good code right on top of it. Save and commit, and forget that you did the extra work from the 3 extra commits
this don't work in Raspberry pi zero
Hi, that’s correct. The raspberry pi zero doesn’t have the same operating system.
What a shame Ryan that you have stopped the video creation. I like not only the tech knowledge but your shining personality. I even watched the completely unrelated to me some video how to fix some old car :) I don't know why, but I always smile and feel good that such people live somewhere on our planet and TH-cam allows them to share some parts of their livies with us.
hi, thanks for writing this last week. you don't know how much i appreciated you doing that. it was really kind, and your message got me to spend the last 6 nights making a project I've wanted to do since last April. I even made a new video about it. thanks for your kind words. they really helped :)
Thanks! You saved my life!
Haha! You’re welcome!
It was worth it to watch.
Thanks!
how to not use ADC
Whatcha mean?
@@d-i-ry application default credentials. I don't want deafout credentials I want pass my own
@@darkdeathoriginal download your service account's credentials in a JSON key file, then add this code: from google.oauth2 import service_account key_path = "/path/to/your/service-account-file.json" credentials = service_account.Credentials.from_service_account_file(key_path) publisher = pubsub_v1.PublisherClient(credentials=credentials) subscriber = pubsub_v1.SubscriberClient(credentials=credentials) :)
@@d-i-ry Thank you. I was using my project credential all this time and getting error.
I am using the version of Angular 15 and I am using a fuse demo template, and I installed the npm library and ng-recaptcha@11.0.0 --save. I followed all the steps but when I see the browser that catpcha does not appear, I wanted to know what the problem is due to please.
Hi Henrry, I don't know what a fuse template is, but try it with the code I've linked in the description first. Try the exact recipe first before adding any extra steps in, and let me know if it works for you that way Good luck :)
Hey is it possible to remap buttons and make macros to play on the playstation itself? For example when pressing L1 + R2 the analog stick pulls 10 procent back?
Hi Danean, Nope. :( This only works because our computers are able to read the bluetooth signal. To do it from a PlayStation, you have to have a PlayStation developer box.
How can I get token from this?
Hi Elen, the result is Success or Failure. So you don’t have to request any tokens
Very nice man! Thank you so much!!
I’m happy it helped!
super clear! thank you!
Welcome, I’m glad it helped!
are there libraries to connect to PubSub directly form an Arduino / esp32?
Oh wow, that sounds like a cool project. I’m sure there are for an esp32, I just haven’t used any
Thanks for the video Ryan, super easy to follow.
Welcome, and I’m glad you liked it
Thanks for the fix, Will it be the same for react based site ?
Welcome! If I were to guess, I’d say no because this was a weird oversight with how angular was designed. I don’t think it’s an Apache issue
Because I have the same problem on my website and it reactjs based.
sir, could you please help with how to dockerize your code? I tried but it didn't seem to work the way I expected. Were you able to dockerize it?
Hi, try running it without a docker image first
@@d-i-ry I did, it worked ok without docker
@@SimKieu hi, ok that means it’s the docker setup and not the code
Hi i am Chanchal from Bangladesh. Would you please share the python code for Atlas isolated carrier board Ph & EC sensor for Raspberry pi 4 with calibration procedure. It will really helpful for me.
Hi I don’t work for them, sorry. This is all the code i’ve got
@@d-i-rycode for ec not working. Would you please share again
Hey sir! Thanks for your very good explanations! What about if i got this running through a Virtual Environment? Do i need something else?
I’m glad you liked it, and you should be good to go!
@@d-i-ryThanks for you response! I tried this, but I got a little error. It doesn't start, on my log file says something like this: Error: XDG_RUNTIME_DIR is invalid or not set in the environment.
Hi @@Fabian.DevOps sorry about that. This is what I found when looking up that error code askubuntu.com/questions/456689/error-xdg-runtime-dir-not-set-in-the-environment-when-attempting-to-run-naut
if you are running your python in a virtual environment you will add a command to start the virtual environment first then your python script so it can load in the dependencies. What I would recommend is using pyinstaller and compiling it first so it loads right away and you dont have a delay for the virtual environment to load.
@@VinnyGjokaj That's right my friend! I did source activate/bin/NAMEENVIRONMENT and then run my .py but doesn't work!
Thank you so much, perfect! Worked right away, been bugging me for ages.
Welcome!