Interfacing Wireless PS2 Controller with Arduino

Поделиться
HTML-код
  • Опубликовано: 17 янв 2025

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

  • @mj2068
    @mj2068 6 месяцев назад +1

    thanks for this very helpful video. is it possible to use this as a generic controller for games?

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

    Have you used Arduino uno r3 ?

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

    can i get the file library?

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

      drive.google.com/file/d/13t90wROPHBRyZHQy7vMvZV_HSpU-jWUN/view

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

    Sir plz reply i did everything but on serial monitor it says controller not found.......... unknown controller type

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

    How can I deactivate the vibration of the control, to perform a test without the possibility of damaging the PC input?
    good contribution!!

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

      You can just remove this line"vibrate = ps2x.Analog(PSAB_BLUE);" and it will not vibrate

  • @abhimanyusinghshekhawat3382
    @abhimanyusinghshekhawat3382 5 лет назад

    And I am getting a warning narrowing conversion of motor 2 from byte ( aka unsigned char ) to 'char ' inside and my controller is not connecting with receiver the green light blips

    • @SurtrTech
      @SurtrTech  5 лет назад

      Are those errors or warnings? If they are warnings it's okay, if they are errors try installing the library correctly.
      Once you compile the code you should see "Done compiling"... other messages are just warnings.

    • @abhimanyusinghshekhawat3382
      @abhimanyusinghshekhawat3382 5 лет назад

      @@SurtrTech one is an error and the second one is warning , after installing the library it shows done compiling but after uploading it my controller doesn't connect to the receiver

    • @SurtrTech
      @SurtrTech  5 лет назад

      @@abhimanyusinghshekhawat3382 Done compiling means there's nothing wrong with the libray and code.
      It's better to test with the library example and the serial monitor.
      Now I recommend you to verify the wiring it's better to take it all off and do it again.
      Also check if the controller has full power batteries and check if it's ON.

    • @abhimanyusinghshekhawat3382
      @abhimanyusinghshekhawat3382 5 лет назад

      @@SurtrTech sir iam using an Arduino mega for this thus it can be a problem

    • @SurtrTech
      @SurtrTech  5 лет назад

      @@abhimanyusinghshekhawat3382 Yes it can because the Data pin is actually MISO and the Command pin is MOSI
      MISO/MOSI/SCK in Uno are 11/12/13 and on MEGA are 51/50/52
      So you have to replace it wires that connects to 11/12/13 to 51/50/52
      Don't forget in the code there's pin declaration too you have to modify it.

  • @Y7102-p1d
    @Y7102-p1d 5 лет назад +5

    Dude for goodness sake speak with a higher voice!

  • @fri_jo
    @fri_jo 5 лет назад

    I made a robot that is controlled by a PS2 controller and Arduino. Arduino receives the signals while it's powered by the pc itself, once it's powered from an external dc supply the controller doesn't send signals or Arduino doesn't recieve any signals. Did anyone else had this issue ?? If you had how did you solve it ?

    • @SurtrTech
      @SurtrTech  5 лет назад

      I have used this module with a robot powered by Li battery (on the channel too), I had no problem.
      Make sure you don't have any function that's related to the serial communication especially something that requires an input to move on... Of course make sure that the Arduino is not underpowered too.

  • @abhimanyusinghshekhawat3382
    @abhimanyusinghshekhawat3382 5 лет назад

    Sir I am getting an error lib.cpp in member function Boolean ps2x read_gamepad (Boolean ,byte )

  • @sukritapanigrahi1740
    @sukritapanigrahi1740 6 лет назад

    thank you so much!