From snapchat filters to selfie sticks, everything nowadays about taking a picture. We go to a fancy restaurant so you can take a picture of your pasta; fly out to the beach to take a picture of your feet on the sand with the ocean in the background. Being the intelligent and wise entrepreneurs and engineers of the future, we realized this modern trend to bring you this revolutionary creation.
For far too long have we relied on cameras with timers or even photoshop to get the entire group in a picture. Sure, that’s what selfie sticks are for but who wants to be seen with one of those? Combining the capabilities of arduino, OneSheeld, bluetooth, and your own smartphone, with the Cheese camera, you can take a picture wirelessly with just a push of a button. The OneSheeld is an arduino shield that connects via bluetooth with your phone and takes advantage of all of the technology in the smartphone such as a gps, camera, microphone, etc.
The technical aspects are simple in theory; using bluetooth, the master module sends signals to the slave which then sends another bluetooth signal using OneSheeld to the connected smartphone. Originally, this project was meant to implement voice control where a mic would be on the remote instead of a button. However, interfacing Matlab (what we needed to use for voice recognition) with the arduino was a lot more difficult than anticipated as we could not implement code in Matlab that would directly send the BT signal.

Master Code:

include

SoftwareSerial BTSerial(2, 3); //TX RX const int button = 9; int bVal = 0; int mVal = 0;

void setup() { BTSerial.begin(9600); Serial.begin(9600); pinMode(button, INPUT); pinMode(5, OUTPUT); pinMode(10, INPUT); }

void loop() { bVal = digitalRead(button); mVal = digitalRead(10); Serial.println(bVal); if(bVal == HIGH) { digitalWrite(5, HIGH); BTSerial.print("H"); Serial.println("H"); } else if(bVal == LOW) { digitalWrite(5, LOW); BTSerial.print("L"); Serial.println("L"); } delay(100); }

Slave Code

define CUSTOM_SETTINGS

define INCLUDE_CAMERA_SHIELD

define INCLUDE_EMAIL_SHIELD

include

include

SoftwareSerial BTSerial(2, 3);

int buttonPin = 13; /*

  • green = BT connected
  • blue = picture taken
  • red = BT not connected */ const int redPin = 10; const int greenPin = 11; const int bluePin = 12; const int matLabPin = 6;

void setup() { BTSerial.begin(9600); Serial.begin(9600); Serial.println("hello");

//Start 1Sheeld communication OneSheeld.begin();

pinMode(buttonPin, INPUT); pinMode(redPin, OUTPUT); pinMode(greenPin, OUTPUT); pinMode(bluePin, OUTPUT); pinMode(matLabPin, INPUT); pinMode(9, OUTPUT); }

void loop() {

Serial.println("hi");

if (BTSerial.available()) { char in = (char) BTSerial.read(); if (in == 'H') { digitalWrite(redPin, LOW); digitalWrite(greenPin, LOW); digitalWrite(bluePin, HIGH); delay(200); digitalWrite(bluePin, LOW); digitalWrite(9, HIGH); Camera.frontCapture();

  Email.attachLastPicture("spinp4@gmail.com", "Cheese!", "", 1);
  Serial.println("BT worked!");
}
else if (in == 'L') {
  Serial.println("L");
  digitalWrite(9, LOW);
  digitalWrite(bluePin, LOW);
  digitalWrite(redPin, LOW);
  digitalWrite(greenPin, HIGH);
}

} else if (digitalRead(buttonPin) == HIGH) { digitalWrite(redPin, LOW); digitalWrite(greenPin, LOW); digitalWrite(bluePin, HIGH);

Camera.rearCapture();
delay(200);
Email.attachFile(LAST_CAMERA_PIC_CAMERA_FOLDER);
//Email.send("wujesse@seas.upenn.edu", "Cheese!", "pic");

} else { digitalWrite(bluePin, LOW); digitalWrite(greenPin, LOW); digitalWrite(redPin, HIGH); } }

Share this project:

Updates