USB HOST PS4 HOBBYTRONIC

Hello!

I have a module that I buy at USB HOST PS4, everything works fine, I make the connection through I2C in arduino but I have a problem with the value of the battery, on the page it marks that the battery has to return a value between 0 and 15 but it oscillates between 0-255, this would be good if it were something progressive but suddenly it is 250 and drops to 10 all at once.

I have tried with three different PS4 controllers and with 2 different modules, it is always the same result ,,, I have already spoken with the company but the module was made by a person who is no longer working in the company, I would like someone to have tried can help me.

Thanks.

The battery voltage is 1 byte.
One byte can be 0x00 (which is 0) to 0xff (which is 255).

When you write 10, do you mean 0000 1010 ?
When you write 250, do you mean 1111 1010 ?

Is your serial communication solid?
Do you have the baud rate, etc set up correctly?
Are you getting all 20 bytes?
Are the first 3 bytes PS4?
P = 0x50 = 0101 0000
S = 0x53 = 0101 0011
4 = 0x34 = 0011 0100

ieee488:
The battery voltage is 1 byte.
One byte can be 0x00 (which is 0) to 0xff (which is 255).

When you write 10, do you mean 0000 1010 ?
When you write 250, do you mean 1111 1010 ?

Is your serial communication solid?
Do you have the baud rate, etc set up correctly?
Are you getting all 20 bytes?
Are the first 3 bytes PS4?
P = 0x50 = 0101 0000
S = 0x53 = 0101 0011
4 = 0x34 = 0011 0100

Good Morning,

Thanks for your answer, I have been doing tests ,,, I had always obtained the values with I2C, all the values were good except the battery that according to the page goes from 0 to 15, but I always had a problem and it was that I obtained values in a Range from 0 to 255, as you say, a byte goes from 0 to 255 ,,, but it is not something progressive, suddenly it is at 245 and drops to 12.

I have checked all the connections and the Serial baudrate was correct. Everything's fine.

Serial-Con-Puerto-SERIEBINARIO hosted at ImgBB — ImgBB -SERIAL BINARY TO CHAR

Serialcon-PUERTOSERIEHEX hosted at ImgBB — ImgBB -SERIAL HEX TO CHAR ,

I have tried to read the data by SERIAL HEXADECIMAL using the library, the result is the same, then I have read the data directly by binary without using any library, the result is the same, the values go from 0 to 255 ,,, then because the datasheet says that the value of the battery has to go from 0 to 15? Nor do I understand why they oscillate from one value to another without following a progression of battery wear.
Is this something that can be fixed or is it a value returned by the gamepad and has nothing to do with the module and data collection from arduino?

Thanks.

try contacting the author http://www.semuconsulting.com/

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.