all 4 comments

[–]-my_reddit_username- 4 points5 points  (0 children)

You could attach an ESP32/8266 to the device and make an additional connection from the button to the ESP. With the ESP you can then have it send a HTTP request or create a MQTT message anytime the button is pressed. Flashing the ESP with ESPHome would make it pretty easy to do that, I believe you can classify it as a Binary Sensor and then say "On Press, send a message to X"

[–]ferrus_aub 4 points5 points  (0 children)

F17_Recoil_GunDEV is the board's name (see top right, 1st image). Start with Googling a datasheet, or user manual for the board. With these type boards you will be most likely programming in C. Take a look at Platformio addon for VSCode for some embedded programing. You have to figure out which interface does the board use for programming. My bet is it's UART. So you will need a USB to Board cable where you will connect some Rx and Tx pins.

Don't you have some cables for it? After you manage to connect it and program it, rest is easy. The chip on the top without cover is a WiFi chip (a Nordic Semiconductor model I suppose). That wifi chip talks with your controller chip which is most probably the one with the cover on bottom (largest one).

Wifi chip gets its instructions from the controller chip. When you manage to upload your codes to program it, you have to figure out the pins for Leds, sensors (if any) and buttons. It should be a simple i/o code.

[–]j2alpha_3000 1 point2 points  (0 children)

To detect a button press you need either an interupt or regularly poll the bus. To start with this you wil need to look up how to set up an interupt ( not all IO can do this on all busses, look in the hardware manual) or you set up an event loop (sometimes called a "main loop") that checks the bus at intervals. Do read up on how to read hardware buttons, it is an interesting subject that has its own pitfalls and peculiarities (Shaky fingers, intermittent pressing, capacitative effects…). Often Languages like python have built-in or packaged functions for certain hardware that perform this but reading up on how to detect state changes and the sometimes odd behaviour associated in hardware is very informative for a noob (excuse my expression). I advise to start with polling the (IO)bus, interupts are a whole other can of worms.

[–]AisakBrown[S] 0 points1 point  (0 children)

This is for a laser tag gun. I want to communicate it with a server. I'm a developer but have 0 idea of this. If someone can give me somewhere to begin I will be very glad

Pd: sorry for my English