TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: What options are there to send an HTTP request with a hardware button?

1 pointsby LecroJSalmost 3 years ago
My friend has is a small twitch streamer and wants to press a real life button that would clip his last 30-60 seconds of his stream. While it’d be trivial to write a serverless function that does this, I’d like the request to be fired from something he can have on his desk vs something like a chat command. Also if anyone has insight on using a Cloudflare worker on the edge vs a lambda/google cloud function, I’d be curious to hear which is more appropriate + cheaper for this kind of thing. Thanks!

2 comments

IceMetalPunkalmost 3 years ago
You can buy a tiny ESP32 microcontroller with built-in WiFi for extremely cheap. (So cheap, in fact, that a friend who bought me some microcontroller stuff as a gift accidentally bought a pack of 3 and thought it was the price of only 1.) A little button switch is fractions of a penny (though you&#x27;ll likely have to buy a pack of many at a time). Then the code to trigger an HTTP request on a button press is a simple modification of the example HTTP client code that comes with the Arduino IDE.<p>So... yeah, that&#x27;s the cheapest route in all likelihood. As in, you can do it all for about 3 to 5 dollars.
评论 #31853346 未加载
gostsamoalmost 3 years ago
well, what is stopping him of running a service that listens globally for a short key. The f1-12 buttons are rather underutilized nowadays. another option is the button of many keyboards to open system apps, browser included. Add a page that sends a request on loading as a home page and you have it.