» Topics » Advice »An eye through which the whole world can be seen

A peephole through which the whole world can be seen


An interesting idea was invented and implemented by a master with the nickname carolinebuttet1.
In the world there are about 770 million surveillance cameras. Some of them do not have a password or there is a default password. This makes them easily accessible to anyone with an internet connection.

This virtual peephole, which was invented by a master device for monitoring some of these unprotected cameras. The choice of camera is random, i.e. each time you close and reopen the eye, you can see the image from another, randomly selected, video camera.

To implement this idea, the master used the following equipment:
-Arduino Micro
Photoresistor
-Raspberry Pi 3 Model B
- Raspberry Pi screen
-Wooden box
-Peephole
-Drill
-Screwdriver



The virtual peephole consists of two distinctive parts: the Raspberry Pi (with a small screen) and Arduino Micro. The Raspberry Pi is connected to the Internet and to a website that broadcasts one random channel from the camera.

There is a light sensor inside the eye to determine if it is open or closed. Whenever the peephole is closed, the signal is sent to the Raspberry Pi (via Arduino Micro) and the website switches to another camera. The camera data that the wizard used for this project was taken from the site Insecam , which registers more than 73,000 unprotected cameras.
Website to display.

For her virtual peephole, the wizard created a website with the data she collected from insecam. You can do without creating a site and use this the link (it changes the webcam each time you press the spacebar)

Configure Raspberry Pi.
Make sure your Raspberry Pi is up and running (see This guideif you are new to Raspberry Pi). Connect the LCD screen to the Raspberry Pi. You need to configure your Raspberry Pi so that it starts up with a web page. How to do this, you can see here.

Arduino setup.
Note: in order to do this project, your Arduino board must support a keyboard library. As mentioned on library page:
Supported models - motherboards based on 32u4 and SAMD (family of Leonardo, Esplora, Zero, Due, and MKR)
Connect your light sensor to Arduino
Download the code on Arduino.

The code first starts the calibration for 5 seconds (during which the minimum and maximum values ​​for the photosensor will be recorded), and then sends a space bar signal whenever the light value is lower than the value (that is, the eye is closed).
CODE START
previousMillis = 0
// because light always varies, we will calibrate the photosesor at each boot.
long calibrationtime = 5000;
long startMillis = 0;
// the max value for an analog sensor is 1024
int sensorMin = 1024;
int sensorMax = 0;
int average = 0;
int threshold = 5;
bool lastState = true;
bool isClosed = true;

void setup () {
  Serial.begin (9600); // open the serial port
  Keyboard.begin (); // start the keyboard library
  startMillis = millis (); // start the counter
}

void loop () {
  // stabilize the reading in the first 5 seconds
  // then, detect a variation in the stabilization.
  unsigned long currentMillis = millis (); // set millis as the current time
  int sensorValue = analogRead (A0); // read the sensor
  if (currentMillis-startMillis & lt; calibrationtime) {
    // as long as we are in the calibration time
    // during this calibration time, open and close the peephole to calibrate it.
    int elapsedtime = currentMillis - startMillis;
    Serial.println (elapsedtime);
    Serial.println (sensorMin);
    Serial.println (sensorMax);
    if (sensorValue & lt; sensorMin) {// register the max and min value for the sensor
      sensorMin = sensorValue;
      average = (sensorMin + sensorMax) / 2;
    }
    if (sensorValue & gt; sensorMax) {
      sensorMax = sensorValue;
      average = (sensorMin + sensorMax) / 2;
    }
    delay (100); // delay
  }
  else {// if the calibration is done
    if (sensorValue & gt; average + threshold) {// detect if the peephole is open or closed
      isClosed = false;
      if (lastState! = isClosed) {
        }
    }
    else {
      isClosed = true;
      if (lastState! = isClosed) {
        Keyboard.print (""); // send a key signal if the peephole is open
        }
    }
    lastState = isClosed;
    delay (100);
   }
}

END OF CODE.
Next, you need to install the equipment in the box.

Drill a hole in the door peephole to install the photosensor (it will determine if your peephole is open or not closed, and then activates the webcam change). Drill a hole in the box. Before the door peephole, fasten the Raspberry screen (the master used Velcro).

Connect Arduino:
Connect the photo sensor to the Arduino
Route the USB cable between the Rpi and the Arduino. Arduino will act as a keyboard and send a space bar to the Raspberry Pi.




After everything is mounted, you can start the virtual peephole.
Place the device on the wall
Connect your Rapsberry Pi to power
Now you will have 5 seconds to calibrate the photosensor located in the doorway, you need to open and close it several times.
Now the virtual peephole should work!




In my opinion a great idea and implementation. Of course, you can install the device in another case, it can be finalized the code and make a list of cameras with a preferred connection, but everyone can do this on their own.

Suitable for topic

Related topics

Add a comment

    • smilesmilesxaxaokdontknowyahoonea
      bossscratchfoolyesyes-yesaggressivesecret
      sorrydancedance2dance3pardonhelpdrinks
      stopfriendsgoodgoodgoodwhistleswoontongue
      smokeclappingcraydeclarederisivedon-t_mentiondownload
      heatirefullaugh1mdameetingmoskingnegative
      not_ipopcornpunishreadscarescaressearch
      tauntthank_youthisto_clueumnikacuteagree
      badbeeeblack_eyeblum3blushboastboredom
      censoredpleasantrysecret2threatenvictoryyusun_bespectacled
      shokrespektlolprevedwelcomekrutoyya_za
      ya_dobryihelperne_huliganne_othodifludbanclose
11 comments
Author
Korolev,
Adequate response to specific criticism

This is not criticism, but a value judgment. How do politicians like to say "double standards."
in order to conclude that the article is useless,

Perhaps the master, for his specific tasks, needed exactly what he brought to life?
pogranec,
the critic was peddling
Adequate response to specific criticism! fool
Author
Korolev,
For the gifted: in order to conclude that the article is useless, you need to familiarize yourself with its contents! Or is it different for you?
-
One question: "For what?"

Perhaps the master, for his specific tasks, needed exactly what he brought to life?

critic criticized fool
Korolev,
Well, if you don’t need it, why did you read it?
For the gifted: in order to conclude that the article is useless, you need to familiarize yourself with its contents! Or is it different for you? xaxa
Author
Korolev,
And why is the article? It seems so clear that nobody needs this crap!
Well, if you don’t need it, why did you read it?
pogranec,
Why do you need this in the article? It seems so clear.
And why is the article? It seems so clear that nobody needs this crap! xaxa
Author
Korolev,
Where is this in the article?
Why do you need this in the article? It seems so clear.
Some tyruben. ((
Or youtube - as you like. ;)
pogranec,
put a good matrix
I have a gorgeous matrix - this is a monitor in front of which I sit in a comfortable chair and do not squint one eye!
to nutritious-))) From YUSB Raspberry 5V 2.5A works
Where is this in the article?
Author
Korolev,
To stand in front of a box and stare with one eye through a muddy eye into a shitty matrix?
- put a good matrix. The idea is great and you can beat it in different ways. You connect to highly specialized sites, opened - one action, closed / opened - completely different dance3 Just kidding, of course))))
Plug the Rapsberry Pi into power. Which one?
- to nutritional-))) From YUSB Raspberry 5V 2.5A works. Any adapter with these characteristics
In my opinion a great idea
But in my opinion - stupid! To stand in front of a box and stare with one eye through a muddy eye into a shitty matrix? nea
Plug Rapsberry Pi to nutrition
To which?

latest comments

All comments

We advise you to read:

Hand it for the smartphone ...