Arduino + PS3 controller

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 ต.ค. 2024

ความคิดเห็น • 55

  • @krokotube
    @krokotube 10 ปีที่แล้ว +1

    If you want to leave Android tablet out:
    There is also dedicated Arduino BT board, but that's in "standard" size, not mini. (edit: ahm size doesn't matter, as this unit still stays on the ground)
    It is quite easy to connect "raw" BT modem i.e. HC-05 (they come both in 5 and 3.3VDC versions) to the small Arduino Pro Mini, it works… however have no idea if it will work with aftermarket PS3 controller.
    Also you may look into connecting PS3 to Arduino directly via BT (or USB) via USB shield github.com/felis/USB_Host_Shield_2.0/wiki/PS3-Information however setting this up looks painful
    anyways, maybe there's no reason to tear the controller apart
    edit: you might also send data back to ground about the lipo charge state, so things dont fall from sky
    // and thanks for your Box2D tutorials - they, not the original docs, taught me that lib some years ago ;)

    • @iforce2d
      @iforce2d  10 ปีที่แล้ว

      Yes that's a good point, actually I was looking into the HC-05 yesterday as it happens, and it would be nice to keep the PS3 controller in one piece. But I would feel more comfortable if there was no reliance on a wireless link, so I might re-purpose the transmitter box from my old heli - it has much better feeling stick movement than the PS3 controller, throttle pot already has spring removed, there's space inside to mount things, and it already has battery bay. Who'd have thought that an RC transmitter box would be useful for an RC transmitter project huh? The main drawback though, is it would use up a lot of pins on the Arduino.
      Yes, eventually I want to have a second RF24 link transmitting from the heli to the ground, with GPS/heading/battery state etc. I don't think the HC-05 could handle the distance.

    • @krokotube
      @krokotube 10 ปีที่แล้ว

      ***** as long distances between controller and heli go - sure no bluetooth, i have such a bad bad experience with BT that i don't trust it at all. look into high power xbees (and arduino fio if you want the headers out of box). 50mW ZB 2.4Ghz module with antenna should give you 1km distance. there are also 900MHz versions, giving you up to 60km as for specs, although that would require quite a power (think in watts) and antenna. wou can program the xbee zb in a grid, so that data flows between controller and heli, and, if needed, also to android (need xbee usb explorer then) for some realtime visual feedback on screen. as for using pins on arduino - the button count on controller is small (meaning much smaller than 256). you can use digital or analog multiplexer(s) / shift registers. what they essentially do is switch between the inputs superfast, it will never miss any of your button pushes or throttle. you have to chech the throttle pot value though, if its not superhigh (that means longer reading time). for 10k pots arduino ADC needs about 100 μs. maybe you alreday knew, if not read about them, totally for the job. either 8 or 16 channel, or multiple chained together. needs ony 3 pins on your arduino to get all those inputs instantly. you can boost it even up more if instead of connecting each controller button/pot directly to multiplexer you rewire the buttons in your controller into matrix layout.

    • @iforce2d
      @iforce2d  10 ปีที่แล้ว

      krokotube
      Hmm I did not know about the multiplexers, that sounds very useful. I haven't really decided if I need an alternative to the current setup, maybe I am worrying too much. I may yet just keep it as is, if I can eliminate as much as possible on the software side that would interrupt the serial connection eg. as you can see in the video, currently even changing the device orientation resets the Arduino.
      As for range I don't really need much, 40m or so will do which is possible with the RF module shown here, but I'm hoping to let the computer fly it, so if something goes wrong I don't want it getting too far away before I can switch to manual and bring it back. I will be using the high-power version of this one with antenna which is supposed to reach 1km, haven't checked yet though.

  • @dipentandel10
    @dipentandel10 6 ปีที่แล้ว +3

    How you connect to the PS3 with nfr24 and Arduino pro mini.....
    Please give me answer....
    I make RC Plane use this items
    And give me a cord for Arduino.....

  • @angelluisinfantematos1746
    @angelluisinfantematos1746 10 ปีที่แล้ว +8

    nice!!!, do you have the code did you use for the arduino?

  • @AndyShrimpton-GaaTech
    @AndyShrimpton-GaaTech 4 ปีที่แล้ว

    this is cool, so with this could i build a steering wheel and get the arduino to send the info to the ps console

  • @dtesta
    @dtesta 6 ปีที่แล้ว

    Sorry if I sounds stupid, but why did you not just use a bluetooth chip connected to the Arduino instead? Nowadays, you can just get an esp32 that has bluetooth built-in and magnitudes faster than an Arduino, but I guess that did not exist back in 2014.

    • @iforce2d
      @iforce2d  6 ปีที่แล้ว

      If you know how to interpret the raw data coming from the gamepad, sure :)

    • @dtesta
      @dtesta 6 ปีที่แล้ว

      @@iforce2d Why would you need that? The controller acts as a HID device, which is a defined standard.

  • @clubderoboticadragones9372
    @clubderoboticadragones9372 5 ปีที่แล้ว +2

    Do you have the code for NRF24 + PS3 with serial arduino ?

  • @eldeni21
    @eldeni21 9 ปีที่แล้ว

    That´s a great job!! It´s realy nice!
    I want to do somthing simillar with rnf24l01, but using Tiva c microcontroller (via SPI interface, using energia).
    I´ve been searching in the folders you metion below, but I didn´t find where is the PS3 controller part... Could tou tell me where is it, or how did you pair the controller with the rnf module?
    Thanks!

    • @iforce2d
      @iforce2d  9 ปีที่แล้ว +2

      The PS3 controller part is done with regular Android classes, as documented here: developer.android.com/training/game-controllers/index.html

  • @m4rt100
    @m4rt100 7 ปีที่แล้ว

    hi brother may i know what the radio module you used within ps joystick and would you like to share how to connect the transmitter and the receiver module connection

  • @eldeni21
    @eldeni21 9 ปีที่แล้ว

    Ho, now I understand a bit more! I'm sorry, english is not my first lenguage...
    So the communication is: Ps3-tablet-arduino-nrf(send)-nrf(recieve)-arduino.
    So I change my question: Is it posible to directly connect the rnf module (master) to a ps3 controller (device)?
    Does this module support hids command coming from the ps3 controller? Or this module is simillar to a hc-05 board?
    Thanks again!

    • @iforce2d
      @iforce2d  9 ปีที่แล้ว

      Yes that's right :) No, you could not connect the nrf to the ps3 gamepad directly… I mean, what would be running your program? They are both peripherals and need something to control them. You would need something in between if you want them to do anything useful. If you want to send control inputs over a radio connection, perhaps you would be interested in the "cheapass quadcopter" series I made after this, where I use some joysticks to send radio controls.

    • @eldeni21
      @eldeni21 9 ปีที่แล้ว

      *****
      Thanks for reply!
      I´m gonna keep searching for something (if it does exist) that make a kind of translation between hids commands to spp, or somthing to do the hard connection work

  • @79wirenut
    @79wirenut 4 ปีที่แล้ว

    Sorry if I missed it but what is the name of the app that is running on the tablet?

  • @BASEM434
    @BASEM434 9 ปีที่แล้ว

    Very nice video I was looking for...... is this ESP8266 ...Esp-01???
    btw i'm planing to buy this module and want to know how many channels it can take??
    cuz I want to use it to control a robot so i might be pressing 5 different buttons together for example to control its movements ,light and horn at the same time.
    can it take all the ps3 controller buttons at once ??

    • @iforce2d
      @iforce2d  9 ปีที่แล้ว

      You mean the nRF24L01 module? It can send 32 byte packets, so the packet could be whatever structure you want. If you make a channel one byte, then it could be 32 channels. Yes, I'm pretty sure all the buttons can be used independently on these controllers.

    • @BASEM434
      @BASEM434 9 ปีที่แล้ว

      ***** wow..... interesting.
      Can the ESP8266 do the same thing??at least control the ps3 with enough channels? I just bought it ....if not good as the nRF24L01..then i might buy this module too..

    • @iforce2d
      @iforce2d  9 ปีที่แล้ว +2

      BASEM434
      Looks like that one uses TCP/IP so it sends a stream of bytes, the same way you're watching this video and loading this webpage. There is no limit on the 'packet size' because it doesn't really use discrete packets. You would have to arrange your own 'packet' format, eg. send one byte that's -1 to delineate the start of your data, then one byte each for the position of the sticks/buttons or whatever you want to send. Just make sure the rest of the data does not contain a -1 byte.

  • @tazziethecat6804
    @tazziethecat6804 9 ปีที่แล้ว +1

    How about a USB host shield or Mega ADK?

  • @ariefdarmawan9083
    @ariefdarmawan9083 4 ปีที่แล้ว +1

    Can you send to me the arduino code ?, i need this for robot competition, i want to use ps3 controller and arduino, and your project is so simple, i want to make this

  • @TutocarloCV
    @TutocarloCV 6 ปีที่แล้ว

    nice

  • @miraion5208
    @miraion5208 10 ปีที่แล้ว

    cool

  • @adalarambula5968
    @adalarambula5968 7 ปีที่แล้ว

    Hi, good job :D
    You could comment more on your code, upload a video, write an entry in your block or help me establish communication between the control, the NRF24 and the arduino
    I don't need the screen or the application
    You are the only one I have seen who has been able to do it and I am very interested to know how you did it
    I would be very grateful if you would help me
    Thank you very much 😊

    • @iforce2d
      @iforce2d  7 ปีที่แล้ว

      That's extremely vague. I don't remember how any of this works these days so I am in the same situation as you, but if you have a specific question maybe I can help. But simply saying you want "more" is not helpful.

    • @adalarambula5968
      @adalarambula5968 7 ปีที่แล้ว

      Thank you very much for answering
      Ok I will be more specific, I want to know how to connect the ps3 control using the nrf24l01 and read the values that the control sends into the arduino.
      This is more helpful?

  • @Eih3Prog
    @Eih3Prog 9 ปีที่แล้ว

    Amazing! Thanks for sharing ;)

  • @alhapidzteguhgumilar
    @alhapidzteguhgumilar 3 ปีที่แล้ว

    What connection? Bluetooth?

    • @iforce2d
      @iforce2d  3 ปีที่แล้ว +1

      Did you watch the video??
      3:02

  • @prashantbholu1950
    @prashantbholu1950 9 ปีที่แล้ว

    Can you please provide the source code only of arduino, bluetooth module and ps3 part??

    • @iforce2d
      @iforce2d  9 ปีที่แล้ว

      Take a look at the comments below.

  • @mountainfanatic
    @mountainfanatic 10 ปีที่แล้ว +1

    Can you please provide the source code for this?

    • @iforce2d
      @iforce2d  10 ปีที่แล้ว +12

      Sure, just don't ask me to explain it :) www.iforce2d.net/slidersViaAndroid.zip
      It uses the Adafruit SSD1306 library for the OLED screen, and also this one: github.com/mik3y/usb-serial-for-android
      The "RecvSlider" sketch has been changed since then, so some parts of it do not match up to the "SendSlider" sketch.

    • @fleshTH
      @fleshTH 6 ปีที่แล้ว +4

      Ah, I found it! I kept seeing "Look in the comments below". Would you be able to favorite this reply so it is easier for the next person to find?

  • @ferchoferefb
    @ferchoferefb 6 ปีที่แล้ว

    simplemente esta transmitiendo los datos de la tablet por usb al nrf y a la pantalla oled,
    no enlaso el nrf con el ps3, por eso no lo dice.... es un engaño.. yo le saque el (me gusta) 😐👎

  • @RenatosilvaMinis-Games
    @RenatosilvaMinis-Games 6 ปีที่แล้ว +1

    File

  • @quattrolucie4955
    @quattrolucie4955 6 ปีที่แล้ว +1

    #"Original"ps3

  • @blackheartmgTv
    @blackheartmgTv 9 ปีที่แล้ว

    do you have the code available ?

    • @iforce2d
      @iforce2d  9 ปีที่แล้ว +2

      Outrageouz Rageouz take a look at the comments below

  • @сашабарадач-п7б
    @сашабарадач-п7б 7 ปีที่แล้ว +2

    Describe in detail how you connect to the PS3 NRF24. Or remove the video, it will be very interesting !!

    • @iforce2d
      @iforce2d  7 ปีที่แล้ว +9

      Remove the video? How about I just ignore you ordering me around? Take a look at the comments below for the source code.

    • @adalarambula5968
      @adalarambula5968 7 ปีที่แล้ว +3

      Dude if you are not going to share the knowledge so why do you share it?
      Many people have been asking for the code and the explanation for 2 years and you have only given bad answers. :/

    • @iforce2d
      @iforce2d  7 ปีที่แล้ว +9

      I posted a link to the code in the comments below two years ago. There is no reason I should have to respond individually to every single person who asks for a link.

    • @JosiahLuscher
      @JosiahLuscher 6 ปีที่แล้ว

      Sorry man, your wrong. This video isn't entertaining. Either your just a jerk bragging, or your trying to help people. You have no information in the video, and no information in the video description. .... - I'm working with a high school robotics team and we could really use some help with getting PS3 controllers connected wirelessly to arduinos. Clearly you've done this, and clearly your not willing to help. YOUR A JERK!

    • @dtesta
      @dtesta 6 ปีที่แล้ว

      ​@@JosiahLuscher I think you mean "you're".

  • @nighthunter28
    @nighthunter28 3 ปีที่แล้ว +1

    nice fake :D

    • @iforce2d
      @iforce2d  3 ปีที่แล้ว

      Explain please?

    • @nighthunter28
      @nighthunter28 3 ปีที่แล้ว

      @@iforce2d no code, no information about modules, devices, and so on :/

  • @Eih3Prog
    @Eih3Prog 9 ปีที่แล้ว +1

    Do you have the code for NRF24 + PS3 with serial arduino ?