Arduino Star Wars Game - how to make

Поделиться
HTML-код
  • Опубликовано: 12 сен 2024
  • Hello, in this tutorial we will make this little game console on breadboard, We will use 128x64 I2C oled display, arduino nano, three push buttons and buzzer. Our first game will bee star wars game.
    SUBSCRIBE HERE:
    / @volosprojects
    You can also buy me a coffe at:
    ko-fi.com/volo...
    Buy this OLED display here:
    www.banggood.c...
    To program this game you will need libraries , you can download libraries here : drive.google.c...
    You will also need arduino sketch : drive.google.c...
    If you like this project feel free to subscribe for more games and arduino project. Thank you!
    #ArduinoCar #ArduinoProject

Комментарии • 158

  • @kombicruiser2658
    @kombicruiser2658 Год назад +5

    Thanks Volos Project. An entertaining and educational project. I got my non original Nano working on my Windows 11 laptop after updating my CH340 driver with CH341SER driver. Also of use was a gentleman's suggestion below (sorry cant recall who this was)' when using a 0.96 128x64 i2c OLED to :
    You need to call constructor differently this case:
    Thats how your code at lines around 26 should look like:
    #define OLED_RESET 4
    #define SCREEN_WIDTH 128 // OLED display width, in pixels
    #define SCREEN_HEIGHT 64 // OLED display height, in pixels
    Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);

  • @DG_tao
    @DG_tao Год назад +5

    SIMPLE FIX FOR 128x64
    replace and paste this below
    #define OLED_RESET 4
    #define SCREEN_WIDTH 128
    #define SCREEN_HEIGHT 64
    Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);

    • @sugeacosta6513
      @sugeacosta6513 4 месяца назад

      Do you know if I can use a 240x240 inch TFT screen? If so, what would I have to modify to the code?

  • @mysilentwarrior
    @mysilentwarrior Год назад +2

    I ported this to an electronics board I developed that has joysticks and you go up and down using a joystick... Thank you!

  • @davidportilla_
    @davidportilla_ 3 года назад +1

    Nice project! 👏👏 I did a TikTok video with your project for this may 4th. Saludos desde México!!

  • @gabruekqbryh7871
    @gabruekqbryh7871 3 года назад +4

    That’s so cool I already had an AliExpress tab open and I was bout to start looking for the display but the tab was already on the perfect one I needed

  • @sebastianteran3750
    @sebastianteran3750 2 года назад +13

    Si desean corregir el tamaño de la pantalla agreguen esto el número es en donde esta escrito
    27 #define ANCHO_PANTALLA 128 // Ancho de la pantalla OLED
    28 #define ALTO_PANTALLA 64 // Alto de la pantalla OLED
    30 Adafruit_SSD1306 display(ANCHO_PANTALLA, ALTO_PANTALLA, &Wire, OLED_RESET);

    • @thesight2268
      @thesight2268 Год назад +1

      THANKS

    • @sugeacosta6513
      @sugeacosta6513 4 месяца назад

      Se puede poner un pantalla de 240x240 pulgadas? Y si es así que tendría que cambiar, te agradecería si me ayudas

  • @bysatoo
    @bysatoo 4 года назад +15

    For those of you who have problems with the screen, you simply have to configure the pixel size in line 10 and 11 of the code.

    • @jam1930
      @jam1930 4 года назад

      hello, can i ask... the up and down buttons as well as the buzzer didnt work for me. do you know what could be the problem?

    • @bysatoo
      @bysatoo 4 года назад +1

      @@jam1930 check the pins of the buttons and the gnd

    • @fardintechltd7208
      @fardintechltd7208 4 года назад

      How can i configure?

    • @bysatoo
      @bysatoo 4 года назад +1

      @@fardintechltd7208 For those of you who have problems with the screen, you simply have to configure the pixel size in line 10 and 11 of the code.

    • @mahlonkarpaiya252
      @mahlonkarpaiya252 11 месяцев назад

      trying my best but cant see the pixel size thing@@bysatoo

  • @markokasuba1699
    @markokasuba1699 4 года назад +2

    Hvala, sada mi neće biti dosadno

    • @VolosProjects
      @VolosProjects  4 года назад +1

      Nema na cemu 😃

    • @markokasuba1699
      @markokasuba1699 4 года назад +1

      Ja isto znam sa arduino, mada imam 13 godina, kako se zoves

  • @soniccinos
    @soniccinos 2 года назад

    Very nice!!! Can't wait for my display to arrive to try this out!!!

  • @MaxImagination
    @MaxImagination Год назад

    Hi there. I really like your projects! Great stuff!
    I am currently having issues with getting this project's code working with my SSD1315 I2C OLED Display. Do you know what might I need to change in the code to get it working? Thanks!

    • @VolosProjects
      @VolosProjects  Год назад

      Sorry i dont, i never used that display.

    • @MaxImagination
      @MaxImagination Год назад

      @@VolosProjects No worries, thanks for the reply anyway.

    • @sugeacosta6513
      @sugeacosta6513 4 месяца назад

      ​​@@MaxImaginationdid You used it?

  • @gracieparham487
    @gracieparham487 9 дней назад

    Can you play the game without it being plugged into computer?

  • @gustirama1771
    @gustirama1771 4 года назад +2

    The library support to 32 bit?

  • @jancarlosmarc8735
    @jancarlosmarc8735 4 года назад +2

    saludos de Colombia amigo muchas gracias por el juego

  • @davidabraham3873
    @davidabraham3873 4 года назад +2

    Is there a way to pair rc receiver to arduino transmitter, I want an rc receiver because of how compact and cheap it is and also the wide voltage range I can input to it

  • @Ramonvdh
    @Ramonvdh 4 года назад

    What a great Arduino projec, thaks for sharing! Did you write the sketch yourself?

    • @VolosProjects
      @VolosProjects  4 года назад +1

      Hello! Thank you! Yes i did, feel free to use or modify code :)

    • @Ramonvdh
      @Ramonvdh 4 года назад +1

      @@VolosProjects Thank you very much, I want to try and port it to ESP-WROOM-02, just for fun :)

    • @oneguyoneblog7388
      @oneguyoneblog7388 4 года назад

      @@VolosProjects I modified it for the ESP-WROOM-02 (esp8266), I hope you like it! ruclips.net/video/ryxZ4GuhdXc/видео.html

  • @abod.y83
    @abod.y83 Год назад

    أين الكود code

  • @astronautrajan
    @astronautrajan 3 года назад +1

    the movement switches are connect with D11 and D12 and firing is at D3 and all ground are common i am right ??? pleasee tell

  • @sefanja4777
    @sefanja4777 Год назад +1

    The google drive link expired. Can you give us the new one? :)

    • @naredino
      @naredino 9 месяцев назад

      Did you find the libraries???

  • @KellerG68
    @KellerG68 4 года назад +1

    Hi, did you do something special to connect both buzzer and OLED screen ? I had issues about that with a nano (you got exactly the same setup). I heard about the choosen pin that can be the source of the problem.
    Someone else talked about the buzzer that could not be a real buzzer, do you have some references ? ;)
    Your projects are great !

    • @VolosProjects
      @VolosProjects  4 года назад +3

      Thank you, i didnt do anything special. But i remeber that i have that problems in past, i just used another pin on arduino. Dont forget setup that pin in code.

    • @KellerG68
      @KellerG68 4 года назад +1

      @@VolosProjects Thanks, I also get a freeze when I used both buzzer and OLED, I will check the pin 9 on the nano, it could be the problem solver 😉

  • @cuarentenaviral4756
    @cuarentenaviral4756 4 года назад +1

    Porque no me funcionan los botones si las conexiones son correctas?

  • @electronic7979
    @electronic7979 5 лет назад +1

    Very good 👍

  • @skulltronics3680
    @skulltronics3680 3 года назад +1

    Awesome video but the code is for a 128x32 size display

  • @ludwik8240
    @ludwik8240 5 лет назад +1

    Great little game. just have one question. What is " long readVcc " doing? during compilation it shows me error on every variable as not declared and game is working fine after removing that part from code. But maybe is needed for something? Thanks

    • @VolosProjects
      @VolosProjects  5 лет назад +1

      Omg, i forgot to delete that part, if you power arduino with lipo baterry, that part will tell you voltage of battery, you can delete it, it is not needed for game

  • @ezraserdynski317
    @ezraserdynski317 4 года назад +2

    I was Wondering How you would go about Programming this code to be displayed on a TV screen though an RCA cable?
    Please let me know!

  • @laraarnedo7417
    @laraarnedo7417 Год назад

    Hey bro. I am new to arduino projects. can you tell if i still need to sketch the pixel display or you provided it on the description

  • @damainx
    @damainx 3 года назад +1

    Getting an error with this ... ADMUX = _BV(REFS0) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1); This is the error from the IDE ... 'ADMUX' was not declared in this scope. Also, one of the libraries, Adafruit_SSD1306_Wemos_OLED is not included in the sketch. Also, the code is very messy.

  • @vitoriarani5782
    @vitoriarani5782 Месяц назад

    Hello, I loved your project. But I'm having a problem downloading the libraries, when I enter the link it always gives an error, could anyone help me?

  • @chouaibfethallah3575
    @chouaibfethallah3575 3 года назад +1

    How do you change size to fit screen

  • @shahriarsinon6993
    @shahriarsinon6993 5 месяцев назад

    I can't see the full game on my oled display screen.Please help.

  • @mohammedziyad753
    @mohammedziyad753 10 дней назад

    It did not work ?

  • @user-wn1hr6yx2f
    @user-wn1hr6yx2f 4 года назад +1

    Hey man, nice project. I have a question. Can this project be built on arduino UNO aswell?

    • @VolosProjects
      @VolosProjects  4 года назад +1

      Yes, Uno and nano use same MCU

    • @user-wn1hr6yx2f
      @user-wn1hr6yx2f 4 года назад

      @@VolosProjects Will the code need any changes though? Thanks for replying!

    • @VolosProjects
      @VolosProjects  4 года назад

      @@user-wn1hr6yx2f no

    • @user-wn1hr6yx2f
      @user-wn1hr6yx2f 4 года назад

      @@VolosProjects I have 1 more question. When i apload the code and try to verify it. There is an error thats says, low memory available. That means my arduino UNO does not have enough space for the code?

    • @VolosProjects
      @VolosProjects  4 года назад +1

      @@user-wn1hr6yx2f it is just warning, just upload code

  • @crisselectronicprojects8408
    @crisselectronicprojects8408 5 лет назад +2

    Nice! Very good 👍

  • @Duckyyfnshorts
    @Duckyyfnshorts 2 года назад

    sound works but screen does not

  • @gabruekqbryh7871
    @gabruekqbryh7871 3 года назад +1

    I'm new to all of this but which Arduino is that?

  • @tszulpinedo757
    @tszulpinedo757 2 года назад +1

    Está bien hermoso... 😍

  • @felipemunoz8752
    @felipemunoz8752 6 месяцев назад

    Cool video but the libraries link is broken, thanks

  • @michellecloydannetanada1994
    @michellecloydannetanada1994 2 года назад

    thanks bro its work!!!

  • @mateopineda5431
    @mateopineda5431 3 года назад

    can you use the TVOUT package in another tutorial to make the game on a mini CRT screen?

  • @conorwardick2154
    @conorwardick2154 3 года назад +1

    am using this for a project would anybody know to to change the display size as i am using this on a smaller screen?

    • @gabruekqbryh7871
      @gabruekqbryh7871 3 года назад +1

      Smaller than the one he’s already using??

  • @OttoisOhio
    @OttoisOhio 2 года назад

    Help I have make everything right and it’s work before and it’s not displaying now, I suspect maybe I uploaded too many times or the display die. If it’s the display how can I fix it.

  • @shahnewajbd4623
    @shahnewajbd4623 4 месяца назад

    Circuit diagram link please

  • @gabrielhenrick2697
    @gabrielhenrick2697 Год назад

    is it possible to do with an esp32 and a st7789 display?

  • @lewlew212
    @lewlew212 27 дней назад

    Can you share the code?

  • @digitalturn6267
    @digitalturn6267 4 года назад

    very good !

  • @ingenierocristian
    @ingenierocristian 8 месяцев назад

    Hi, the file in Google Drives appears as not found, could you help me with the code?

  • @ForwardEngineering
    @ForwardEngineering 4 года назад +1

    Could adapt this to a 128x64 0.96" Display easily? Awesome video by the way!

    • @VolosProjects
      @VolosProjects  4 года назад

      this is 0.96 128x64 i2c OLED, maybe you have SPI veon with more pins?

    • @ForwardEngineering
      @ForwardEngineering 4 года назад

      @@VolosProjects This is what I have. www.ebay.com/itm/0-96-I2C-IIC-Serial-128X64-128-64-Blue-OLED-LCD-LED-Display-Module-for-Arduino/382850692423?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2060353.m2749.l2649

    • @ForwardEngineering
      @ForwardEngineering 4 года назад

      I noticed in the code at the top it says its for a 128x32 size display using I2C

    • @ForwardEngineering
      @ForwardEngineering 4 года назад

      Here is a video of my issue. ruclips.net/video/p9GSG2C5qK0/видео.html

    • @user-jb8lx2jq5v
      @user-jb8lx2jq5v 4 года назад +3

      @@ForwardEngineering I had the same issue and I found the solution, looks like you're using new libraries from arduino repository with Volos's sketch.
      You need to call constructor differently this case:
      Thats how your code at lines around 26 should look like:
      #define OLED_RESET 4
      #define SCREEN_WIDTH 128 // OLED display width, in pixels
      #define SCREEN_HEIGHT 64 // OLED display height, in pixels
      Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);

  • @PoweredBricks
    @PoweredBricks 4 месяца назад

    Will it work on nano uno or mega?

    • @VolosProjects
      @VolosProjects  4 месяца назад

      probably it will , i tried only on nano

  • @kevinperies4450
    @kevinperies4450 2 года назад

    sir, the game works fine but it does not fit to the screen size its enlarged and i can only see half of the picture, any solutions?

    • @VolosProjects
      @VolosProjects  2 года назад

      Your library is set to 128x32 so picture is sreched, you need to set it to 128x64

  • @xalbert1709
    @xalbert1709 2 месяца назад

    hello! it can not download

  • @clintpereira4529
    @clintpereira4529 2 года назад

    good morning bro i need this to work for 1.3 inch oled display.

  • @poliewzs
    @poliewzs 4 года назад

    can you please help me with the 0.96 "128x64 oled code.

  • @vel1800
    @vel1800 4 года назад +1

    why cant i upload my code to my arduino nano

    • @VolosProjects
      @VolosProjects  4 года назад +1

      i dont know, it can be many reasons

  • @matthart4045
    @matthart4045 2 года назад

    I got the hardware going but cant get it to fit the screen. Seems super zoomed in. Any thoughts?

    • @VolosProjects
      @VolosProjects  2 года назад

      hi mat, your library is set to 128x32, you need to set 128x64. Do you use library i posted in description?

    • @matthart4045
      @matthart4045 2 года назад

      @@VolosProjects I downloaded the library zip file but the ide is saying it doesn't contain a valid library. Can I change it manually?

    • @VolosProjects
      @VolosProjects  2 года назад

      Do you bave original adafruit library? Od you bave , you Will news to delte iz bacouse they Will ne on conflict

  • @maronara3398
    @maronara3398 4 года назад +2

    does this work with an lcd

  • @ruslanserov1782
    @ruslanserov1782 2 года назад

    Классно, всё работает. Но у меня экрас IIC OLED SSD 1306 и контроллер Arduino UNO 12 MHz. Работает медленнее и треть экрана игры не входит в дисплей (в нижней части)

  • @mrparmar5468
    @mrparmar5468 Год назад

    i cant download libraries plz do solution

  • @mahlonkarpaiya252
    @mahlonkarpaiya252 11 месяцев назад

    i Just amde this game with my children and love it. I have one problen i need to resize the screen. on my screen the bottom of the image is cut off like i need to shring the game display. is this posible?

    • @VolosProjects
      @VolosProjects  11 месяцев назад

      Hello, now, you need to eneter setup file of library, i forgot name of that file and you need to chose correct size of your display

    • @naredino
      @naredino 9 месяцев назад

      Did you find the libraries???

  • @kimirlines_5464
    @kimirlines_5464 Год назад

    can't download library(

  • @JC-zl7sq
    @JC-zl7sq 5 лет назад

    I like it

  • @mrparmar5468
    @mrparmar5468 Год назад

    Hey plz do solution for libraries , i can't download 😢

    • @naredino
      @naredino 9 месяцев назад

      Did you find the libraries???

  • @mahmoodrezajarandei5839
    @mahmoodrezajarandei5839 Год назад

    Great job! But as an educational material, I opened your code and none of the variables made sense to me, so i didn't learn much by reading it. I wish they were in English so that everyone could understand.

    • @NLGeebee
      @NLGeebee 10 месяцев назад

      What about copy paste the variables in Google translate or DeepL?
      Then you search and replace all variables with the translated ones.

  • @TrailMaker2
    @TrailMaker2 2 года назад

    I have TFT LCD Display Module 1.3inch SPI 240x240 RGB ST7789 and I tried making this project but I didn t manage to make it because the code doesn t work for my display, I tried modifying it but the screen only flickers and I see only half of the star ship and its not playable at all. Can you pls help me with the code?

  • @MikevomMars
    @MikevomMars 3 года назад +2

    For some unknown reason, Arduino people seem to hate provding a parts list in their video description 😑

  • @arduinoseruveni
    @arduinoseruveni 5 месяцев назад

    ı am dont see score

  • @Dead-blox
    @Dead-blox 3 года назад

    It just said no such file or directory.

  • @thezombieguy426
    @thezombieguy426 3 года назад

    Hi there nice game , but after i uploaded the code the starship either goes up or down automatically , and idk how to fix this problem , any help?

    • @VolosProjects
      @VolosProjects  3 года назад

      I dont know, I havent tried game latley , you can try to check conection

  • @vel1800
    @vel1800 4 года назад +1

    can u use oled 128 x 64 ?

    • @VolosProjects
      @VolosProjects  4 года назад

      this is oled 128x64

    • @vel1800
      @vel1800 4 года назад

      @@VolosProjects but when i uploaded the script, the display is stretched. The ship does not appear on the oled

    • @VolosProjects
      @VolosProjects  4 года назад +2

      @@vel1800 your library is probably set to 128x32 you will need to find Adafruit_SSD1306.h file inside your library folder. You will need to edit it. Un comment 128x64 and comment 128x32

    • @vel1800
      @vel1800 4 года назад +1

      @@VolosProjects ohhhhh, thanks mann

    • @user-wn1hr6yx2f
      @user-wn1hr6yx2f 4 года назад +1

      @@vel1800 hi i got the same problem. I found the Adafruit_SSD1306.h file but how do u edit it?

  • @Emre-rf4uz
    @Emre-rf4uz 5 месяцев назад

    buttons are not working

    • @King_Thenuja
      @King_Thenuja 5 месяцев назад +1

      Probably you didn't connect a wire or mal connected it or an error in the code

  • @ItzZappy
    @ItzZappy Год назад +1

    the link didnt work

    • @naredino
      @naredino 9 месяцев назад

      Did you find the libraries???

  • @unclelelax8341
    @unclelelax8341 Год назад

    is this convertable to 3.5 tft lcd with uno?

  • @americanpsychosis11
    @americanpsychosis11 4 года назад

    Do you know if there is a way to get this to work with the adafruit ssd1331 oled?

    • @VolosProjects
      @VolosProjects  4 года назад +1

      sorry, i never used 1331 , you can try

    • @hilside3565
      @hilside3565 3 года назад

      i tried and is not working

  • @yakupanilozturk3128
    @yakupanilozturk3128 2 года назад

    cool project,but the code is messy, please consider giving English names to the variables and add comment lines

    • @VolosProjects
      @VolosProjects  2 года назад +1

      Yes i know, that is old project. Sorry, now i am trying to make more redable code.

  • @senulavindivwijeweera235
    @senulavindivwijeweera235 2 месяца назад

    code please!!!!!

  • @royalrubie1149
    @royalrubie1149 4 года назад

    Can we use pro mini

  • @aldoortaestrada3379
    @aldoortaestrada3379 2 года назад

    Can we use ESP8266?

  • @chirudb
    @chirudb 5 лет назад +2

    Circuit diagram please

  • @sajeevikaperera4215
    @sajeevikaperera4215 3 года назад

    Can you pls send me the code of 0.96 oled display. It would great help

    • @VolosProjects
      @VolosProjects  3 года назад

      You can download it, it is in description

    • @VolosProjects
      @VolosProjects  3 года назад

      You can download it, it is in description

  • @Duckyyfnshorts
    @Duckyyfnshorts 2 года назад

    could someone help me

  • @user-hn8zh9zh5f
    @user-hn8zh9zh5f 9 месяцев назад

    library code give me

    • @naredino
      @naredino 9 месяцев назад

      Did you find the libraries???

  • @Markovicc21
    @Markovicc21 11 месяцев назад

    volose brt pomagaj ovaj google drive link ti neradi vise

    • @naredino
      @naredino 9 месяцев назад

      Did you find the libraries???