
You can use another micro controller, but this post will refer specifically to Arduino, because I have three within arms-reach, and nothing else to test on. You could also use an ultrasonic transceiver, but they're better at mid-range (as they have a minimum sensing distance, so you'll have to be further away from the sensor).įinally, we need an Arduino. The easiest (in my opinion) is an infrared transceiver. Next, we need some kind of proximity sensor. Grounding the various pins by varying amounts will lead to many different colors - as many as you can define as CSS colors. Connecting the red pin to a Pulse Width Modulation (or PWM) port on our Arduino, and grounding the port by half will reduce the amount of current flowing through the red portion of the LED. A common anode RGB LED is one that connects one pin to the positive pin on your micro-controller or battery, and three pins to ground, depending on the combination of colors you're after.Ĭonnecting the red pin to ground will close the circuit so that current flows through the red portion of the LED. The more IoT work you do, the more likely you are to run into the terms anode and cathode. If you get one that doesn't include resistors, be sure to add those into your circuit. Really, just about any common anode RGB LED. As long as we can control the color it fades to, we can simulate the social network notifications we're after. If we've seen the Twitter notification, we should be able to wave our hand in front of the proximity sensor, and Twitter blue should be removed from the rotation, leaving GMail red etc. We could extend this to the Fitbit green, the Facebook blue and so on. Then, if someone sends us an email, the LED should cycle between the Twitter blue and the GMail red. The LED should periodically cycle to the Twitter blue. As notifications are received, the RGB LED will cycle through them, fading the LED to the appropriate color for each notification type. The project we're going to work on is a simple notification system, connecting a single RGB LED, a proximity sensor, and a PHP script to gather notifications. I'm quite specific each time though, so you'll be fine! The Project When I talk about pins, I just mean a place you can connect components or wires to. I use this word to mean the pins coming out of components, as well as the Arduino sockets these pins go into.
#Arduino facebook notifier code
Most of this code can be found on Github. Something that looks cool, and is at the same time non-invasive. I'm a little less obsessed with IoT projects, but then it's harder to find the time to work on them than it is to check Twitter.Įver since the IoT week, I've been meaning to work on a project that will let me know when someone wants to speak to me. It's how I communicate with most of the developers I'm not fortunate to live in the same city as. Sort of like Planet PHP or PHPDeveloper, except this site doesn’t look like it’s from the ’90s.Īll feeds Home-Made Twitter and Gmail Notifications with PHP and Arduino This website aggregates the latest news and articles regarding PHP, and presents it in one place.
