Holy Cow! I'm literally watching your latest video right now! Thanks Ben!
@reo19943 жыл бұрын
thank you for cutting out the fluff most youtubers have, i had lot of questions about this and you were very concise and strait to the piont.
@PrintNPlay3 жыл бұрын
Glad you found it helpful! Let me know if i can answer any questions for you!
@Mitch3D3 жыл бұрын
I have a project in mind for some SSD1306 displays. This really explains what's possible with it with the pico. Great video, really thorough and concise.
@cluso9985 Жыл бұрын
Thankyou. An easy to follow video for my 9yo grandsons. I changed difficulty
@kp_kovilakam3 жыл бұрын
Thank you for pico tutorials, I was looking for one and found at last!💯💕
@PrintNPlay3 жыл бұрын
Glad you enjoyed them!
@adityashukla78493 жыл бұрын
Damn! You're really good with pico. Amazing.
@ramakrishnachivukula92662 жыл бұрын
Excellent work James, very well explained and exciting (especialy your Enthusiam) to view the video. I have been using pico for about 1yr on instrumentation but thus is awesome. I will make this for my grand children.
@PrintNPlay2 жыл бұрын
Thank you so much for your time and kind words! I am so glad you enjoyed it! I have some more games programed and ready to go, just need to find time to video them. Glad to hear you will get some enjoyment from it!
@JernD3 жыл бұрын
The end result and your effort to write this game were awesome!
@weissmannrob3 жыл бұрын
Great work, made my day.
@jyvben15203 жыл бұрын
6:40 counting the pins, if the pico can be placed left most then the breadboard has numbers to help. May not need to solder the pins on, just pin the pico board with the pin from the lead(s) to the breadboard. top left 3.3V is 5th from corner and bottom right third from the corner is ground. (pico is now attached) Take the official layout jpg and replace numbering 40-21 with 1-20 (copy from left side) to make it easier ! use jpg as background for desktop or load it in your web browser as 1 of the homepage(s)
@buildersmark3 жыл бұрын
Awesome job James
@expensivenotes3 жыл бұрын
Excellent work. Well done!
@user_375a823 жыл бұрын
This guy is a genius.
@padmalayarawal30913 жыл бұрын
That's awesome 🤩
@abymohanan94033 жыл бұрын
Thank you so much for this video
@muhammadhussain79763 жыл бұрын
Nice project!
@martinluerssen94873 жыл бұрын
Very impressive and very well done! Thanks!
@CoCoNutBob Жыл бұрын
This gives me hope for my very simple needs! I think even I can do it.
@froilanrivero28263 жыл бұрын
Awesome project. Thanks for this
@jackburton95073 жыл бұрын
WOW, great work
@PrintNPlay3 жыл бұрын
Thank you!
@davidkempton28943 жыл бұрын
Great explanations. Thanks!
@datagod3 жыл бұрын
Dude, your intro is perfect. "I'm James and welcome back to Print 'N Play". I am so tired of all the over produced 40 second intro spews. Scot Adams mentioned on his podcast that youtube should auto-start 40 seconds in. Great video as always.
@born-again-nerd55372 жыл бұрын
Thanks for posting this - I just got a pimoroni pico system handheld coming in soon and I’ve never learned how to code games - so far, I was able to follow your instructions and explanations on what does what, for a complete noobie, very important. I hope I can code a game similar to this one and even maybe add color to it and aliens shooting as well - good video and I subbed :)
@kayleenamanda3 жыл бұрын
So fun!
@physicsgrad3 жыл бұрын
I found your invaders game code from someone else's github then was wondering why this PnP seems familiar. Later I remember that I learnt the morse code interpreter from your video and code, also I've added oled output along with it, looks cool to get output displayed in the oled. Thank you for all the Pico projects, they really help! PnP subscribed :)
@PrintNPlay3 жыл бұрын
Glad you enjoyed the examples, and adding an OLED to the Morse code one is a fantastic enhancement! And glad you found your way back here.
@physicsgrad3 жыл бұрын
@@PrintNPlay Hey I was just trying to add the potentiometer to the circuit as you've shown in the video but the ship's not moving as expected, it's just shaking randomly. Can you please tell me which potentiometer did you used? I had a 10k lying around and I was trying with that.
@PrintNPlay3 жыл бұрын
I'm pretty sure it was also a 10K pot. Does the movement seem to be related to you turning the pot, or is it random even when you aren't turning it?
@physicsgrad3 жыл бұрын
@@PrintNPlay It's random. And also I was getting OSError: [Errno 5] EIO. So I thought maybe the signal pin from the pot was giving some noise so I removed it. Now strangely the random motion is still there even after removing the pot and it's wire. FYI, I have the morse interpreter circuit alongwith it in a single board, do you think that might be an issue?
@PrintNPlay3 жыл бұрын
So, since the potentiometer is read by checking the voltage coming in on an ADC pin, if there is nothing connected to that pin it may be left in a floating state. Static in the air, random em interference, etc, causes the voltage to read random values. And that's what causes the jerking on the ship. Is it possible you had the potentiometer connected to the wrong pin? I don't have access to my source code at the moment, so I can't remember if any of the pins from the Morse code and space invaders game overlap in bad ways.
@prinspatrick15713 жыл бұрын
Great tutorial. No nonsense and bla bla, direct to the point. Love it! Question: how did you create the logo?
@PrintNPlay3 жыл бұрын
I created a 128x64 black and white bitmap, and found a font that I liked for the text. Then I drew the alien out pixel by pixel. Then I used the pillow library for python to import the image and generated a bitarray from it.
@kamilkarchut83623 жыл бұрын
@@PrintNPlay Please provide a code with example if possible.
@PrintNPlay3 жыл бұрын
@@kamilkarchut8362 Sure! I'm working on a tutorial but, for the short form. You need the full install of Python on your computer, plus the Python Image Library (PIL) installed. From there, you can use this function. You pass it your image name, as well as its x and y size. def ConvertImage(ImageName, x, y): im = Image.open(ImageName) resized_im = im.resize((x, y), Image.BILINEAR) monochrome_im = resized_im.convert('1') monochrome_im.tobytes()
@toddknudsen91923 жыл бұрын
This is so cool! Thanks
@petertattam70433 жыл бұрын
well done!!
@dabunnisher29 Жыл бұрын
Very nice. Thumbs up and subscribed.
@pranjalvishwakarma96612 жыл бұрын
Amazing project . Thank you so much
@andreavergani74143 жыл бұрын
Really man. Great tutorial. I just subbed. Ciao
@robertomarquez90653 жыл бұрын
Very nice!
@buildfrom3 жыл бұрын
Fascinating.
@scottmccagg96543 жыл бұрын
Excellent
@binet98063 жыл бұрын
Awesome
@kychemclass58503 жыл бұрын
Nice. Thanks :)
@SusanAmberBruce3 жыл бұрын
Totally Awesome thanks
@NotMarkKnopfler3 жыл бұрын
Regarding improvements: I think this code could be re-factored into separate definitions rather than a long script. That said, the code was ready to read. Great video👍
@PrintNPlay3 жыл бұрын
Couldn't agree more. While the code is functional, there are definitely segments that could be their own subroutines. I will have a new game next week that does this a bit better. I'm afraid I am a bit rusty on the coding side
@AzCowboyOne3 жыл бұрын
This is screaming for asteroids.
@alerey43633 жыл бұрын
Must be harder to code due to the gravitational simulation and the vectored asteroids exploding in multiple parts, all in that tiny display
@engineeringjoe3 жыл бұрын
hey, very cool project! But how did you convert images to the bytebuffers? An answer would be very helpful
@PrintNPlay3 жыл бұрын
I'm working on a tutorial but, for the short form. You need the full install of Python on your computer, plus the Python Image Library (PIL) installed. From there, you can use this function. You pass it your image name, as well as its x and y size. def ConvertImage(ImageName, x, y): im = Image.open(ImageName) resized_im = im.resize((x, y), Image.BILINEAR) monochrome_im = resized_im.convert('1') monochrome_im.tobytes()
@Mikesukes2 жыл бұрын
Where did you find a frambuf library with blit in it, I can't seem to find one all mine are missing that command.
@MinaevNikolay9 ай бұрын
Как вы подготавливаете изображение чтобы получить из него массив данных? И почему некоторые массивы 16-ричные, а некоторые нет?
@theminecraftdays95083 жыл бұрын
Great video, but do you know how to use buttons instead of a potentiometer?
@PrintNPlay3 жыл бұрын
Sure do! A special version of the game was made for the Alien 3D UFO box. Here's a link to the newsletter. If you scroll through it you'll find a wiring diagram, as well as a link to my source code for the build using buttons. www.alien3d.us/july-2021-ufo/
@reddoglavrador3 жыл бұрын
how did you convert images to byte array? I'm trying but only meaningless lines and pixels come out
@PrintNPlay3 жыл бұрын
I'm working on a tutorial but, for the short form. You need the full install of Python on your computer, plus the Python Image Library (PIL) installed. From there, you can use this function. You pass it your image name, as well as its x and y size. def ConvertImage(ImageName, x, y): im = Image.open(ImageName) resized_im = im.resize((x, y), Image.BILINEAR) monochrome_im = resized_im.convert('1') monochrome_im.tobytes()
@animations1889 Жыл бұрын
Great stuff... Is it possible to modify your code to work with WaveShare RGB LED matix 64x64 displays???
@brendanfarthing3 жыл бұрын
Great job, you beat me to it, I was going to do the same (just waiting on some screens to arrive to go with my Pico). Will the speed of your aliens increase as the number of them reduces? In particular when you are down to a few or just one, just like the real Space Invaders? I'm also wondering what performance is like when using Micro Python vs C/C++?
@PrintNPlay3 жыл бұрын
Hey! You can always do a better job of it than me! The alien speeds are constant, although they increase as the levels change. It was more of an experiment to show it at a code level that's good for beginners, so I kept the bells and whistles to a minimum. Performance in C/C++ will undoubtedly be better, since Python adds an additional layer to make it all work. I am waiting for some more hardware to make a C based one. Stay tuned! Oh, and if you code your own Space Invaders clone, feel free to send me a link! Love to see how other people tackle the task
@duncanwalduck77153 жыл бұрын
Next, to do it on E-Paper: obviously a complete mis-use of the technology. (And check the datasheet to see that it won't brick your display). 6:36 - my first Pi analog (direct) input!
@PrintNPlay3 жыл бұрын
I am looking at epaper modules now... Hehehe
@andreaslubeck77163 жыл бұрын
Thank you! This is the Project i was looking for my kid! But, how do i add buttons for left , right and the fire?? Thanks for helping out!
@PrintNPlay3 жыл бұрын
Be glad to help you with the modifications! Are you on twitter by any chance? Might be a good candidate for a direct message! Let me know. If not, I am planning to modify this for buttons shortly, so it's compatible with the other games I have developed for the Pico
@andreaslubeck77163 жыл бұрын
Hi! As long as I am not into Twitter i thought it will be the better way to place a PullRequest or an issue(issue is the wrong word for that!) on your Github repository. So everybody else can follow it and search for FAQ, solved problems and so on. What do you think?
@PrintNPlay3 жыл бұрын
@@andreaslubeck7716 sorry about the delay. Code changes are done, will be pushing to git soon!
@andreaslubeck77163 жыл бұрын
@@PrintNPlay ...great news! Thank you very much for the effort!
@RetroMarkyRM3 жыл бұрын
fabbo, will try this one :)
@AerikForager3 жыл бұрын
Great tutorial, how about and asteroids type game but with a wii nunchuck for control?
@PrintNPlay3 жыл бұрын
Hrmm... I will look at how to interface the nunchuck with the Pico. No promises ,but something fun to try!
@mahmutyildirim76622 жыл бұрын
Pls make an arcadestick with 0.96 inch screen that showing what buttons are pressed on screen.
@PrintNPlay2 жыл бұрын
Check this one out, it's pretty close. You could easily modify it to have the display the button info! kzbin.info/www/bejne/lZC0i4R7hKxpqqM
@RetroGameCoders3 жыл бұрын
👏🕹
@davidkempton28943 жыл бұрын
Can you tell me how the aliens get faster? The "difficulty" variable is obviously related but I cannot see how this value changes the actual speed of the aliens :-)
@PrintNPlay3 жыл бұрын
So, I originally posted that I never implemented it, but I guess my ctrl+f abilities are a little lack luster. This is the line that increases the speed, by removing one from the loop that controls when the aliens move. if loopCount > 16 - difficulty:
@davidkempton28943 жыл бұрын
@@PrintNPlay Hi, yes thanks for that. I actually managed to work it out soon after i posted that request 🤦👍😊
@DanielKeating-tr6hs6 ай бұрын
I'm trying to do space invaders with buttons. I copied and pasted everything from github, but I keep getting this error: Traceback (most recent call last): File "", line 28, in File "ssd1306.py", line 118, in __init__ File "ssd1306.py", line 37, in __init__ File "ssd1306.py", line 74, in init_display File "ssd1306.py", line 123, in write_cmd OSError: [Errno 110] ETIMEDOUT I suspect it is a wiring issue. Is there a schematic for the game with buttons I could use?
@DanielKeating-tr6hs6 ай бұрын
@arnolduk123 You are an amazing human.
@PrintNPlay5 ай бұрын
@arnolduk123 please state the nature of the medical emergency. And thanks for the assist! I appreciate you
@gryzman2 жыл бұрын
animation sequences could be kept in an array, this way you don't have to have if-else
@PrintNPlay2 жыл бұрын
That's a great idea
@rembrandtes2 жыл бұрын
YOUR 999 like is mine . very good game , and perfect explanation congratulations . the game works fine . Pity we have to sacrify one raspberry pico for only one game. I would like to put more things inside this program like animations , and images , controlled by buttons ... is that possible?? I have tried but no results .... the game seems to be a whole thing ...... can not control the start of the game ...... good explanation any way .
@ghahn95773 жыл бұрын
got your code working on an 1106 OLED
@PrintNPlay3 жыл бұрын
Awesome! Is that the 1.3" version?
@ghahn95773 жыл бұрын
@@PrintNPlay yes 1.3 bought by accident but it works with the proper libraries from Github
@PrintNPlay3 жыл бұрын
Glad to hear it! I had built a stream deck using one of them a while ago. I love how clear they are
@ashutoshm.5920 Жыл бұрын
Hey I'm using the sh1106 lib too, I used this code but it's not taking input from the potentiometer maybe the "pot" or its function "read_u16" is not defined in this library, but idk how to make it work or make a function in the library myself so that it takes input , could you help?
@ghahn9577 Жыл бұрын
@@ashutoshm.5920 I had some issues with the potentiometer also. Ended up being wired incorrectly!
@brianmoore54543 жыл бұрын
Hi...love your video about video on the Pico but I have faithfully copied and pasted your code for ssd1306 and Pico pirates but when I try to run it in Thonny I just get the following errors: Traceback (most recent call last): File "", line 20, in File "ssd1306.py", line 110, in __init__ File "ssd1306.py", line 36, in __init__ File "ssd1306.py", line 71, in init_display File "ssd1306.py", line 115, in write_cmd Any ideas what is happening and what I can do to get the program to run?? Tearing my hair out...the errors messages are meaningless to me !!
@PrintNPlay3 жыл бұрын
So, the error seems to be coming from the init subroutine for the display, which usually indicates the screen is incorrectly connected, or the screen is not the right type. Let me know if the wiring is for sure correct and we can go from there!
@brianmoore54543 жыл бұрын
@@PrintNPlay YESSSSSS...its ALIVE...After finally being able to prove or disprove all my stock of OLED's I finally found a way to prove them using the I2C_Scanner sketch for Arduino. That proved that all my stock of OLED's was "stuffed" since the scanner did not return any address for each OLED tried. Luckily I had suspected them for a while and had ordered a bunch of new ones . I then checked those when they arrived today and proved that they worked by checking their addresses (0x3C). I then wired up your "Pico Invaders" code but powered the OLED up by a separate and known power source (both 3.3v and 5v) to start with, ran the code and Hey...IT WORKED. I then proved the OLED would work from the Pico pins at physical Pins 36(+) and 38(-)and sketch in a couple of ways but it is all working nicely now...MANY, MANY thanks to you P'N'P !!! Hope this helps other viewers who try and fail at first but stick with it.
@adamfox65293 жыл бұрын
Could you make a version of this game in the C programming language ?
@PrintNPlay3 жыл бұрын
My C skills are a little rusty, but I am getting back into it... Few more projects to finish ahead of time, but I'll see what I can do!
@adamfox65293 жыл бұрын
@@PrintNPlay thanks a s lot!
@alerey43633 жыл бұрын
The best learning lesson is how much of a realtime system it gets when you dont have a multitasking Linux system laying down; a tiny pico processor like this can run a realtime game with input and responses even if it's coded in python; I bet with C coding you can make a full blown game like 1942 or shooter like that run in the pico
@jaribcastillosalcedo42793 жыл бұрын
Print 'N Play, excellent video! I am trying to adapt your program to my ESP8266. I have modified Pot=ADC(0) and speaker = PWM(Pin(5)) as those are the only ports that would make it work on the ESP8266. However, I keep getting errors :( Any help will be greatly appreciated. Keep up the good work!!!!
@PrintNPlay3 жыл бұрын
I haven't done of coding on the esp8266, but I can try to help! What are the errors you are getting?
@shashankshekharpandey46783 жыл бұрын
Sir I am facing an error could u please help me out The printed error is given below File "", line 20, in File "/lib/ssd1306.py", line 110, in __init__ File "/lib/ssd1306.py", line 36, in __init__ File "/lib/ssd1306.py", line 71, in init_display File "/lib/ssd1306.py", line 115, in write_cmd OSError: 5 BTW nice and concise explanation...thank you so much sir!
@PrintNPlay3 жыл бұрын
Hey there, first thing to check is the wiring on the screen. Errors are coming from the screen library, which is often caused by incorrect wiring. Hope that helps!
@shashankshekharpandey46783 жыл бұрын
@@PrintNPlay Thanks for ur relpy sir , I have checked wiring multiple times it seems correct but still I am facing this error anyways I will try to sort out...Thanku so much sir!
@trash2treasure7862 жыл бұрын
great ... next is flappy bird 😊
@PrintNPlay2 жыл бұрын
Haha! I mean... maybe
@johnberzins30914 ай бұрын
when i do this it has 23 errors
@SusanAmberBruce3 жыл бұрын
Are you a Linux user?
@PrintNPlay3 жыл бұрын
I usually work in both Windows and Linux day to day
@SusanAmberBruce3 жыл бұрын
@@PrintNPlay The reason I ask is that you seem to me like someone who knows a thing or two and I want some advice please, here's the thing, I want to know how to install a Linux distro that is more specific to the hardware I am using, I have Linux Mint 20 installed and it bugs me that the automatic updates install firmware and software for hardware I ain't got and software I ain't using. Is there any Linux distro where one can specify hardware at the time of install and get an installation tailored to that hardware?
@PrintNPlay3 жыл бұрын
I don't have a good answer for you off the top of my head but I am looking into it and asking some friends. Will try my best to get you an answer
@SusanAmberBruce3 жыл бұрын
@@PrintNPlay thank you
@queotzcatl39802 жыл бұрын
Next game Giana sister?
@gartmorn3 жыл бұрын
This'll sound boring but how about tetris? Old school I'm afraid! 🤣
@PrintNPlay3 жыл бұрын
That's actually one of three games I already have partially coded! Just need better collision detection when moving the piece from side to side. Oh, and to use a joystick instead of potentiometer. It will be out soon!
@gartmorn3 жыл бұрын
@@PrintNPlay that sounds good. I'm new to coding so some of the simpler projects are great to help me grasp the concepts involved which I still find quite daunting!
@samilimam39853 жыл бұрын
How do you expect me to connect all the wires when you only show the diagram for only a few seconds .it's IMPOSSIBLE!
@PrintNPlay3 жыл бұрын
It certainly is a cause for pause!
@samilimam39853 жыл бұрын
@@PrintNPlay hahaha loved the answer
@estebanvillalobos23033 жыл бұрын
i can't help but think that this should be integrated into the arduino sphere
@PrintNPlay3 жыл бұрын
Oh, the game could 100 percent be run on an Arduino.