Things used in this project

Hardware components:
A000066 iso both
Arduino UNO & Genuino UNO
×1
Omron b3f 1000 image 75px
Tactile Button Switch (6mm) Single
×1
11026 02
Jumper wires (generic)
×1
09590 01
LED (generic)
×1
Mfr 25frf52 10k sml
Resistor 10k ohm
×1
Mfr 25fbf52 221r sml
Resistor 221 ohm
×1
Software apps and online services:
Ide web
Arduino IDE
Enthought Canopy Python IDE
Hand tools and fabrication machines:
3drag
3D Printer (generic)
09507 01
Soldering iron (generic)

Custom parts and enclosures

Button Housing
Button Top

Schematics

Schematic
Just connect. The 220 ohm resistor can go between the LED and GND.
Schematic twitter to wear jqdaa2t76k

Code

Python CodePython
from twython import Twython
import os
import random
import serial

pathToImages = "images/"
app_key = "secret"
app_secret = "secret"
oauth_token = "secret"
oauth_token_secret = "secret"
twitter = Twython(app_key,app_secret,oauth_token,oauth_token_secret)
ser = serial.Serial("COM8",baudrate=9600)

def getImage():
        #Takes the folder where your images are as the input
    images = os.listdir(pathToImages)
    image_open = open(pathToImages + str(images[random.randint(1,(len(images)) -1)]), 'rb')
    print "I chose: " + str(image_open)
    image_ids = twitter.upload_media(media=image_open)
    twitter.update_status(status='You should wear this today: ',media_ids=image_ids['media_id'])

while 1:
    if ser.read() == "h":
        getImage()
Arduino CodeC/C++
const int buttonPin = 5;     // the number of the pushbutton pin
const int ledPin =  13;      // the number of the LED pin

// variables will change:
int buttonState = 0;         // variable for reading the pushbutton status

void setup() {
  Serial.begin(9600);
  // initialize the LED pin as an output:
  pinMode(ledPin, OUTPUT);
  // initialize the pushbutton pin as an input:
  pinMode(buttonPin, INPUT);
}

void loop() {
  // read the state of the pushbutton value:
  buttonState = digitalRead(buttonPin);

  // check if the pushbutton is pressed.
  // if it is, the buttonState is HIGH:
  if (buttonState == HIGH) {
    //tell Python it went high
    Serial.print("h");
    // turn LED on:
    digitalWrite(ledPin, HIGH);
    delay(500);
    digitalWrite(ledPin,LOW);
    //5 min delay
    delay(60*1000*5);
  } else {
    // turn LED off:
    digitalWrite(ledPin, LOW);
    //debounce
    delay(50);
  }
}

Credits

Download
Arduino “having11” Guy

I love creating cloud solutions that can interact with hardware along with using Arduino boards and Raspberry Pis to create new projects.

Replications

Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback

Comments

Similar projects you might like

3D-Printed Prank Vibrating Cup
Easy
  • 1,289
  • 14

Full instructions

The instant your prankee lifts up this 3D-printed cup it starts violently vibrating! The electronics separate from the cup for easy washing.

The Magic Display With Arduino - The Mind Reader
Easy
  • 1,512
  • 6

Full instructions

The Magic Display With Arduino can figure out with a few clues what is your choose on a card with 64 options of numbers, letters or symbols.

Very First Hands On Arduino - Voice Activated LED
Easy
  • 770
  • 9

Full instructions

Use voice command to turn LED on or off.

Get Connected! WiFi Registration Using AP Mode!
Easy
  • 1,447
  • 16

Full instructions

Stop reflashing your devices everytime the WiFi password changes! Learn how to use anduinoWiFi and AP mode to initiate WiFi registration!

Car Blinker
Easy
  • 238
  • 4

Protip

Blink for Vehicles, such as bikes and skates. Easy.

The Soldering Iron Controller for Hakko T12 Tips
Easy
  • 8,671
  • 26

Full instructions

Per-tip calibration and high-frequency temperature check by Timer1.

ProjectsCommunitiesContestsLiveAppsBetaFree StoreBlogAdd projectSign up / Login
Respect project
Feedback