Hi
I have a question and that is; Is it possible to have an Arduino that has a programmable LED on it, react to GTA 5 that if you have stars, the LED will change?
Thanks in advance!
Hi
I have a question and that is; Is it possible to have an Arduino that has a programmable LED on it, react to GTA 5 that if you have stars, the LED will change?
Thanks in advance!
Welcome to the forum
Your topic was MOVED to its current forum category which is more appropriate than the original
How is GTA 5 going to indicate to the Arduino that you have stars ? Can the game output such data and if so how ?
In my opinion you can achieve this by multiple ways but it will not be that simple if you don´t have programming skills.
For example you could use this ways:
You have a camera on you microcontroller which always takes pictures of your screen and trys to find the current star count
You write a program on your PC which scans you PC Screen with the game for the stars and report that over an common interface to the microcontroller
Since the arduino is not that strong you should go with number 2. I would recommend python with pyautogui for the PC part.
Yes, that's the question...I would like to have it just directly so, it would be good if I would only learn how I can read out from GTA.... I would like to have it just directly so, it would be good if I would only learn how I can read out from GTA.... Would it really be possible to start a Blidschrimspiegelung from the stars the Arduino could read?
Thanks for the quick feedback!
Hey thanks for your quick reply!
Yes my programming skills are not the hammer could you really somehow send me a code or tell me how I have to do it?
Thanks in advance!!!
Kind regards
Aaron
Reading directly form GTA would mean you need to access the program. You could maybe try to find the memory address of variable which save the stars, but such programs can trigger anticheatprotection and you might get banned.
I don´t really know what you mean with Screenmirroring, creating an HDMI interface for an arduino is impossible without addtitional hardware as far as I know.
You can use this to find the stars Screenshot Functions — PyAutoGUI documentation
but you have to modify it so your code searches for the stars.
And then you could use pyserial to receive and send messages to the arduino.
Sry I currently don´t have the time to write code for that since I have to do alot myself at the moment.
Hey Super! No problem!
I actually meant exactly this; " You can use this to find the stars Screenshot Functions - PyAutoGUI
but you have to modify it so your code searches for the stars."
Is it hard to customize that?
Greetings
Aaron
No you just need to create the right image and then you need to send the data. You may have to tweak the settings if it does not work. (Like modifying the brightness, colorlevel etc.)
And will it automatically communicate with the Arduino?
And will it automatically communicate with the Arduino?
No, unfortunately it won't do that.
I'm really surprised and impressed by the library that @djpx mentioned. That will take a lot of the work out of the project if you do decide to go through with it.
It sounds like, all going well, the tools mentioned above should let achieve your goal, however it will require a fair bit of effort to get all the pieces to work together.
It sounds like the suggestion is:
Write python code, on your PC, to count how many stars are displayed
The pyautogui library should make this easier, but you will still need to write the correct code to get it to look for the stars on your screen.
Write separate python code to send the "star count" from your earlier code to an Arduino, via the USB Serial. I believe the pyserial library was suggested.
On the Arduino, write code to turn on or off the LEDs, based on the "star count" data which was received from your python code, via the USB serial.
It is also entirely possible that the pyautogui library may not be able to see the game screen. If this is the case you would need to take an alternative approach.
By no means is this an impossible task, however depending on your experience level, it could be quite a challenge.
No you have to write that part yourself. If you are using Python you can use pyserial for that. But you need some programming skills because you also have to find the correct port when you try to communicate with the controller.
With this you are able to see all connected ports
ports = [comport.device for comport in serial.tools.list_ports.comports()]
Additional i would recommend you to run the game in window-mode that should make it a little bit easier for you.
Btw do you want to read the star count or just if there is a start at all?
Some of these games have APIs that can be used to interface with external hardware and to read the state of the game.
I have seen them in flight simulators, where the API came in the form of a DLL that was dropped in the game folder, after which a connection could be made via a C API.
Yes you could do that too if it exists for your game. But even when you have these APIs you still need to communicate with the device and programming in C is mutch harder as in python if you didn´t do that before.
And writing a serial communication in C is mutch more effort to program. I would recommend this way more to experienced ppl or ppl which like to create a product.
You also could write a GTA V Mod for that but that is mutch harder too.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.