Sam Hetchler
Published

Pringles Can antenna with a LinkIt ONE

With my never-waning obsession with wardriving, I wanted to make something that played off it that anyone could use.

IntermediateFull instructions provided1,611
Pringles Can antenna with a LinkIt ONE

Things used in this project

Hardware components

Grove - LCD RGB Backlight
×1
Zip ties
×3
Pringles Can (Sour Cream & Onion)
×1
Big paper clip
×1

Story

Read more

Code

Wifi Witch Code

C/C++
/*
Code Name: Wifi_Witch
Developer: Sam Hetchler
Links:
  samhetchler@gmail.com
  deltainnovativelabs.wordpress.com
  G+: samhetchler
  twitter: @samhetchler

This code was developed for use with the Linkit ONE and the Grove-RGB Backlight.
The rig I used for this had the 2.4 GHz antenna inside of a Pringles can to maximize
the range. The information is displayed on the screen, no modifications needed.
This can also be used without something to focus the signals, but the signals would
be recieved from all around, making it harder to pinpoint the source.

Enjoy!
*/
#include <LTask.h>
#include <LWiFi.h>
#include <Wire.h>
#include "rgb_lcd.h"
#include <LBattery.h>

char buff[256];
rgb_lcd lcd;

void setup() {
  LTask.begin();
  LWiFi.begin();

  // set up the LCD's number of columns and rows.
  lcd.begin(16, 2);

  //Display the battery power level and charging state on boot up.
  lcd.setCursor(0,0);
  sprintf(buff,"Battery lvl: %d", LBattery.level() );
  lcd.print(buff);
  lcd.setCursor(0,1);
  sprintf(buff,"Is charging: %d",LBattery.isCharging() );
  lcd.print(buff);

  //Pause so you can see the values.
  delay(3000); 

  //Let the user know it's scanning.
  lcd.clear();
  lcd.setCursor(0,0);
  lcd.print("Scanning...");

}

void loop() {
  int apNum = LWiFi.scanNetworks();
  int adjSigStrength;

  for (int i = 0; i < apNum; ++i)
  {
    String stringSSID = LWiFi.SSID(i);
    
    //This "if loop" is to filter out my networks. Comment out the next
    //lines depending on if you want all networks to be seen.
//    if (stringSSID.startsWith("TSGT")) {} else //This filters out networks
//    if (stringSSID.startsWith("home-linksys1078")) //This filters out all other networks
    {
    
      //Clear the screen from the last run.
      lcd.clear();
      
      //Reset the text placement to the top left.
      lcd.setCursor(0,0);
      
      //Print the SSID.
      lcd.print(LWiFi.SSID(i));
      
      //Set the text placement to the bottom left.
      lcd.setCursor(0,1);
      
      //Print the Ajusted Wifi signal, where the higher the positive value,
      //the louder the signal is. This is more intuitive for most users.
      lcd.print("Adj Signal: ");
      lcd.print(100+LWiFi.RSSI(i));
      
      //Pause for .5 seconds so the user can read it. Here is where you
      //adjust the delay if you want the screen to stay on the SSID/Strength longer.
      delay(500);
    }
  }
}

Credits

Sam Hetchler

Sam Hetchler

10 projects • 31 followers
I am a tinkerer, developer, and concept hacker. I find it fun to push the boundaries of what's possible.

Comments

Add projectSign up / Login