i have many little esp32 guys with the built-in wifi.
many will be remote targets for nerf and whatnot.
they get a piezo and some leds.
one guy gets to host a game.
he sends out the game mode.
the others report as dictated by a given game mode.
clearly i do not do this sort of thing often.
i can handle the basic logic.
i am having a hard time with the wifi aspect.
setting up a web server seems the best way yet hosting the site involves c++ from arduino but also html and css.
i know some c++.
that's it.
is there a way to use wifi to just send data without involving a website?
or, better even, is there something else i should be doing to accomplish my goals?
for ESP32 UDP have a look at File>Examples>WiFi>WiFiUDPClient
you would have to write a UDP server for the PC, e.g. in C++, C#, Java, etc
also consider TCP - look at File>Examples>WiFi>
or use MQTT, e.g. esp32-mqtt-publish-subscribe-arduino
do you wish to transmit data continuously or in blocks???
what do you wish to do with the data once it is on the PC?
I will look into UDP and TCP.
Processing as well. I like that little script.
Bit more information for anyone still playing:
The goal is a target system for nerf and whatnot.
I picked up a handful of the xiao esp32-c3 boards.
I intend to add a piezo as a knock sensor.
Also add some rgb leds to indicate mode.
These will do some basic processing on a hit and report in.
The main board takes all the reports and tallies.
Also sets the game mode and anything else needed.
So far as I can work out I need my main board setup as a server.
That one hosts a page to which anyone else on the network can report.
The targets need to be setup as clients. (I think)
All of this will be on its own, dedicated, router.
That is the original plan.
All I really need is the burst of data from when a target takes a hit.
So, a quick connection from one of dozens of targets to a single head unit.
Doing that without hosting anything seems more direct.
That said, server offers one access to monitor the game via cell phone..
update:
TCP is, indeed, exactly what I was looking for.
my targets can report to my central command.
my central command can update my targets.
very cool.
as i read it, once connected, i can treat my little wifi object as a serial connection.
open a connection.
write over some data.
shut it down.
this is way easier than I had though.
is that preferred to simply typing out a thank you as i had done?
i certainly appreciate all the assistance.
quiet isn't bad.
reality isn't bad.
things simply are.
looking, briefly, into that esp-now.
seems they have a limited number of potential connects.
the end goal for my project is dozens of targets.
i believe wifi will cover what i am after here.
thank you for the suggetion!
that guy has some great demos.