Introduction: Doorbell With the Edison and Email
This is a doorbell project with the Intel Edison. This can also be wired into the actual doorbell circuit in your house, and later adding a option to email you when someone rings the doorbell. This instructable assumes that you have a Edison with the Grove platform. We used Ubilinux on the Edison. The C code is included with this instructable and may be used freely, but a understanding of C would help.
- Intel Edison on the Arduino with Ubilinux
- Grove shield for the Edison
- Grove Buzer
- Grove Switch
- Optional: length of Cat5 cable or any cable that has 3 or more wires in it
- Optional: SPDT relay
Step 1: Setup the Edison
Assemble Edison with the Grove board. Ubilinux was used with the MRAA library installed. Its unknown if it would work with other distributions. The Edison was accessed through SSH.
- The buzzer was placed on D5
- The switch is placed on D8
Optionally a relay may be wired in place of the switch, where the center is tied to the data pin, and the poles are tied to VCC and Ground.
Sendmail needs to be installed. This works with Ubilinux, but not the original yacto.
apt-get install sendmail
Step 2: Code
Copy the doorbell.c, pins.h, and mail.h files on to the Edison. The pins.h file is our implementation of the GPIO IO addressing. The mail.h file for sending mail messages, and must be edited with your email that you would like to receive your notice.
compile this with:
g++ -lmraa doorbell.c -o doorbell
The "-lmraa" links the MRAA library so compiler can find the correct library.
Step 3: Running the Program
Once the code is compiled (shouldn't take too long, its less then 300 lines), then the program can be ran with:
Once running, press the switch. The buzzer will pulse, and the LED with flash. You will receive a email, once per press.