Subscribe to an event from C or C++ (Computer and/or Arduino)

I’m guessing this is a dumb question, but is it possible for me to write a C or C++ program for my laptop that subscribes to events being published by my Electron?

Thanks very much for any tips.

A starting point can be found here

For C# there are some threads and libraries already available on this forum.

Thanks very much. I’ll take a look at this tonight.

(Parallel post "***Can an Arduino with an ethernet shield subscribe to published events?*" moved here)

I’ve got an Electron that is publishing events with data. This lets me get wind data to the internet with much lower bandwidth than forming the HTTP GET request and submitting it from the Electron. The idea is to then use a Photon, an Arduino, or a regular computer where I have wifi access to subscribe to those events, form the HTTP GET request, and submit them on wifi where bandwidth is not an issue.

I don’t know how to make a regular computer subscribe to a particle “publish()” event. Would love to take that approach if I could figure out how to do a particle.subscribe() from C/C++.

Alternatively I could do that with a Photon, but I happen to have an Arduino with an ethernet shield at hand. So I’m wondering whether the Arduino is compatible with the Photon? Can I somehow load a sketch on the Arduino that does a particle.subscribe()?



There has been a similar request not long ago as it happens by yourself, so don’t open a new thread.
This post will be moved over to the original since the answer won’t change much.

Sorry about that. I’m looking at a lot of different ways to skin this cat. In the original
question I had not asked about an Arduino, so I thought it best to start a new thread to ask about that approach.

1 Like

Fair enough :+1:
So I altered the topic title to reflect both intents.