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.

Turn a light bulb on with every new user or download

89 pointsby rigoneriabout 12 years ago

14 comments

raabout 12 years ago
BIG FAT WARNING: If you're going to relay your Raspberry Pi / Arduino to mains electricity, be very, very careful!<p>Mains electricity can KILL. Make sure you learn about safe shielding, connecting and grounding practices.<p>Above all, be extremely cautious!<p>I can't stress this enough.<p>EDIT: For more information: <a href="http://tubelab.com/Safety.htm" rel="nofollow">http://tubelab.com/Safety.htm</a>
评论 #5630409 未加载
评论 #5630627 未加载
评论 #5631293 未加载
评论 #5630537 未加载
评论 #5630697 未加载
jacquesmabout 12 years ago
This falls - as others have already commented - in the 'knows just enough to be dangerous' category.<p>Please use LEDs, don't even bother messing around with opto-isolators and so on unless you have experience with both mains electricity and designing safe circuitry.
评论 #5632129 未加载
mnuttabout 12 years ago
This seems like a really great use for raspberry pi. I recently finished a project involving a pi + a relay to activate a door buzzer, written in javascript. It was surprisingly simple and straightforward.<p>Besides turning on lights, the cool thing about relays is that most things involving physical push-buttons can be taken apart and easily wired up to a relay.
评论 #5630325 未加载
评论 #5631479 未加载
评论 #5630304 未加载
joshuabout 12 years ago
Working with mains power is stupid. Don't do it if you can avoid it, especially if you don't know what you are doing.<p>You can get a small remote power switch for $100 or so.
评论 #5630408 未加载
评论 #5632045 未加载
ultimooabout 12 years ago
This is when I feel envy toward engineers who can program hardware. I'm so involved with Ruby and HTTP and CSS etc. that I have negligible knowledge about Arduino, Raspberry Pi, and Beaglebone.<p>I don't even know where to start and whether it will be a fruitful exercise (i.e. will I be able to devote sufficient time to it to actually learn something worthwhile).<p>Anyway, this is a neat project and I wish you good luck OP!
评论 #5630930 未加载
stillmotionabout 12 years ago
I built something similar recently to flash a light every time someone buys something on Creative Market (video here <a href="https://vine.co/v/bTnnTVmH5eD" rel="nofollow">https://vine.co/v/bTnnTVmH5eD</a>). I know nothing about mains electricity, so I pulled together an Arduino and a LED with a bit of socket work to get a green light flashing. Once someone completes a sale, a piece of Javascript is requested from a Node.js HTTP server I setup. The server then pings the computer with the Arduino plugged into it over UDP and the client sends a serial response to the Ardunio, flashing the light. It's pretty simple, but it was fun to get all the components together and learn more about hardware development. Since a flash of the LED is requested on every sale and the UDP responds pretty quickly, it acts as a great thermometer during high sales peaks.<p>I'm now in the process of abstracting the entire thing into a self-contained box that communicates over wifi and uses mains electricity. Hopefully I don't kill myself.
droopybunsabout 12 years ago
Cool project!<p>Maybe iterate it to use LEDs instead of incandescents.<p>For hardware hacking- you have 3 types of hardware that can make life easy- but there are tradeoffs:<p>1) Arduino 2) Raspberry PI 3) Beaglebone<p>Arduino is great when you want low power, but it isn't an awesome internet platform.<p>Raspberry Pi is great when you're going to leverage a full blown PC Monitor, but using it for hardware hacking requires a bit of elbow grease<p>The Beaglebone is great for when you are doing something internety &#38; hardware hacky, but without a full blown pc monitor.<p>I would have done your project with a beaglebone, fwiw. I'd also have used LEDs instead of incandescents. But this is a great project! Nice work!
评论 #5631487 未加载
sly010about 12 years ago
Nice one! When I did something similar, I found the clicking sound of the relay more satisfying, than a lightbulb, so I eventually completely removed the lightbulb.<p>At the time I used MacMini, which was a tiny bit expensive for this very purpose (also not everyone in the office likes a blinking light 24/7) then eventually I came up with the following oneliner:<p>tail -f "&#60;access_log&#62;" | grep --line-buffered "&#60;whatev&#62;" | sed -ue "s/^.*$/\x07/"<p>I also needed to set the terminal bell to be a "click" instead of a "bell" for this to sound acceptable during moderate traffic.
nhayes-rothabout 12 years ago
For a larger company with more signups/uploads, I'm envisioning a wall of LEDs, controlled by an Arduino board.
评论 #5630329 未加载
评论 #5630404 未加载
rschmittyabout 12 years ago
Hook up a USB Flashing Police light to failed CI builds<p><a href="http://www.amazon.com/Rhode-Island-Novelty-Police-Beacon/dp/B0011CZV5A/ref=cm_cr_pr_sims_t" rel="nofollow">http://www.amazon.com/Rhode-Island-Novelty-Police-Beacon/dp/...</a>
roycehaynesabout 12 years ago
I think a blend of raspberry pi + phillips hue lights + data + code = awesome product.
评论 #5630747 未加载
newman314about 12 years ago
I would build one for new email alerts, a different color for each account...
rocky1138about 12 years ago
I wonder why he didn't use something like IFTTT.
评论 #5630323 未加载
sugandhanabout 12 years ago
Awesome! :) \m/