Premier Engineer
Premier Engineer
  • Видео 4
  • Просмотров 81 693
Making a Game Controller with Arduino | Build Timelapse
I try to construct a simple PC-compatible game controller using an Arduino. This video is not a tutorial. Leave a comment below if you are interested in a tutorial.
Special thanks to Tanmay Deuskar , whose tutorial on Instructables greatly helped me with Processing, a language and program I was not familiar with.
Here is the link:
www.instructables.com/id/Video-Game-Controller-With-Arduino/
Просмотров: 584

Видео

Make a Weather Station in 1 Minute with Arduino
Просмотров 4984 года назад
Learn to use a DHT11 Sensor to make a Weather Station that shows humidity and temperature. This is a really fun and easy beginner project to understand the basics of circuitry and Arduino. Code: drive.google.com/file/d/1lQZ8aMxsBIsVrV1Tll8-Qnc0GMWbgvLP/view?usp=sharing Hope you enjoy!
Arduino Stopwatch with LCD | Beginner Arduino Project
Просмотров 30 тыс.4 года назад
In this video I will show you how to use an LCD display with an Arduino to create a basic stopwatch that can record time, display the time where stopped, and reset itself to be used again.
Control an RGB LED with a Button | Beginner Arduino Project
Просмотров 51 тыс.4 года назад
In this tutorial, you will learn to use Arduino to make a simple RGB LED Light and adjust it's color with a button.

Комментарии

  • @destinyirorere4448
    @destinyirorere4448 2 дня назад

    Very underrated youtuber 😢 I hope you get more subs and create more videos

  • @Sizzlik
    @Sizzlik 8 дней назад

    The longest leg on an RGB LED is NOT the Cathode..nor the Anode. Its the COM for common. As it can be either a common/shared Anode or a Cathode..that depends on the LED you bought..both available. And on everyday LED or other diodes or polarized capacitors, the longest is the Anode(+). Dont make tutorials, if you teach bullshite.

  • @MH-YouTube-Controlled
    @MH-YouTube-Controlled 19 дней назад

    Well done, clear instructions, and helpful. Thank you.

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

    here is a simple version (works kind off the same): #define blue 3 #define green 5 #define red 6 int mode = 0; void setup() { pinMode(red, OUTPUT); pinMode(green, OUTPUT); pinMode(blue, OUTPUT); } void loop() { int bluevalue = random(1, 500); int redvalue = random(1, 500); int greenvalue = random(1, 500); analogWrite(blue, bluevalue); analogWrite(red, redvalue); analogWrite(green, greenvalue); delay(400); } //YES i wrote this

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

    For everybody here saying this code did not work for them. Check your RBG LED and ensure it is a common cathode and not a common anode. I had the same issue and when I installed the correct RGB LED it worked perfectly

    • @BrosifStalin
      @BrosifStalin 3 месяца назад

      Then how do u make it work with a anode pin RGB LED

    • @codymagasich8051
      @codymagasich8051 3 месяца назад

      @@BrosifStalin it’s a completely different circuit for a common anode. I’m not an expert on them but you could probably find circuit diagrams online to compare the two. I just purchased the common cathodes when I realized that was the problem

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

    I have a problem tho... I need to program 2 rgb led lights and they are expected to function like traffic lights signals... can anybody send help?😅 I need rgb led 1 (red light) to light up together with rgb led 2 (green light)... thing is they should have different durations ... though they lighted up together, they should turn off on different time durations. The rgb led 1 should light up for 15 secs and the rgb 2 should light up for 12 secs. Please help

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

    This was perfect, thank you SO much

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

    It wad realy helpful

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

    here is code i write it //define pins #define BLUE 6 #define GREEN 3 #define RED 5 #define button 2 //define color mode int mode = 0 ; void setup() { pinMode(RED, OUTPUT); pinMode(GREEN, OUTPUT); pinMode(BLUE, OUTPUT); pinMode(button, INPUT_PULLUP); } void loop() { if (digitalRead(button) == LOW){ mode = mode + 1 ; delay(400); } //off if (mode == 0){ analogWrite(BLUE, 0); analogWrite(GREEN, 0); analogWrite(RED, 0); } //White if (mode == 1){ analogWrite(BLUE, 255); analogWrite(GREEN, 255); analogWrite(RED, 255); } //Red if (mode ==2){ analogWrite(BLUE, 0); analogWrite(GREEN, 0); analogWrite(RED, 255); } //blue if (mode == 3){ analogWrite(BLUE, 255); analogWrite(GREEN, 0); analogWrite(RED, 0); } //orange if (mode == 4){ analogWrite(BLUE, 0); analogWrite(GREEN, 75); analogWrite(RED, 255); } //White if (mode == 5){ analogWrite(BLUE, 255); analogWrite(GREEN, 255); analogWrite(RED, 255); } //Violet //White if (mode ==6){ analogWrite(BLUE, 255); analogWrite(GREEN, 0); analogWrite(RED, 100); } //switch off //White if (mode == 7){ mode = 0; } }

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

      use mine: *it has way more colors than this childrens toy code*: #define blue 3 #define green 5 #define red 6 void setup() { pinMode(red, OUTPUT); pinMode(green, OUTPUT); pinMode(blue, OUTPUT); } void loop() { int bluevalue = random(1, 500); int redvalue = random(1, 500); int greenvalue = random(1, 500); analogWrite(blue, bluevalue); analogWrite(red, redvalue); analogWrite(green, greenvalue); delay(400); }

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

    Can you put the code in the description plz

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

    How may I set the led to super slow changing colors such as 10 seconds delay transition colors of rgb and switch automatically to music reactive mode when there is playing music or songs on my videoke and turn back automatically to super slow changing colors of red green blue when there's no music playing or in standby mode?

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

    Very clear and extremely useful at this point.

  • @legend_guyes7638
    @legend_guyes7638 7 месяцев назад

    Guys i wrote the Code, Here // define pins #define BLUE 3 #define GREEN 5 #define RED 6 #define button 2 // define color mode int mode = 0; void setup() { // setup LED lights pinMode(RED, OUTPUT); pinMode(GREEN, OUTPUT); pinMode(BLUE, OUTPUT); //setup buttons pinMode(button, INPUT_PULLUP); } void loop() { if (digitalRead(button) == LOW) { mode = mode + 1; delay(400); } // off if (mode == 0) { analogWrite(BLUE, 0); analogWrite(GREEN, 0); analogWrite(RED, 0); } // White if (mode == 1) { analogWrite(BLUE, 225); analogWrite(GREEN, 225); analogWrite(RED, 225); } // Red if (mode == 2) { analogWrite(BLUE, 0); analogWrite(GREEN, 0); analogWrite(RED, 225); } // Orange if (mode == 3) { analogWrite(BLUE, 0); analogWrite(GREEN, 75); analogWrite(RED, 225); } // Yellow if (mode == 4) { analogWrite(BLUE, 0); analogWrite(GREEN, 220); analogWrite(RED, 225); } //Green if (mode == 5) { analogWrite(BLUE, 0); analogWrite(GREEN, 225); analogWrite(RED, 0); } //Blue if (mode == 6) { analogWrite(BLUE, 225); analogWrite(GREEN, 0); analogWrite(RED, 0); } // Violet if (mode == 7) { analogWrite(BLUE, 225); analogWrite(GREEN, 0); analogWrite(RED, 100); } // Switch off if (mode == 0) { mode = 0; } }

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

      Life saver

    • @NuzrathSir
      @NuzrathSir 3 месяца назад

      how nice of you,,,!! lovely

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

      for anyone that cant really copy paste and want a simpler version, (im experienced with 4 years coding), here is a way simpler version written by me (its actually is more advanced and has way more colors but is easier to write) #define blue 3 #define green 5 #define red 6 int mode = 0; void setup() { pinMode(red, OUTPUT); pinMode(green, OUTPUT); pinMode(blue, OUTPUT); } void loop() { int bluevalue = random(1, 500); int redvalue = random(1, 500); int greenvalue = random(1, 500); analogWrite(blue, bluevalue); analogWrite(red, redvalue); analogWrite(green, greenvalue); delay(400); }

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

      ok ye i forgot to remove the: *int mode = 0* but u can type it or skip it either way it will still work

  • @anuragnayak324
    @anuragnayak324 7 месяцев назад

    Why can't we connect a single resistor to the cathode? I am going to do that...

  • @Bansheekilr
    @Bansheekilr 7 месяцев назад

    This is exactly what I was looking for! Thanks 🙏

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

    Hello friend. You can make a video where the stopwatch will only work when the button is pressed. Thank you in advance. I'm signed up.😊

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

    puedes ayudar con el codigo

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

    Can you pls give me code because mine is not working

  • @ZayanMuneer-kt5kp
    @ZayanMuneer-kt5kp 11 месяцев назад

    what is the size of the breadboard

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

    Everryone looking for a code : #define BLUE 3 #define GREEN 5 #define RED 6 #define button 2 int mode = 0; void setup() { pinMode(RED, OUTPUT); pinMode(GREEN, OUTPUT); pinMode(BLUE, OUTPUT); pinMode(button, INPUT_PULLUP); } void loop() { if (digitalRead(button) == LOW) { mode = mode + 1; delay(400); } if (mode == 0) { analogWrite(BLUE, 0); analogWrite(GREEN, 0); analogWrite(RED, 0); } // White if (mode == 1) { analogWrite(BLUE, 255); analogWrite(GREEN, 255); analogWrite(RED, 255); } // Red if (mode == 2) { analogWrite(BLUE, 0); analogWrite(GREEN, 0); analogWrite(RED, 255); } // Orange if (mode == 3) { analogWrite(BLUE, 0); analogWrite(GREEN, 75); analogWrite(RED, 255); } // Yellow if (mode == 4) { analogWrite(BLUE, 0); analogWrite(GREEN, 220); analogWrite(RED, 255); } // Green if (mode == 5) { analogWrite(BLUE, 0); analogWrite(GREEN, 255); analogWrite(RED, 0); } // Blue if (mode == 6) { analogWrite(BLUE, 255); analogWrite(GREEN, 0); analogWrite(RED, 0); } // Violet if (mode == 7) { analogWrite(BLUE, 255); analogWrite(GREEN, 0); analogWrite(RED, 100); } // Switch Off if (mode == 8) { mode = 0; } }

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

      I was gonna make a comment about the sheer laziness of people, but your kindness kinda changed my mind. I don't know how following along and copying down what's on the screen is so difficult. I learn in chunks, so following along is how I figure stuff out. Then I went on to apply the same code for servo positioning. It's really cool to learn from pre-written stuff rather than just copying and pasting what's already being handed to folks. Didn't see your comment until I revisited this video to share it with a friend. I applaud you for having the patience and kindness to do the work that so many people refuse to do for themselves. I could understand the frustration if a maker uploads a "thing" and doesn't even show the code on the screen, but this guy showed all of it! 😂

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

      @@KOAlleyCat with arduino you have to play with the code around and see what it does hardware wise regardless if you really wish to understand what the commands do

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

      @@j0hnk120 yep, and most people aren’t willing to put in that kind of work to learn. They just want instant results without bothering to figure out *how* anything works

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

      Lmao its literally gonna do the same thing it does on video what do you expect it to do @@KOAlleyCat

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

      @@j0hnk120 What? I think you’re misinterpreting my comments.

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

    This tutorial was very helpful for me! I wasn't really understanding arduino push button stuff and this helped me a lot! Thank you!

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

    wait it keeps saying pinmode not defined or something like that?

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

    Hit this button if you looked at the first section of code before the guy explains it 👇

  • @Tech.Explorer.X
    @Tech.Explorer.X Год назад

    can anyone let me know what is wrong with this code i copied the exact coding from the video i rechecked it but there is still errors on it my code| | | v // define pins #define Blue 3 #define Green 5 #define Red 6 #define button 2 // define color mode int mode = 0; void setup() { //setup LED lights pinMode(RED, OUTPUT); pinMode(GREEN, OUTPUT); pinMode(BLUE, OUTPUT); // setup buttons pinMode(button, INPUT_PULLUP); } void loop() { if (digitalRead(button) == LOW) { mode = mode + 1; delay(400); } // off if (mode == 0) { anaLogWrite(BLUE, 0); anaLogWrite(GREEN, 0); anaLogWrite(RED, 0); } // White if (mode == 1) { anaLogWrite(BLUE 255); anaLogWrite(GREEN, 255); anaLogWrite(RED, 255); } // Red if (mode == 2) { anaLogWrite(BLUE, 0); anaLogWrite(GREEN, 0); anaLogWrite(RED, 255); } // Orange if (mode == 3) { anaLogWrite(Blue, 0); anaLogWrite(GREEN, 75); anaLogWrite(RED, 255); } // Yellow if (mode == 4) { anaLogWrite(BLUE, 0); anaLogWrite(GREEN, 220); anaLogWrite(RED, 255); } // Green if (mode == 5) { anaLogWrite(BLUE, 0); anaLogWrite(GREEN, 255); anaLogWrite(RED, 0); } // Blue if (mode == 6) { anaLogWrite(BLUE, 255); anaLogWrite(GREEN, 0); anaLogWrite(RED, 0); } // Violet if (mode == 7) { anaLogWrite(BLUE, 255); anaLogWrite(GREEN, 0); anaLogWrite(RED, 100); } // Switch Off if (mode == 8) { mode = 0; } }

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

      Hello, The biggest problem is that you put in #define red,green and blue instaed of RED,GREEN and BLUE (the capital letters make a differrence).Also you had little mistakes in your code like not using "," before color and stuff.Here is your code #define BLUE 3 #define GREEN 5 #define RED 6 #define button 2 int mode = 0; void setup() { pinMode(RED, OUTPUT); pinMode(GREEN, OUTPUT); pinMode(BLUE, OUTPUT); pinMode(button, INPUT_PULLUP); } void loop() { if (digitalRead(button) == LOW) { mode = mode + 1; delay(400); } if (mode == 0) { analogWrite(BLUE, 0); analogWrite(GREEN, 0); analogWrite(RED, 0); } // White if (mode == 1) { analogWrite(BLUE, 255); analogWrite(GREEN, 255); analogWrite(RED, 255); } // Red if (mode == 2) { analogWrite(BLUE, 0); analogWrite(GREEN, 0); analogWrite(RED, 255); } // Orange if (mode == 3) { analogWrite(BLUE, 0); analogWrite(GREEN, 75); analogWrite(RED, 255); } // Yellow if (mode == 4) { analogWrite(BLUE, 0); analogWrite(GREEN, 220); analogWrite(RED, 255); } // Green if (mode == 5) { analogWrite(BLUE, 0); analogWrite(GREEN, 255); analogWrite(RED, 0); } // Blue if (mode == 6) { analogWrite(BLUE, 255); analogWrite(GREEN, 0); analogWrite(RED, 0); } // Violet if (mode == 7) { analogWrite(BLUE, 255); analogWrite(GREEN, 0); analogWrite(RED, 100); } // Switch Off if (mode == 8) { mode = 0; } }

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

    thanks a lot this helped me with my project for school, keep up this amazing content

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

    ASANG ANG CODEEEEEEEEEEEEEEee

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

      #define blue 3 #define green 5 #define red 6 void setup() { pinMode(red, OUTPUT); pinMode(green, OUTPUT); pinMode(blue, OUTPUT); } void loop() { int bluevalue = random(1, 500); int redvalue = random(1, 500); int greenvalue = random(1, 500); analogWrite(blue, bluevalue); analogWrite(red, redvalue); analogWrite(green, greenvalue); delay(400); }

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

    Cam someone help me with this issue I'm having. I want to put leds on a switch box for back lighting but I want the led the change color when the switch is on. Someone please help me out with this. I would highly appreciate the help..

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

    how do u reset it

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

    Do u know how to make one for hot wheels track?

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

    Hi

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

    its beautiful. can i use touchpad for start and stop. need to transmit the start and stop time via bluetooth to laptop/tablet/mobile etc. please....

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

    How can I make the LED take less time to change color?

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

      you can do it by reducing the delay time in code

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

    I know you don't want to share your code, but it would help if you made the text on screen bigger, so we could follow along

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

    I would be great if you can make it with a 7219 matrix panel

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

    my lcd broke

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

    Is there a way to make it countdown? like a timer?

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

    im interested in a tutorial :>

  • @Spencer-vq7se
    @Spencer-vq7se 2 года назад

    does not work

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

    cooooooooooooooooooooooooooodeeeeeeeeeeeeeeeeeeeeee

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

      #define BLUE 3 #define GREEN 5 #define RED 6 #define BUTTON 2 //define color mode int mode = 0; void setup() { //setup LED lights pinMode(RED,OUTPUT); pinMode(GREEN,OUTPUT); pinMode(BLUE,OUTPUT); //setup buttons pinMode(BUTTON,INPUT_PULLUP); } void loop() { if(digitalRead(BUTTON) == LOW) { mode = mode + 1; delay(400); } //OFF if (mode == 1) { analogWrite(BLUE, 0); analogWrite(GREEN, 0); analogWrite(RED, 0); } //WHITE if (mode == 1) { analogWrite(BLUE, 255); analogWrite(GREEN, 255); analogWrite(RED, 255); } //RED if (mode == 2) { analogWrite(BLUE, 0); analogWrite(GREEN, 0); analogWrite(RED, 255); } //ORANGE if (mode == 3) { analogWrite(BLUE, 0); analogWrite(GREEN, 75); analogWrite(RED, 255); } //YELLOW if (mode == 4) { analogWrite(BLUE, 0); analogWrite(GREEN, 220); analogWrite(RED, 250); } //GREEN if (mode == 5) { analogWrite(BLUE, 0); analogWrite(GREEN, 255); analogWrite(RED, 0); } //BLUE if (mode == 6) { analogWrite(BLUE, 255); analogWrite(GREEN, 0); analogWrite(RED, 0); } //VIOLET if (mode == 7) { analogWrite(BLUE, 255); analogWrite(GREEN, 0); analogWrite(RED, 100); } //SWITCH OFF }

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

      Thank you Very kind will try it.

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

      Please note that in the mode OFF if (mode == 1) this should be 0 not 1 . As 1 is for white. as shown underneath. //OFF if (mode == 0) { analogWrite(BLUE, 0); analogWrite(GREEN, 0); analogWrite(RED, 0); } all work fine after except the after the last colour it does not switch off and after another pulse it should go back to the first colour. Please can you check and let us know. Thank you beforehand.

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

      to solve the problem at the end add this and all works fine. //SWITCH OFF if (mode==8){ mode=0; } }

  • @Ren-gr1me
    @Ren-gr1me 2 года назад

    where is the code........??? thats like one of the most essential parts?

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

    please the cod

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

    Ur Welcome CODE: //define pins #define BLUE 3 #define GREEN 5 #define RED 6 #define button 2 //defube color mode int mode = 0; void setup() { //setup LED lights pinMode (RED,OUTPUT); pinMode (GREEN,OUTPUT); pinMode (BLUE,OUTPUT); //setup buttons pinMode (button,INPUT_PULLUP); } void loop() { if (digitalRead(button) == LOW){ mode = mode + 1; delay (400); } // off if (mode == 0){ analogWrite (BLUE,0); analogWrite (GREEN,0); analogWrite (RED,0); } //WHITE if (mode == 1){ analogWrite (BLUE,255); analogWrite (GREEN,255); analogWrite (RED,255); } // RED if (mode ==2){ analogWrite (BLUE,0); analogWrite (GREEN,0); analogWrite (RED,255); } //Orange if (mode ==3){ analogWrite(BLUE,0); analogWrite (GREEN,75); analogWrite(RED,255); } //green if (mode ==5){ analogWrite(BLUE,0); analogWrite (GREEN,255); analogWrite(RED,0); } //BLUE if (mode ==6){ analogWrite(BLUE,255); analogWrite (GREEN,0); analogWrite(RED,0); } //Violet if (mode ==7){ analogWrite(BLUE,255); analogWrite (GREEN,0); analogWrite(RED,100); } //Switch off if (mode == 0){ mode = 0; } }

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

    Text is too small

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

    where za code

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

    Good job 👍

  • @zanejr.2946
    @zanejr.2946 3 года назад

    Did you just retire... Lol I just subbed you haha. Btw your projects are amazing.

  • @zanejr.2946
    @zanejr.2946 3 года назад

    This tutorial really did merged with my ideas, liked it brother.👍😁

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

    really good project but for some reason it did'nt work for me

  • @wandersonsilva-fx1cs
    @wandersonsilva-fx1cs 3 года назад

    simple, but very good! I liked your class. Thanks

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

    timerMode not in scope even after copy and paste? " if (timerMode > 1){ " this part is not correct.