Introduction: EUD1_Dev

What is this Thing?

EUD1_Dev, broken down, stands for Eyes-Up-Display v1 Developer Edition. Basically, it’s your wearable heads up display (HUD) that can display any information anywhere (like at home or at work…). In this project tutorial I show how to make a fully functional EUD1_Dev. The two functions that I have put in this device (so far) are telling the time and displaying notifications. Please know that the EUD1_Dev is not limited to just these functions though, instead these functions I have here are examples of fundamental features that will let developers copy and build upon. Essentially, I’ve built a simple hardware platform for both software and hardware developers to build up from, why else do you think I labeled it the “Developer Edition”?

What's with the "Developer Edition"?

There were many decisions that I made while building this device so it would be easier/better for developers interested on using this platform (isn’t that the main population of hackster.io?). With that said, this device could still be used in a normal setting, but I didn’t exactly design it for consumers. That feature is reserved for EUD1, a consumer-friendly version of EUD1_Dev, which will come later.

So, here’s an outline of the features and decisions I made for EUD1_Dev:

  1. Super thin frame and 3D printed/printable

    1. Use a lot less filament, greatly decrease print time, and (surprisingly) increased dropping and bending tolerance.

    2. A little flimsy, bend (not permanently) under force, and some parts may snap if too much pressure is applied.

  2. Jumper wires

    1. Easier to change and easier for tracing of bugs during debugging

    2. May not look so great, but then again this isn’t a consumer product (yet…)

  3. Lower resolution OLED display, and no optic-focusing system

    1. Simpler development, less memory required for icons/pictures, a ton cheaper, and lighter

    2. Smaller text may appear pixelated and need to hold display system further away from eye so eyes can focus on text

  4. Computing core is a development board: MediaTek Labs LinkIt Smart 7688 Duo
    1. Well there nothing wrong with using a small, yet powerful, development board. Especially if this device was meant for developers.
    2. Not as fast or low level as a raw AVR (?)

What is a HUD and how is it done on the EUD1_Dev?

The acronym HUD stands for Heads Up Display. The idea is that it displays relevant/necessary/important information at eye level, relieving the need to move or turn your head. Examples of its use are in fighter jets and in cars. HUDs let the pilot/driver of these vehicles view useful/critical instrument data without having to divert their attention from what’s ahead of them (fig. 1). Don’t get HUDs confused with augmented reality (AR) though. HUDs don’t exactly augment what you see, rather add a non-intrusive display to your view.

On the EUD1_Dev, the HUD effect is done with an OLED display reflecting
its image off a small piece of clear plastic. Why use an OLED rather than an LCD or TFT? OLED displays don’t use back-lights to illuminate their display, rather each pixel is their own light source. Because of this, the image reflection from the clear plastic will be just the pixels and not a square of light (emitted from the back-light) with the image. This will greatly increase the contrast of the display which will help readability. Example sources of clear plastic are shown in fig. 2, 3, and 4.

A diagram of the HUD construction used in the EUD1_Dev is shown in fig. 5. In this picture, the green line outlines the OLED display, white lines outline the clear plastic, and red arrows show the direction of the light from OLED. The image displayed from the OLED display reflects off the diagonal piece of plastic (labeled “2”), which then goes toward your eyes. The angle between plastic “1” and the OLED display doesn’t matter, nor does the angle between plastic “1” and “2”. Play around with the angles until you get a viewing angle you like. I’ll explain how to construct the display later.

Process / work flow (of this device)

With the current setup, the process/work flow of the system is: IFTTT pushes data to the MediaTek Cloud Sandbox (MCS) using the Maker channel, MCS is setup to have many string data channels to hold the incoming data from IFTTT, the LinkIt Smart 7688 Duo’s Linux side will then take the data and send it to the Arduino side, which will format it and display it on the HUD. You don’t have to, but it will help streamline your development on top of what is already there if you conform with this work flow.

Just a quick vocabulary note: when I say “Linux side”, I’m referring to
the MT7688 SoC embedded in the LinkIt Smart 7688 Duo. And when I say “Arduino side”, I’m referring to the ATmega32U4 MCU.

Now (finally) on to step 1...

Step 1: IFTTT Setup Part 1 (account and Test Applets)

As a quick note: starting from this section, the rest of the project will be a tutorial on building the device that I have currently developed. Also note that while IFTTT’s service is automatic, it may not be instantaneous. You sometimes may have to manually click the “Check-now” button to force the service to react.

So, the first thing in the work flow of this device is for IFTTT to push data to MCS. Start by opening ifttt.com and log in or create an account if you don’t have one already (fig. 5 and 6). Once you are all done with that, you will be presented with the screen shown in fig. 7. Navigate to the “My Applets” as shown in fig. 8 and fig. 9. If you are a new user to IFTTT, your “My Applets” page would not have the five tiles (known as applets) as I have in the body section of the page. In this section of the tutorial, I will show you how to build all five of these applets. Reading left to right, up to down, here’s what the applets I setup for this project do: add an event to my (Google) calendar using the Do Button widget (this was used to help test the calendar function during development), send an email to myself with a subject (used to help test the email function during development), upload the current time to MCS (trigger the setup time function), send calendar event data to MCS (will trigger the calendar notification and carry data to be displayed in the notification), send email data to MCS (will trigger the email notification and carry data to be displayed in the notification).

So, let’s go through how to build the first two applets - your testing
applets. Use these applets to test if your setup is working. First, build the Do Button widget to make the test calendar event:

  1. Start building a new applet by clicking the “New Applet” button on the right side (fig. 10).
  2. You will then be presented with the “if this then that” (IFTTT) statement with the “this” clause highlighted (fig. 11). Click it.
  3. You are then brought to the “Choose a service” section. In the search box in the middle of the screen, look up “Button widget”. Select the “Button Widget” service option you get (fig. 12).
  4. You may be prompted to connect to this service, go ahead and click the “Connect” button to continue.
  5. There is only one option in the “Choose trigger” section, “Button Press”, so select it.
  6. You are then brought back to the IFTTT statement, but this time the “this” clause is replaced with the Do Button icon and the “that” clause is highlighted (fig. 13). Click it.
  7. You are then brought to the same “Choose a service” section again. This time, look for the “Google Calendar” service (fig. 14). Select it once you get it.
  8. Again, you may be prompted to connect to this service. When you connect to a Google service for the first time, it may ask you to sign in and then ask you to confirm your connection with IFTTT. Go ahead and confirm whatever it needs.

  9. There is only one action that Google Calendar has, “Quick add event”, so select it.

  10. You then are given a text box with pre-filled-in data. Feel free to use this data, or you can change it to whatever you want like “Meeting with Mr. Brown 10:45am” (fig. 15).

  11. Click on the “Create action” button at the bottom of the form when you are finished.

  12. You are then brought to the “Review and finish” section. In here, you
    can change the name of your event and choose if you want to receive notification when this applet fired. To receive notifications and to fire “Button widget” applets, you will need to download the free IFTTT app onto your smartphone (fig. 16). Click on the “Finish” button and your applet will be added to your “My Applets” page (fig. 17).

Get the hang of things now? Next, we’ll build the Do Button widget to send an email to yourself:

  1. Start building a new applet by clicking the “New Applet” button.

  2. Click on the “this” clause and choose the “Button widget” service.

  3. Select the “Button Press” trigger.

  4. Click on the “that” clause and choose the “Gmail” service.

  5. Select the “Send an email” action.

  6. Fill in the “To address” field with your email address. You can leave the rest of the data at its defaults if you want. Click “Create action” when you are done.

  7. "Review and finish” your applet. To build the other applets, you first need to setup a MCS account. Read the next section to do so.

Step 2: MediaTek Cloud Sandbox (MCS) Setup

The second step in the work flow of the EUD1_Dev is for MCS (a MediaTek cloud service) to collect the sent data from IFTTT. Here’s an outline of what we are going to do:

  1. Log-in/sign-up into MCS
  2. Create a new prototype
  3. Add data channels
  4. Create a test device
  5. Add IFTTT as a web service to MCS

If, at any point, you get a popup message saying something like “401 Unauthorized”, just log out and log back in to reauthorize. Let’s get started!

  1. Go to mcs.mediatek.com and click on the “Sign in / Register now” button in the top right corner of the screen (fig. 18).
  2. You will be presented with the sign in page. If you have an account, you can sign in / register with it by clicking on the orange button on the bottom of the form. If not, sign in / register by entering you email address and a password into the text boxes (fig. 19).

  3. If you signed in with an account, you may be asked to authorize access from MCS. Click “Authorize” to continue (fig. 20).

  4. Once signed in, you will be brought to the “Dashboard” page (aka the console). In here, you can see your “Prototypes” and their “test devices”, the total number prototypes you have and the total number of test devices you have, recent activity, and links to different resources. The next thing we do is create a new prototype. To do this, click on the “Development” drop-down menu on the top left corner of the page and select “Prototype” as shown in fig. 21 and 22.

  5. In the Prototype page, you will be presented to your prototype list. As you can see in the picture, I already have two prototypes. You may also have a couple of prototypes here if you have used MCS in the past. If not, this page would not have the two forms named “EUD1_Dev” and “LEDToggle” (fig. 23). Although, by the end of this section you will have one named “EUD1_Dev”.

  6. To create a new prototype, click on the “Create” button on the left sideof the screen. Once clicked, a popup will appear with a form to be fill in (fig. 24).

  7. These are the values that I used to create my prototype, you can enter in different values for each prompt except for the “Hardware Platform” prompt (that needs to be “LinkIt Smart 7688 (MT7688)”) as shown in fig. 25.

  8. Once you fill in the form and click save, your new prototype will appear in the prototype list (fig. 26). Click on the blue “Detail” button at the bottom of the form to start editing it (fig. 27).

  9. Feel free to follow the “tutorial” popup to get yourself familiar with the setup, though I will be walking you through what you need to know for this section. If you don’t want to follow it, simply click on the “Exit” button at the bottom of the popup (fig. 28).

  10. The next thing we do is adding data channels. Data channels are ways for data to be stored or manipulated. The details page of your prototype will automatically default to the “Data channels” tab. To add a new data channel, click on the blue “Add” button on the left side of the screen under the label “Add Data channel now!” (fig. 29).

  11. Once clicked, the data channel type popup will appear. Here you can select the data channel type, we are going to select the “Display type” (fig. 30). Once selected, you will be prompted with a form to fill out (fig. 31).

  12. In total, we want to have four data channels: email, calendar, notification, and time. Let’s start with email. In the “Data channel name” prompt, type in “Email”. In the “Data channel id” prompt, enter in an id that you can remember. This is important because you will use this id to identify which data channel you are receiving data from in your code. Also, for this device, make sure your device id is unique enough that someone won’t accidentally type it in an email, calendar event, or in a notification. Put in any description you like in the “Description” prompt, and select “String” in the “Data type” prompt. In the end, your form should look something like fig. 32 (maybe with different “Data channel id” values).

  13. Click the “Save” button at the bottom of the form once you are done.

  14. Repeat steps 10-13 three times more, but putting “calendar”, “notification”, and “time” as the “Data channel name” with a different (unique) “Data channel id”. Your data channel list/tab should look something like fig. 33.

  15. That data channel named "Notification" is for handling any notifications that aren’t email and calendar alerts.

  16. Now that we have created the data channels, the next thing is to create a test device. This can be done by clicking on the “Create test device” button in the top right corner of the screen (fig. 34).

  17. Once clicked, a simple form will appear. Fill in the “Device name” and add a description if you want. I’ve left the “Create as public device” box unchecked, but I haven’t really ventured into seeing what the difference between having a public or private device would do. For now, just leave it has a private device (leave the “Create as public device” box unchecked). Click the “Create” button when you are done (fig. 35).

  18. When clicked, you will be shown a small “Success” popup. Click on the “Go to detail” button to view your details (fig. 36).

  19. In your test device’s details page, you can see the current values of
    your data channels (currently all blank) and your DeviceId and DeviceKey in the upper right corner. Copy down your DeviceId and DeviceKey, you will need them in your code. It is important that you keep these values a secret because these are like the username and password for viewing your device’s data channels (fig. 37).

  20. Next, we will add IFTTT as a web service to you MCS account. In a new tab in your web browser, go to https://ifttt.com/services/maker_webhooks/settings. When going to this site, you may be prompted to connect to the Maker channel (like when you were prompted to connect to the Button channel and Google calendar/mail channel). Go ahead and confirm/connect to the channel. Once you make it to the website, your screen should look something like fig. 38.

  21. In my picture, I censored out a line of text. That text is your key, which should also be kept a secret as it is your identifier in the Maker channel. On your website, copy down your key as you will need it in a few steps from now.

  22. Going back to your MCS tab, click on your profile picture in the top right corner of your screen to open a drop-down menu and click on the “Profile” option (fig. 39).

  23. Once in your profile page, select the “Service Provider” tab in the bottom left region of your screen (fig. 40).

  24. Once there, “Apply for appId and appSecret” (fig. 41).

  25. Fill in the form that pops up. For the “App url” prompt copy this: https://maker.ifttt.com/trigger/eud1/with/key/YOUKEY into it and replace “YOURKEY” with your maker channel ID key (the one you got in step 21). Once you fill out the form, click the blue “Save” button. Click the OK button when the success screen comes up.

  26. Now at the bottom of the screen you have your appId and appSecret. Copy these down and keep them a secret (hence the name appSecret). These codes will let IFTTT have editing rights to your data channels.

Good Job! You have finished setting up your MCS page. Now go back to ifttt.com to finish setting up the rest of your applets…

Step 3: IFTTT Setup Part 2 (MCS Applets)

Back here at ifttt.com, you need to build three more applets. One to send email data to your email data channel, one to send Calendar data to your calendar data channel, and one to send the time to you time data channel. Later, once you get a hang of how to make these, you can make more to send whatever data you want to your notification data channel.

Here’s how to build the applet for sending email data:

  1. Create a new applet by clicking the “New Applet” button.
  2. Click on the “this” statement to select a service for the “If This” clause.
  3. Search for the “Gmail” service, click it once you find it.
  4. In the triggers selection page, select the “Any new email in inbox” trigger.
  5. Continue to the “that” statement.
  6. Search for the “Maker Webhooks” service, click it once you find it.
  7. In the Actions selection page, select the only action available (Make a web request). In the text box labeled “URL”, paste the URL you used in step 25 of the MCS setup section. Select “POST” as your “Method”. Select “application/json” in the “Content Type”. Finally, paste this code into the “Body” section of the form:
    1. {"appId": "YOURAPPID", "appSecret": "YOURAPPSECRET",<br> "datapoints":[{"dataChnId": "YOURDATACHANNELID",
       "values":{"value": "{{FromAddress}}##{{Subject}}"}
       }]
      }
  8. In the code, replace “YOURAPPID” with your appId from the service provider output (step 26 of the MCS setup section), replace “YOURAPPSECRET” with your appSecret from the service provider output (step 26 of the MCS setup section), and replace “YOURDATACHANNELID” with the data channel ID you assigned your mail data channel. You action section should look something like fig. 42.

  9. In the “values” part of your code, you see that the output value is the “{{FromAddress}}” of the email followed by two “#”s and the “{{Subject}}” of the email. What does that all mean? The text that are surrounded by the “{{“ and “}}” are known as IFTTT ingredients. You can find more of them by clicking on the white “+Ingredients” button under the Body text box, and as you probably guessed: “{{FromAddress}}” returns the sender’s email address and “{{Subject}}” returns the subject of the email. The reason why the sender’s address and subject are separated by two “#”s is because it is a unique character/symbol that we can use later in our code to separate the two ingredients.

  10. Once you are done, click on the “Create Action” button, review your applet, and save it.

  11. Repeat steps 1-10 again, but this time change the trigger service to “Google Calendar”, the trigger to “Any event starts”, “YOURDATACHANNELID” with your data channel for calendar events, the ingredient “{{FromAddress}}” to “{{Title}}”, and the ingredient “{{Subject}}” to “{{Starts}}”

Now that you’ve made the Gmail and Google Calendar applets, let’s make the applet to send the time.

  1. Create a new applet by clicking the “New Applet” button.
  2. Click on the “this” statement to select a service for the “If This” clause
  3. Search for the “Button widget” service, and click it once your find it. Select the only trigger available (Button press)
  4. Continue to the “that” statement.
  5. Search for the “Maker Webhooks” service, and click it once you find it.
  6. In the Actions selection page, select the only action available (Make a web request). In the text box labeled “URL”, paste the URL you used in step 25 of the MCS setup section. Select “POST” as your “Method”. Select “application/json” in the “Content Type”. Finally, paste this code into the “Body” section of the form:
    1. {"appId":"YOURAPPID", "appSecret": "YOURAPPSECRET", <br> "datapoints":[{"dataChnId":"YOURDATACHANNELID",
                      "values":{ "value":"{{OccurredAt}}" }
                    }] }
  7. Like before, replace “YOURAPPID”, “YOURAPPSECRET”, and “YOURDATACHANNELID” with their actual values.

  8. As you probably have already guessed, the ingredient “{{OccurredAt}}” return the current time.

  9. Click "Create action" and save you applet.

All that is left is for you to build your own custom applet for your Notification data channel. Remember: put “##” between the two ingredients and make the first ingredient that “title” ingredient and the second the “details” ingredient. Also, know that it is completely fine if you don’t build an applet for your Notification data channel. The device will run normally even if you didn’t setup a Notification data channel.

Step 4: Setting Up the LinkIt Smart 7688 Duo

This may be the shortest section yet! Go to https://docs.labs.mediatek.com/resource/linkit-smart-7688/en/get-started/get-started-with-the-linkit-smart-7688-duo-development-board and follow the instruction (including the getting started guide) there until you are done. I think labs.mediatek.com will do a much better job at explaining how to setup their own product than I can!

Step 5: Pre-Assembly: Collecting Your BOM

Here's a hardware BOM of all of the material you need. The images will give you an image-by-image version of the BOM:

  1. [1x] MediaTek Labs LinkIt Smart 7688 Duo (fig. 43)
    1. Please make sure you buy the LinkIt Smart 7688 Duo, the regular LinkIt Smart 7688 doesn't have enough pins to support this project!
  2. [15x] Male/MaleJumper Wires (fig. 44)
    1. These are the wires that I used in my project, feel free to change them
      to whatever type you want. There are even some places where I would change the wires from Male/Male to Male/Female...

  3. [32x] Female/Female Jumper Wires (fig. 45)
    1. These are the wires that I used in my project, feel free to change them
      to whatever type you want. There are even some places where I would change the wires from Female/Female to Male/Female...

  4. [1x] DS3231 RTC module (ZS-04) (fig. 46)
    1. I was unable to find a retailer link for this, so here's the link I used when I bought it from Amazon

  5. [1x] Parallax MEMSIC 2125 Dual-axis Accelerometer (Mx2125) (fig. 47)
  6. [1x] 128x64 Monochrome SPI OLED (fig. 48)
    1. Just go to amazon.com and search for "128x64 SPI OLED" and you will be
      flooded with results that look exactly like this one. If you find a cheaper offer than the one listed here, by all means take it!

    2. Please make sure you buy the correct OLED Display! The one used in this project uses the SPI bus which has 7 pins, which shouldn't be confused with the I2C bus version which has 4 pins!
  7. [1x] 3D printer or 3D printing service (fig. 49)
  8. [1x] Soldering iron and solder (fig. 50)

The only software that is required is the Arduino IDE (fig. 51) (or the web IDE (fig. 52) if you prefer to use that one). Optionally, you can get Autodesk Fusion 360 (free) if you want to modify or view the parts of the device's frame (fig. 53).

The file attached with the images is the STL file for the device's frame, the Arduino Code file (ino), and the Python (.py) code for the Linux side.

Step 6: Assembly

This is the reason why the “estimated time” of this project is about 6 hours. It depends on how long it takes your 3D printer to print out this design. For me, it took roughly four hours and 30 minutes to print. That might be different for you.

Here’s what you do to assemble the hardware for this device:

  1. Download the .stl file provided in the BOM section of this project and 3D print it. Follow fig. 54's layout suggestion for best print
  2. While it’s printing gather your materials listed in the previous step (minus the printed frame) (fig. 55).
  3. You are also going to need five 10-15mm pieces of completely stripped wires and three 20-25mm pieces of completely stripped wires.
  4. Get some solder and a soldering iron.
  5. Solder the pieces together as shown in fig. 56. In this figure, blue lines are next to the 10-15mm pieces of wire and the green lines are next to the 20-25mm pieces of wire.
  6. Connect female/female wires onto the ends of these wires (fig. 57).
  7. Cut a 27 x 68mm piece of clear plastic and fold it at the 28mm line, folding the piece into a 27 x 28mm piece and a 27 x 40mm piece as shown in fig. 58.
  8. Tape the 27 x 28 section to the side further away from the pins, and tape the other section to the side closer to the pins (fig. 59).
  9. The display should look like fig. 60 folded:
  10. Once the 3D printer has finished, place the components in their locations in the correct orientation as shown in fig. 61 and fig. 62.
  11. Use the Fritzing breadboard or schematic diagram, fig. 63 and 64, as a guide for wiring.
  12. The Mx2125 in the Fritzing diagram is pointed forward. To label the pins in a “U” shape (left to right): Temp, X-Axis output, GND, GND, Y-Axis output, VCC.

Then you are done! That was easy! Fig. 65, 66, 67, and 68 show views and angles of the assembled device.

Step 7: Software (Arduino)

In this section I will explain how to get the Arduino code working, uploadable to your LinkIt Smart 7688 Duo, and manipulate the Adafruit SSD1306 display library to the way we want it. If you want to read about how the code works, head over the attachments section in this project and view the comments I wrote all over the Arduino (.ino) code file.

Launch the IDE.

Next, we need to install the Adafruit_SSD3106 library and the Adafruit GFX library. All the other libraries in the Arduino code for this device should already be pre-installed. Navigate yourself to the Library manager menu: Sketch menu >> Include Library >> Manage Libraries... (fig. 69). Once clicked, the “Manage Libraries” pop up will appear (fig. 70). In the filter search text-box in the corner, type in “Adafruit SSD1306”. This will filter all the libraries to the SSD1306 library (the one that you want) (fig. 71). Once you find the library, click it, select the library version (pick the newest one), and click install. Do this again with the “Adafruit GFX Library” (library) (Fig. 72).

Now that you have the Arduino IDE installed, download / copy and paste the Arduino code that I wrote into it. You can find the code in the attachments section of this project.

The display in the EUD1_Dev works by reflecting light off a surface. But this means that what you see will also be mirrored! So, what we need to do is change two variables in the Adafruit SSD1306 display library (the library I used to control this display) so that the OLED will initially display a reversed and mirrored image. We also need to uncomment a block of code and comment out a block of code, that way we can let the library know what type of display it’s dealing with (128 x 32 or 128 x 64).

  1. Navigate yourself to your Arduino’s sketch book/folder (fig. 73)

  2. Navigate yourself to the libraries folder (fig. 74)

  3. Navigate yourself to the Adafruit SSD1306 library (fig. 75)

  4. And open the file “Adafruit_ssd1306.h” in a text editor (fig. 77)

  5. Using the “find” function in your text editor, look for this line of code: #define SSD1306_COMSCANDEC. Once your find it, replace its current value (0xC8) with 0xC0

  6. Now that line of code should say: #define SSD1306_COMSCANDEC 0xC0

  7. Using the “find” function again, look for: #define SSD1306_SEGREMAP. It should be right below the previous line. Replace its current value (0xA0) with 0xA1.

  8. Now that line of code should say: #define SSD1306_SEGREMAP 0xA1.

  9. Those were the two variables that you needed to change to reverse and mirror the data being displayed on the OLED. Now we are going to uncomment a section of code that will define our OLED display’s size (128 x 64) and comment out the section of code that defines our OLED display’s size to be 128 x 32.

  10. Find this line of code: #if defined SSD1306_128_64 . Uncomment this line and the following three beneath it. Now the code should look like this:

    1. #if defined SSD1306_128_64<br>#define SSD1306_LCDWIDTH 128
      #define SSD1306_LCDHEIGHT 64
      #endif
  11. Finally, find this line of code: #if defined SSD1306_128_32. Comment out this line and the following three beneath it.

  12. Save your changes to this file and exit.

  13. Now you need to enter in your data channel ids (from MCS) into the Arduino code.

  14. In the Arduino code, go to line 40 and change the value of maildatachannel from “mail” to your mail data channel’s id. Repeat this for lines 41 and 42 for the calendardatachannel (calendar data channel id) and the timedatachannel (time data channel id). Your notification data channel ID doesn’t need one because the code will know that if it isn’t one of the three listed above, it must be the third-party notification data channel.

  15. Save your changes to this file and exit. There! Now you have added the necessary libraries to your Arduino IDE, changed the two variables that control the display buffer, correctly defined the size of the display, and updated your Arduino code to match your data channel IDs! All you need to do is upload it to the LinkIt Smart 7688 Duo. If the IDE says that you are missing whatever library, simply go back to the library manager and install whatever library you are missing. Also, feel free to comment out pieces of code like the code to display the seconds (lines 450-453 and 458-461), but know that you still will need to setup the seconds when setting up the time because the code relies on it to determine whether or not it needs to update the time on the screen.

Step 8: Software (Linux: Python)

The Python software for the LinkIt Smart 7688 Duo basically does all the data analysis. Letting the Arduino side deal with displaying the data. This is because the Arduino side doesn’t really have a lot of memory space, therefore I tried to keep the data manipulation and data collection stuff all on the Python side. Specifically, the Python code will:

  • Establish data connections with MCS

  • Listen/collect data from MCS

  • Split up and assign data to their correct variables to hold them

  • Split up and convert the strange time format (from the time data channel, collecting from IFTTT’s “{{OccuredAt}}” ingredient) to a format that is easier for the Arduino to display (and set into the ZS-042 RTC).

  • Send all this data to the Arduino side via the internal serial port that the two chips share.

There are a couple lines of code that you will need to change in this file to fit your device. Like your DeviceId and your DeviceKey (fig. 78).

  1. In line 19, change the “xxxxxxxx”
    value of “device_id” to your DeviceId (obtained in step 19 of the MCS setup section).

  2. In line 20, change the “xxxxxxxxxxxxxxxx” value of “device_key” to your DeviceId (obtained in step 19 of the MCS setup section).

That’s all you need to do to this code file for it to work. If you are interested, I have commented this code file so you can understand what the code is doing.

Uploading the code is also easy. There are two ways to do it. One, you can open a ssh connection with the board and copy and paste the code into a vim file. Or you can:

  1. Open an ssh connection with your board

  2. Create a folder in your root directory named EUD1_Dev, or whatever else you want to call it

  3. Navigate yourself (on your computer) to where you downloaded the code file

  4. Open another terminal/PuTTY/Tera Term/whatever-console-system-you-are-using window

  5. Type in scp FOLDERNAME/EUD1_Dev.py

  6. Replace FOLDERNAME with the name of the folder your created in step two

  7. Click enter

To run your code, all you need to do is navigate your way into FOLDERNAME
and type in python EUD1_Dev , hit enter and the code will run! If you keep the window open, you can also see debugging data and some other things that will let you know what is going on.

Step 9: How to Operate

  • When there are no notifications, the display will just show the time.
  • When a notification appears, the time display will disappear and the screen will be filled with an icon that represents the notification type and a subtitle. For emails, the subtitle will be the sender’s email address (minus anything that comes after the @ symbol); for calendar events it will be the event’s title; and for other notifications, it will be the notification ID name.
  • To dismiss a notification, tilt your head to the left. Keep your head tilled as a loading bar runs across the screen. Wait for the screen to clear and the word “dismissed!” to flash. If you stop tilting your head while the loading bar is building, you will cancel the dismiss function.
  • To view the details of a notification, do exactly what you would do in dismissing a notification except tilt your head to the right instead. Stop tilting when the message details appear. You can dismiss this and go back to the time view the same way you would dismiss a notification.

Some demo videos of the functions are above. "ticking time" shows the time interface, "email demo" shows an incoming email notification (the user starts to dismiss it but cancels it, opens the notification details, and then dismisses it after reading), "calendar demo" shows a calendar-event-about-to-start notification (the user starts to dismiss it but cancels it, opens the notification details, and then dismisses it after reading), "unid demo" shows a Facebook-liked notification (the user starts to dismiss it but cancels it, opens the notification details, and then dismisses it after reading).

This device doesn't have a battery because it was made for development purposes, and because the LinkIt Smart 7688 Duo has some powering requirements that isn't very efficient for batteries: 5V 1A. My recomendation for powering this device would be to simply plug it into a standard USB wall charger or your computer's USB port. It most likely already plugged into your computer for development usages anyway.

Step 10: The End and Notes

Whew! You made it to the end! This is how you build the EUD1_Dev. By the name, this was built intentionally for developers to experiment around with, and see what they can come up with on this platform. As this section’s title suggests, I’m going to curate a list of all “the notes” I’ve made and will make now:

  • Just a quick vocabulary note: when I say “Linux side”, I’m referring to the MT7688 SoC imbedded in the LinkIt Smart 7688 Duo. And when I say “Arduino side”, I’m referring to the ATmega32U4 MCU.
  • Please note that while IFTTT’s service is automatic, it may not be instantaneous. You sometimes may have to manually click the “Check-now” button to force the service to react.
  • When you fire the trigger to set the time, you will be prompted to open a serial port to complete setup. There you will setup the seconds.
  • If you connect the LinkIt Smart 7688 Duo’s Arduino side to serial port, you can see debugging information and some data being streamed.
  • The Mx2125 in the Fritzing diagram is pointed up. To label the pins in a “U” shape (left to right): Temp, X-Axis output, GND, GND, Y-Axis output, VCC.

Thank you for taking interest in this project! Please leave feedback at the end of this project page and look out for EUD1, the consumer-friendly variant of EUD1_Dev!!

Explore Science Contest 2017

Participated in the
Explore Science Contest 2017

Power Supply Contest

Participated in the
Power Supply Contest

Invention Challenge 2017

Participated in the
Invention Challenge 2017