Call API and return response to OLED

Hi all,

I’m new to the scene, but am curious to learn whether something I am ideating about, could actually work with the new Particle products (Argon and the Adafruit FeatherWing OLED). If so, that could help me decide on whether to move forward on this.

What I want is to have

  1. A user press a button
  2. The device calling an API endpoint (get)
  3. The server returning a JSON response with a random string or int of 6 chars (e.g. ABC123)
  4. Display the response on the screen.

I’d like to use such a setup for verification purposes. But as I am more at the coding side of things, I’d be happy to learn whether these IOT devices could facilitate this.

Have a great day!

Some more questions.

  • Are you imagining this as a mesh (local) request or in wider area via WiFi?
  • If it is for verification, do you want it secured? Then I’d not limit yourself to a GET request originating from the device, but a ˋParticle.publish()ˋ to trigger a webhook.
  • What is an “int of 6 chars”? ‘int’ is a 32bit numeric type, no characters.

Thanks for a quick reply, appreciate it.

  • I’d be looking to use this in a wider area, so via WiFi
  • My aim is to secure the user’s action that follows the above mentioned steps
    E.g. an authenticated user still needs to submit the requested token (with the token expiring after X minutes). Admitted, little overhead if the request itself is secure, but with the token showing on a display, I realize it can be compromised at some point, so I will need the user to perform another action
  • Pardon me there (non-native), I meant to say a token of 6 alphanumeric characters (instead of using a confusing combination of the term string and integer)

With that info, you could already start developing a PoC with a Photon.
As said, ˋParticle.publish()ˋ would be the mean to “ask” for the token to be sent, a webook would then forward that request (as GET or anything else) to your verification server which in turn sends back the response, which gets relayed to your device via the cloud where you can catch it in a ˋParticle.subscribe()ˋ handler.

Once received you can display it on your OLED.
There are some threads dealing with some OLEDs (e.g. SSD1306).

Thanks ScruffR for confirming that what I’m looking to do is possible.
Seems that the Photon with the new product line coming, are now out of stock, so I’ll have a look at the coming alternatives and keep an eye out for restocking of the current product line.

There are plenty retailers that still have Photons in stock.



They are scheduled to be back in stock in about 2 weeks. As ScruffR said, we have many distributors that still have them in stock too if you need them sooner.

I will add that the Photon is not being discontinued due to the upcoming mesh devices. No EOL for the Photon has been defined to my knowledge.