OverThere

Giving places directions to you. (Please excuse messy code and poor documentation, this project is several years old and runs on a very old PebbleJS API).

As seen on Hackster.

Background

This was designed as a project at a Hackster sponsored hackathon and combines Google Maps search APIs with the Pebble smartwatch along with basic search.

Bringing Places to You

The first caveat of this project is to provide locations to the user that they may fancy based on simple preference selection. This is achieved through a basic Pebble menu interface that allows the user to select a category, at which point the menu is popped from the UI stack and a list of nearby places matching that filter is shown. This is filtered using location and proximity using Google Maps in combination with the Search API.

Directions

In addition, OverThere can provide accurate directions by pulling this data from Google Maps and separating it into a list of conceivable directions. Upon clicking any item, a card appears with some more information.

Finishing Touches

OverThere sports a variety of finishing touches, including comprehensive menu UI, defined UX by keeping some cards on the UI stack to speed up rendering, a Favorite system to add a location to Favorites, and a Rating/Review system that allows the user to view some reviews of the place they have selected.

Post Mortem

This project was revitalized a few months after the initial launch and "OverHere" was added. OverHere is a beacon system that allows the user to place a MediaTek LinkIt One module or similar microcontroller with server capabilities on a network, and provide the user two digits (the last two pieces of the IP address) that allow them to access the menu through a beacon. This expands capabilities allowing restaurants and stores to provide information to users, such as a menu or store layout, as well as cater reviews and take orders.

Optional: LinkIt based web server for OverHere beacons

/*
OverHere Web Server
adapted from MediaTek WiFi Web Server demo
*/
#include <LTask.h>
#include <LWiFi.h>
#include <LWiFiServer.h>
#include <LWiFiClient.h>

#define WIFI_AP "THE FARM WiFi"
#define WIFI_PASSWORD "organicfarm"
#define WIFI_AUTH LWIFI_WPA  // choose from LWIFI_OPEN, LWIFI_WPA, or LWIFI_WEP according to your WiFi AP configuration

LWiFiServer server(80);

String information = "STUFF HERE";



void setup()
{
  LWiFi.begin();
  Serial.begin(115200);

  // keep retrying until connected to AP
  Serial.println("Connecting to AP");
  //Serial.println(LWiFi.connect(WIFI_AP,LWiFiLoginInfo(WIFI_AUTH, WIFI_PASSWORD)));
  while (0 == LWiFi.connect(WIFI_AP, LWiFiLoginInfo(WIFI_AUTH, WIFI_PASSWORD)))
  {
   delay(200); //Serial.println("Connecting");
  }
  Serial.println("Got past connecting");
  printWifiStatus();
  Serial.println("Wifi Status has been printed");
  Serial.println("Start Server");
  server.begin();
  Serial.println("Server Started");
}

int loopCount = 0;

void loop()
{
  // put your main code here, to run repeatedly:
  delay(500);
  loopCount++;
  LWiFiClient client = server.available();
  if (client)
  {
    Serial.println("New client has arrived.");
    // an http request ends with a blank line
    boolean currentLineIsBlank = true;
    while (client.connected())
    {
      if (client.available())
      {
        // we basically ignores client request, but wait for HTTP request end
        int c = client.read();
        Serial.print((char)c);

        if (c == '\n' && currentLineIsBlank)
        {
          Serial.println("send response");
          // send a standard http response header
          client.println("HTTP/1.1 200 OK");
          client.println("Content-Type: application/json");
          client.println("Connection: close");  // the connection will be closed after completion of the response
//          client.println("Refresh: 5");  // refresh the page automatically every 5 sec
          client.println();
          client.println(information);
//          client.println("<!DOCTYPE HTML>");
  //        client.println("");
          // output the value of each analog input pin
//          client.print("<b>Hax</b>");
         // client.print(" is ");
         // client.print(loopCount);
         // client.println("<br />");
  //        client.println("</html>");
       //   client.println();
          break;
        }
        if (c == '\n')
        {
          // you're starting a new line
          currentLineIsBlank = true;
        }
        else if (c != '\r')
        {
          // you've gotten a character on the current line
          currentLineIsBlank = false;
        }
      }
    }
    // give the web browser time to receive the data
    delay(500);

    // close the connection:
    Serial.println("close connection");
    client.stop();
    Serial.println("client disconnected");
  }
}

void printWifiStatus()
{
  // print the SSID of the network you're attached to:
  Serial.print("SSID: ");
  Serial.println(LWiFi.SSID());

  // print your WiFi shield's IP address:
  IPAddress ip = LWiFi.localIP();
  Serial.print("IP Address: ");
  Serial.println(ip);

  Serial.print("subnet mask: ");
  Serial.println(LWiFi.subnetMask());

  Serial.print("gateway IP: ");
  Serial.println(LWiFi.gatewayIP());

  // print the received signal strength:
  long rssi = LWiFi.RSSI();
  Serial.print("signal strength (RSSI):");
  Serial.print(rssi);
  Serial.println(" dBm");
}

Built With

Share this project:
×

Updates