Introduction: IoT Location Sensing Picture Frame

Picture of IoT Location Sensing Picture Frame

"Text me when you're heading home." We've all heard it, and we've all forgotten to do it. Sometimes, even when we do remember to text, the unexpected happens. We get stuck in traffic, get caught up talking to a co-worker while trying to leave the office, or suddenly remember that we should stop to get that one thing we really need at the store. These events can be hard to communicate, and frustrating for family members who are trying to time their activities around your arrival at home.

To make communication easier, I've created the IoT Location Sensing Picture Frame. The concept is simple. Each family member has a photo of themselves in the picture frame. Each photo has a corresponding strip of lights that is controlled by an app that runs in the background of the designated family member's smart phone (yes...each family member having a smart phone is a pre-requisite for this project.). The lights are programmed to display colors in a spectrum ranging from red to green. If the lights for a certain family member are red, it means that they are far away from home. If the lights are green, it means that they are home. If the lights have been orange for a while, but you notice that they are slowly fading to yellow, the family member is traveling closer to home and the lights will continue to fade to green until that family member arrives at home.

Another useful feature of this picture frame is it's ability to communicate when family member's have arrived at specific locations that can be updated on their phones at any time. Let's say you are going out of town and arriving at a specific bus or train station. You can set that location on your phone as far in advance as you like, and the picture frame will change the color of your lights to blue when you arrive. That way when you forget to call mom to tell her that you made it to your destination safely, she won't worry.....but for goodness sake, don't forget to call her! She's your mother!

Step 1: Tools & Materials

Picture of Tools & Materials

You will need the following things to complete this project:

Electronics:

-Intel Edison with Arduino Expansion Board

-2 Micro USB Cables

-LPD8806 LED Strip

-5V Power Supply

-Female Power Jack Adapter

-3 Right Angle Male Header Pins

-On/Off Switch

-9V Battery

-9V Battery Clip

-Heat Shrink

-Hook Up Wire

-Solder

****Note: It has been discovered that 9V batteries have a very short life span when powering the Edison. I recommend replacing this with an external power supply.*****

Hardware:

-3 sheets of 8" x 24" x 1/8" Basswood

-1 sheet of 1/8" x 8" x 10" Acrylic (optional: get an extra sheet for Edison Mounting)

-1 3/8" Square Wood Dowel

-Cardboard or Chipboard

-4 Standoffs (comes with Edison & breakout board)

-4 Screws (comes with Edison & breakout board)

-4 #4 x 1/2" machine screws

-4 #4 nuts

-4 #4 x 1/2" wood screws

-2 zip ties (thinner than 1/4")

-Wood Glue

-Liquid Fusion or equivalent glue/epoxy

-Double Sided Mounting Tape

-Tape

Tools

-Laser Cutter

-Soldering Iron

-Rubber Mallet

-Wire Strippers

-Small Saw

-Exacto Knife or Box Cutter

-Screw Driver

Step 2: Getting Started With Intel Edison

Picture of Getting Started With Intel Edison

Please follow Intel's guide on getting started which is located here.

Once on this page, select "Arduino* Expansion Board Setup". This guide will run you through assembling your board, setting up the Integrated Installer, setting up a serial terminal and connecting to wifi.

The final step in this guide involves setting up your IDE. We will be working with the Arduino IDE for this project. While there is a link to the Arduino IDE in this guide, the last time I checked it was broken so you will have to download the IDE from the Arduino website instead. The download page can be found here.

Step 3: Set Up Your MQTT Broker

Picture of Set Up Your MQTT Broker

MQTT is a lightweight protocol for machine-to-machine communication. In this case, the machines that need to communicate are our smart phones and the Intel Edison. The purpose of an MQTT broker is to serve as a host for the messages that are being sent and received by these machines.

CloudMQTT is an MQTT broker which we will use to host messages sent from our smart phones. To use CloudMQTT, visit this link. Once on the website, select "Plans" in the top navigation bar. This will bring you to a page with several different options for hosting plans. For our purposes the Cute Cat plan will be fine for what we need for this project.

Under "Cute Cat", select "Try now for Free". This will take you to a page which wants you to set up a new CloudMQTT instance. Under "Name", choose a name for your CloudMQTT instance. You can name this anything you want. I named mine OwnTracks because it is the name of the app that we are going to use. You shouldn't have to alter the other two windows on this page, so once you have chosen a name press the "Create" button.

Step 4: Setting Up OwnTracks (iOS)

Picture of Setting Up OwnTracks (iOS)

This step is for setting up OwnTracks on your iOS devices. You can skip this step if your family only has Android devices.

This step will need to be repeated for each family member who has an iOS device. Begin by downloading the OwnTracks app from the App Store. Once the app is downloaded, open it and navigate to the Settings page by clicking on the lower right hand icon. On this page, there are a few different Mode options at the top. Select "Private".

Open up CloudMQTT and select "Control Panel" in the menu. On this page you will see the CloudMQTT instances that you have created. Find the instance that you created in the last step (in my case my instance is OwnTracks), and click on the blue button that says "Details". This will bring you to a new page with your Instance Info. We need to use this Instance info to set up OwnTracks correctly.

Back in OwnTracks, use the following settings to connect the app to your MQTT broker:


TrackerIDLeave blank
DeviceIDName of Person who own's device (eg. my DeviceID is allie)
Host

m11.cloudmqtt.com

PortPort from CloudMQTT (eg. my port is 11803)
TLSTurn Off
AuthenticationTurn On
User IDUser from CloudMQTT (eg. my User ID is jfcyrvev)
Password Password from CloudMQTT

To make sure that you are connected successfully, click on the Websocket UI button at the top of the CloudMQTT console page. Stay on the settings page in OwnTracks and click on the word "Check" next to your Port. If you did everything correctly, a new message should appear in the Websocket UI.

Next, we need to set regions in OwnTracks. Regions are areas on our map that have perimeters which mark specific distances away from a certain point. In our case, this point is home. When leaving an entering regions set up in OwnTracks, a notification gets sent to CloudMQTT which is read by the Picture Frame, thus changing the lights an appropriate color.

Select "Regions" in the bottom menu of your app and press the "+" icon to create a new region. Unless you know the GPS coordinates of your home on the top of your head, I suggest actually being at home while doing this. By default, Own Tracks will create a new region at your current GPS coordinates.

Creating a new region will take you to a new window with information about that region. Assuming the GPS coordinates are already set for your home, there are only three things you have to change. You need to give your region a Name, turn on Share, and set the Radius for Region. Repeat for each region. Below are suggested regions to create that will be compatible with the Arduino Sketch that you will eventually upload. You can change these distances to suit your needs, but you will also need to later change the Arduino sketch. Be careful when naming these regions because our Arduino sketch is CaSe SeNsItIvE!


Region NameRadius for Region (m)
Home20
Half Mile

805

One Mile

1609

Two Miles

3219

Three Miles

4828

Five Miles

8047

Ten Miles

16093

Fifteen Miles

24140

Twenty-five Miles

40234


Lastly, check the settings on your phone to make sure that the app is always allowed to use your Location information, that Background App Refresh is turned on , and that Use Cellular Data is turned on. It's also a good idea to turn notifications from the app off or you will receive a message on your phone any time you leave or enter one of these regions.

Step 5: Setting Up OwnTracks (Android)

Picture of Setting Up OwnTracks (Android)

This step is for setting up OwnTracks on your Android devices. You can skip this step if your family only has iOS devices.

This step will need to be repeated for each family member who has an Android device. Begin by downloading the OwnTracks app from Google Play. Once the app is downloaded, open it and navigate to the Settings page by clicking on the menu in the top left hand corner of the page. Once the menu pops up, click on 'Settings' at the bottom. Once you get to the setting page, click on the Mode option and select "Private".

Open up CloudMQTT and select "Control Panel" in the menu. On this page you will see the CloudMQTT instances that you have created. Find the instance that you created in the last step (in my case my instance is OwnTracks), and click on the blue button that says "Details". This will bring you to a new page with your Instance Info. We need to use this Instance info to set up OwnTracks correctly.

Back in OwnTracks, click on "Host" and fill out the following settings:


Host

m11.cloudmqtt.com

Port

Port from CloudMQTT (eg. my port is 11803)

Next, go back to the settings page and click on "Identification" and fill out the following settings:


Authentication

Turn on

Username

User from CloudMQTT (eg. my User ID is jfcyrvev)

Password

Password from CloudMQTT

Device ID

Name of Person who own's device (eg. my Dad's Device ID is steve)

Tracker ID

Leave Blank

Next, click on "Security" and turn TLS off.

To make sure that you are connected successfully, click on the Websocket UI button at the top of the CloudMQTT console page. Stay on the settings page in OwnTracks and click on the check mark on the top right hand corner of this page. If you did everything correctly, a new message should appear in the Websocket UI.

Next, we need to set waypoints(regions) in OwnTracks. Waypoints mark the center of areas on our map that have perimeters which mark specific distances away from the waypoint. In our case, this center point is home. When leaving an entering waypoint regions set up in OwnTracks, a notification gets sent to CloudMQTT which is read by the Picture Frame, thus changing the lights an appropriate color.

Navigate to your menu and select "Waypoints". Once a new page opens , press the "+" icon to create a new Waypoint. Unless you know the GPS coordinates of your home on the top of your head, I suggest actually being at home while doing this.

Creating a new region will take you to a new window with information about that region. While at home, press the circular icon in the top right hand corner of your screen to get your current GPS coordinates. You need to give your region a Name, set the Radius, and turn on Share. Repeat for each region. Below are suggested regions to create that will be compatible with the Arduino Sketch that you will eventually upload. You can change these distances to suit your needs, but you will also need to later change the Arduino sketch. Be careful when naming these regions because our Arduino sketch is CaSe SeNsItIvE!


Region NameRadius for Region (m)
Home20
Half Mile

805

One Mile

1609

Two Miles

3219

Three Miles

4828

Five Miles

8047

Ten Miles

16093

Fifteen Miles

24140

Twenty-five Miles

40234


Step 6: Edit and Upload Arduino Sketch

Picture of Edit and Upload Arduino Sketch

By default, Arduino doesn't include the Intel Edison as a Board Option. To change this, open the Arduino IDE and go to Tools > Board > Board Manager..... . This will open a new window with a search bar at the top. In the search bar, type in "Intel". Two options will appear. Select "Intel i686 Boards" which includes the Edison.

This sketch is dependent on several libraries, two of which you will need to download. Download the Adafruit LPD8806 library and the Knolleary's PubSubClient library and add them to your Arduino libraries folder.

In the Adafuit LPD8806 library, open the LPD8806.cpp file in a text editing program and delete the following lines:


#else

SPI.setClockDivider((F_CPU + 1000000L) / 2000000L);

In the PubSubClient library, open PubSubClient.h in a text editing program. Find the line that says "#define MQTT_MAX_PACKET_SIZE 128" and change it to the following:


#define MQTT_MAX_PACKET_SIZE 200

Download the Arduino sketch at the bottom of this page and open it up. There are several lines that you will need to change in this sketch including the following:


  • For "byte mac[] = { 0xFC, 0xC2, 0xDE, 0x44, 0xEA, 0xF5 };", replace "0xFC, 0xC2, 0xDE, 0x44, 0xEA, 0xF5" with your mac address.
  • For "IPAddress ip(192, 168, 1, 103);" replace "192, 168, 1, 103" with your Intel Edison's IP address.
  • For "PubSubClient client(server, 11803, callback, ethClient);" replace "11803" with your Port.
  • For the four lines declaring your MQTT topics such as "int person1 = stringTwo.indexOf("owntracks/jfcyrvev/allie/event");" replace "jfcyrvev" in each line with your UserID and replace "allie", "shari", "steve" and "erin" with the DeviceID's that you set on your phone.
  • For "if (client.connect("arduinoClient", "jfcyrvev", "**************")) {", replace "jfcyrvev" with your UserID, and "**************" with your password.
  • For the four client.subscribe lines such as "client.subscribe("owntracks/jfcyrvev/allie/event");" replace the topics such as "owntracks/jfcyrvev/allie/event" with the four topics that you declared earlier.

If you have changed or added any additional Regions in OwnTracks, make sure that you add them to this sketch. For example, if I wanted to add a region for Fifty Miles, I would have to include "int fifty = stringOne.indexOf("Fifty Miles");" when declaring key words to look for and include the appropriate if statements for each person by adding it under "for(i=0; i<4; i++){", "for(i=4; i<8; i++){", "for(i=8; i<12; i++){" and "for(i=12; i<16; i++){".

When uploading your Arduino sketch, make sure you plug in two micro USB cables and have the switch next to them pointing towards the USB cables.

Step 7: Laser Cut Your Parts

Picture of Laser Cut Your Parts

Around the time I started planning this project, Instructables author push_reset created the project InstaKISS : Networked Picture Frames. I used this project as a guide for building the frame and would like to link back as her 'ible was very helpful to me in building my own project!

Download the PDF Files at the bottom of this step and laser cutting all of the parts. I was able to fit the wood on three 8" x 24" sheets of 1/8" basswood. Please note that fitting all the pieces onto the wood was quite the squeeze, so you need to make sure to line your wood up perfectly square to the laser and run the project perimeter to confirm that it fits before starting your cut. You might even want to edit the file to combine edges to save space.

When cutting the 1/8" acrylic, engrave the entire front of the smaller windows where the LEDs will shine through. This will help diffuse the LEDs and make the electronic components of the strip less noticeable.

While I cut the Edison Mounting piece out of acrylic, you can really cut it out of any spare material you have laying around.

Step 8: Assemble the Front of the Frame

Picture of Assemble the Front of the Frame

As pictured above, there are two large pieces that make up the front. Using wood glue, glue these two pieces together. Make sure that all your edges are completely even before gluing. If everything is lined up correctly, the piece of wood with notches should sit on top of the piece of wood with rounded edged cut-outs creating a small border around the larger rounded edged cut-outs. Apply wood glue evenly, and wipe away any excess. Place a heavy object on top, and let the glue dry.

Once the glue is dry, we are going to pressure fit the acrylic pieces in place. The acrylic pieces are slightly larger than the holes that were cut for them, so the pressure of the pieces pushing up on each other keeps them together. To insert a piece of acrylic, set it on top of the appropriate window, and line it up as evenly as possible. Tap on the corners of the acrylic with a rubber mallet to apply pressure until they pop evenly in place.

Repeat for the rest of the acrylic pieces. Note that the smaller acrylic pieces were inserted with the engraved side down.

Step 9: Add Pictures

Picture of Add Pictures

Collect pictures of your family members and cut them out so that they fit within the square window which is slightly larger than 3.5". Cut squares out of cardboard or chipboard so that they are the same size as the pictures that you just cut out. Place the photos face down so that they can be seen through the window of the frame. Secure the pictures by backing them with the cardboard/chipboard squares and taping them to the picture frame.

In addition, make sure that your pictures are in the correct order in relation to your Arduino code. When looking at the front of your picture frame, the person who you assigned to "intperson1" in your code will be the image on the far left, with the other photos following in order of their code assignments.

Step 10: Mark Holes for Standoffs

Picture of Mark Holes for Standoffs

Before all of our wires get in the way, we need to mark where we are going to attach our standoffs. Using the Edison Mounting piece that you laser cut, place it on top of the inside of the front piece of your picture frame, and line the edges up so they sit square with the notches on your picture frame. Slide the Edison Mounting Piece over so that it overlaps the two center photos and the four corner holes are sitting between the first and second photos, and the third and fourth photos. Take a pencil and trace these holes onto the wood.

Step 11: Prepare LED Strip

Picture of Prepare LED Strip

Your LED strip will most likely come with rubber waterproofing around it. Carefully remove this waterproofing with an exacto knife or box cutter. You'll notice that the LPD8806 LED strip is made up of sections of two LEDs. For this project, we will need a total of 16 LEDs divided into four small strips containing 4 LEDs (2 sections) each. Divide your LED strip into these four parts by cutting on the copper connecting pads. If you have left over LEDs on your strip you can save them for another project.

Step 12: Solder Your LEDs Back Together

Picture of Solder Your LEDs Back Together

Cut four pieces of hook up wire measuring approximately 6". Strip the ends of the wire and solder a wire to each one of the copper connecting pads on your first section of LEDs. Get your next section of LEDs, and solder the other end of the hook up wires to the copper connecting pads making sure that you are attaching 5V to 5V, CL to CL, DI to DI and GND to GND. Repeat this process until all four strips containing 4 LEDS each (2 sections each) are wired together.

Step 13: Attach Header Pins and a Power Jack Adapter to LED Strip

Picture of Attach Header Pins and a Power Jack Adapter to LED Strip

Header pins need to be soldered onto the wires so that we can later attach the wires to our Arduino expansion board. It is very important that these are right angle header pins because the frame is very tight on vertical space (or, I guess horizontal space when the frame is standing up). Clip off three separate header pins. Once they are separated it should be fairly easy to slide the plastic pieces off of them.

If you've kept the original wires soldered onto the first section of your LEDs, there will probably be two red 5V wires, one green CL wire, one blue DI wire and two black GND wires. Solder the header pins on the CL wire, DI wire and one of the GND wires and apply heat shrink. We only need one of the 5V wires, so you can either remove the wire with a soldering iron, or just cut it short.

Using a screwdriver, attach the female power jack to the remaining 5V and GND wires. The red 5V wire will attach to the + terminal and the black GND wire will attach to the - terminal.

Step 14: Mount the LEDs to the Wood Backing

Picture of Mount the LEDs to the Wood Backing

Previously you should have cut out four 'I' shaped wood backing pieces. Using double sided mounting tape, attach the four sections of LEDs to each one of the wood backing pieces. Try to attach the LEDs as centered as possible. Apply a bit of pressure when doing this to make sure that the pieces are secure.

Step 15: Mount LEDs to Frame

Picture of Mount LEDs to Frame

Locate the eight 't' shaped wood pieces that you cut out previously. Using wood glue, attach these wood pieces into the eight notches(two for each picture) that you will find either above or below each picture. Glue the "I" shaped wood mounting piece to the "t" shaped wood pieces with the LEDs facing towards their acrylic window.

Step 16: Cut Wood Dowels

Picture of Cut Wood Dowels

Take a square wood dowel, and place it on top of any of your laser cut sides of your picture frame. Line up the top of the dowel with the flat side of the wood, and mark a line where the dowel intersects the inside of the notch opposite of the flat side.

Using a small hand saw, cut the wood dowel where you marked it. Repeat until you have four pieces.

Step 17: Glue Sides of Picture Frame

Picture of Glue Sides of Picture Frame

Begin by taking the four square wood dowels and gluing them in the corners(inside the notches) of your picture frame. Next, using the four wood pieces that were laser cut for the sides of the picture frame, glue in place to both the notches on the front of the frame and the wood dowels. These pieces have a tendency to pop out of place while drying, so it is a good idea to apply pressure such as using clamps.

Step 18: Glue on Standoffs

Picture of Glue on Standoffs

The Arduino expansion board comes with four standoffs. We are going to glue those to our picture frame so that we can later mount the Intel Edison inside of the picture frame.

You will need to use a strong glue or epoxy to attach the standoffs. I used liquid fusion glue and found that the hold was pretty strong. Apply a dot of glue on top of each of the four holes that you previously marked with a pencil. For the strongest hold, let the glue dry for 24 hours before screwing anything into the standoffs.

Step 19: Split the Battery Clip

Picture of Split the Battery Clip

To attach an on/off switch to the battery clip, we will need to modify it a bit. Carefully using an exacto knife or box cutter, slice between the red and black wires. It is very easy to accidentally cut too far off the center of these wires and remove too much of the coating, so I recommend only slicing enough to allow you to pull the rest of the wire apart by hand.

Once the wires are separated, cut the red wire in half. To prepare this wire to be soldered, strip the ends as well.

Step 20: Attach On/Off Switch

Picture of Attach On/Off Switch

Cut two pieces of hook up wire measuring at least 12" in length. It is a good idea to make these wires fairly long because they will be both attached to the inside of the picture frame, and attached to the back. If you ever need to remove the back of your picture frame, the wires should be long enough to allow you to set the back next to the picture frame without having to disassemble your electronics.

Solder the two wires to the two stripped wires from your battery clip and apply heat shrink. Next, stick the battery clip through the rectangular hole of the back piece of your picture frame and pull it through until you get to the on/off switch. Stick the bottom of the on/off switch through the hole and press on it. It should be able to pop into place without the use of adhesives.

Step 21: Mount Your Electronics

Picture of Mount Your Electronics

Using 4 #4 1/2" screws and nuts, mount your Intel Edison and Arduino expansion board to the Edison mounting piece. You will also notice four additional slots on the Edison mounting piece. Take two zip ties, and feed them through the slots so that the ends of the zip ties come out on top. Attach the female power jack adapter and 9V battery using these zip ties. Attach your 5V power supply to the power jack adapter and the battery clip to the 9V battery. This is also a good time to make sure that the power switch on the Intel Edison is pointing towards the barrel jack and large USB port.

Using the four screws that came with your Arduino expansion board, attache the Edison mounting piece to the standoffs.

****Note: It has been discovered that 9V batteries have a very short life span when powering the Edison. I recommend replacing this with an external power supply.*****

Step 22: Attach the Back to Your Picture Frame

Picture of Attach the Back to Your Picture Frame

At the bottom of the back of your picture frame there is a small rounded notch in the center of the bottom side. Slide the cord from your 5V power supply through this notch. Align the back of your picture frame so that it is square with the sides of the frames. A lot of the wires from the electronics inside of the frame will probably push on the back piece, so I suggest holding it in place using tape.

Using a small nail, stick it through one of the corner holes and hammer it about half an inch down into the wooden dowel below. Pull the nail out and secure the back by screwing in a #4 1/2" wood screw. Repeat for the other three corner holes.

Step 23: Use Your Frame!

Plug in your picture frame and enjoy! If you would like to set custom locations on your picture frame, simply add a new region, name it "Destination', and assign an appropriate to the region. Your picture frame will glow blue when you arrive at said destination.

Enjoy!

Comments

despicablemegru (author)2017-03-08

Hi allie, its a very interesting project and we started doing it. but the owntracks app always shows error in connection and is never in the connected mode. any suggestions on that. we are really dishearted as we cant proceed with it.

joshblease made it! (author)2016-01-19

So I made a stripped down version of this, and it works great, thank you!

I used an ESP8266-01 module and a single WS2811 module with an RGB LED. It's basically a way for a family member (concerned grandmother) to know if I'm home after a night out when i'm at university! Mine only consists of an LED though, so I may put it near an existing photo of me.

I followed all your steps for setting up OwnTracks on my iPhone, but as for the code I obviously made some changes.

For anyone who may want my code, it's up at https://bitbucket.org/joshblease/esptrackingled/s...

In a more customised version of my code, i've subscribed to another topic which allows me to control the colour of the LED via MQTT messages. This is combined with IFTTT's "Do Button" so when I arrive at a destination, I can just press the button in my notification center and the LED will flash blue for 30 minutes.

The flashing stops after 30 minutes, which I can change, or if I enter/leave a waypoint which is quite nice.

allie.fauer (author)joshblease2016-02-24

AWESOME!!! Thanks for sharing!

Sdowney2002 (author)2015-12-10

One more tweak. I had to increase MQTT_MAX_PACKET_SIZE (in PubSubClient.h) to 225 (instead of just increasing it to 200). The JSON output from OwnTracks is so long (for me, at least), that at 200, I only had 5 character spaces left to create range names. (It took me forever to figure out why "Home" would work, but none of my other ranges would.)

Sdowney2002 (author)2015-12-02

There's an issue with the current version of the Intel Edison firmware - Yocto. It doesn't save Arduino sketches when you reboot the Edison. The problem - and workaround solutions - are reported here and here.

Sdowney2002 (author)2015-11-21

Allie,

Can you shed any light on a compiling problem I'm having? The Arduino IDE doesn't like Adafruit's LPD8806 library; it fail to compile your sketch with this error: "F_CPU was not declared in this scope" in the LPD8806.cpp file.

Your sketch compiles just fine when the IDE is set to any Arduino board, but chokes when set to the Edison. I have a suspicion that the current Edison board is not defining F_CPU. Any insights? How did you get your sketch to compile?

Steve

allie.fauer (author)Sdowney20022015-11-23

Hi Steve! That is very strange as it was not a problem that I encountered. I will look into it for you and see if I can come up with anything. Just out of curiosity, did you try any of the example sketches that came with the library to see if they compiled? I know that two of the examples wouldn't compile for me, but two did work. The sketch that I know worked was the LEDbeltKit.

Sdowney2002 (author)allie.fauer2015-11-24

Hey Allie,

One more clue: when I first ran your sketch (before the SPI error), I got this error on line 31 of your sketch:

'callback' was not declared in this scope

I cleared that error by adding:

void callback(char* topic, byte* payload, unsigned int length); right after the line specifying the server IP address.

This is similar to what's in PubSubClient's mqtt_publish_in_callback example.

Steve

allie.fauer (author)Sdowney20022015-12-01

Geez! I must have accidentally deleted a line when adding comments/editing my personal information out of the code. I just updated the code to fix this error.

You have been such a tremendous help in catching all of the errors in this write up. I sincerely appreciate it. Please check your inbox as I am sending to you a 1 year pro membership to Instructables to say thank you!

Sdowney2002 (author)allie.fauer2015-11-23

Hi Allie,

All the LPD8806 examples (except the LEDbeltKit-alt) compiled just fine when compiled to any number of Arduino boards. When compiled to the Edison, they all failed at the same spot as your sketch.

I neglected to give you the full error message- called from Adafruit's LPD8806.cpp file; the error is:

F_CPU' was not declared in this scope. SPI.setClockDivider((F_CPU + 1000000L) / 2000000L);

I've tried compiling Adafruit's other LED library, (the WS2801) and get the same error message.

Googling the error message gives me nothing concrete to go on.

Steve

allie.fauer (author)Sdowney20022015-11-24

I'm pretty sure I solved it! Go into your LPD8806.cpp file and delete these lines:

#else
SPI.setClockDivider((F_CPU + 1000000L) / 2000000L);

They are about halfway down the document.

For some odd reason, my LPD8806.cpp file didn't have these lines, but when I added it, I was able to reproduce the same error message that you had.

Sdowney2002 (author)allie.fauer2015-11-25

That was it! Thanks so much Allie. I never would have thought the solution would be as simple as that.

One last (hopefully!) question. When setting the MAC address in the sketch, it's the MAC address of the Edison that I'm setting, correct?

Steve

allie.fauer (author)Sdowney20022015-12-01

Sorry for being MIA this week! Yes, the MAC address is that of the Edison.

Sdowney2002 (author)2015-11-14

Great project! I have a question about powering the board. You call for a 9v battery (rather than a AC to DC, plug-in power supply). Any particular reason for using a battery rather than a plug-in supply? How long does the battery last?

allie.fauer (author)Sdowney20022015-11-15

Hi Sdowney2002! It's actually a really good thing that you've brought this up....

While planning this project, the aesthetically conscious designer in me was extremely concerned about having two chords coming out of the picture frame(one to power the LEDs, and one to power the Edison). At first the battery worked fine. I got through documenting my project and filming the video by using the 9V battery. I ended up turning the picture frame off when I was done documenting, and then tried to turn it on the next day to find that powering the board with a battery was causing some issues.

Long story short, I ended up switching to an external power supply. Luckily my external power supply had a chord just thin enough that it was able to fit through the same hole designated for the LED power supply.

So I guess to answer your questions, yes there was a reason.....but it was a dumb one. The battery lasted only long enough for me to document my project. I will try to make some edits to this 'ible in the next couple of weeks to correct this issue.

Thanks for your question! -Allie

Sdowney2002 (author)allie.fauer2015-11-15

Allie,

Thanks for the quick response! I think your aesthetic sensibilities are right on the mark; not dumb at all! FYI: the power supply that Intel recommends for the Edison (EMSA120150) is discontinued; I'm looking at the SMI18-12-V-P5 as a replacement (http://www.digikey.com/product-detail/en/SMI18-12-V-P5/102-3573-ND/5415044)

Another question: the power supply for the LED strip has a 1.35mm X 3.5mm barrel, but the female jack (that it connects to) has a 2.1mm x 5.5 barrel. Will these pieces work together?

Steve

allie.fauer (author)Sdowney20022015-11-15

Good catch! I linked to the wrong power supply. Here is a link to the correct one(the link has also been edited in the project write-up) as confirmed by my Amazon shopping history....

http://www.amazon.com/gp/product/B012JTZBYE?psc=1&...

If you'd like to reference some specs, the power supply I have for the Edison can be found here:

http://www.digikey.com/product-detail/en/EMSA12015...

I was sent the power supply directly from Instructables along with the Intel Edison so I never did much research on buying the correct product myself. I decided to put my faith in the wonderful Instructables team and never really gave it a second thought....and it works!

Sdowney2002 (author)allie.fauer2015-11-16

Thanks Alllie!

Steve

crazy_thiago (author)2015-11-11

what a post thank you for this

can i use the same code for an arduinmo uno with ethernet shield? o i have to buy an edson?

allie.fauer (author)crazy_thiago2015-11-11

Yes, you should be able to use an Arduino Uno! You might want to do some research to find out what pins should be used for CL and DI on the LED strip and edit the code to accommodate those changes if needed.

EurekaFactory (author)2015-11-09

This is totally awesome! What a great idea! We're putting finishing touches on our own Intel IoT project, and was just browsing some of the entries when this one caught my eye. Useful, attractive and connected in every good sense of the word! Congrats!

Thanks for your comment! I feel totally flattered!! I hope your Intel IoT project went alright! Best of luck in the invitational!

Meh! It was pretty much a bust, but it qualified for the Epic Fail contest so not a total loss. :-) Actually, our hope is to tweak it and get it at least minimally operational by the end of the week:

https://www.instructables.com/id/Intel-Edison-Cat-Enrichment-Device-iCED/

At the very least, we learned a lot and had fun!

Oh no! At least the Epic Fail contest came at a pretty good time for you guys! I'll send a vote your way!

ppeters0502 (author)2015-11-07

Very cool idea! I don't have an Intel Edison, but I might see if I can adapt this with a raspberry pi and some relay switches!

allie.fauer (author)ppeters05022015-11-08

This project should be fairly easy to modify for any device that can connect to the Internet! Best of luck! I'd love to see pictures if you end up making it!

DIY Hacks and How Tos (author)2015-11-07

For a long time, I have wanted to do something similar to make a clock like the Weasley's have in Harry Potter.

I figured a picture frame would suffice. Until I can figure out how to program "Mortal Peril" as a location option, I feel like I can't do the Weasley Clock any real justice.

About This Instructable

9,674views

166favorites

More by allie.fauer:Internet Connected RemembrallIoT Location Sensing Picture FramePersonalized 3D Printed PEZ Dispensers
Add instructable to: