Friday, February 11

Surveillance 202: Update 1

Well, you know the old 80/20 rule?  Once you get eighty percent of a project you don't want to complete the last twenty percent.  I found that to be the case in my line follower, and have put it on the back burner... for now.  Anyway, I was inspired to build a fully automated video/still camera bot.  It works great and as soon as I get some pictures, I'll put them on this post.  But in the meantime, I would like to share what it does.  First there is a process of positioning in which you manually assign all the coordinates that the robot will use in the rest of the program.  You do this by moving the motors to the desired location, and, with a press of a button, the X and Y motor values are stored in an array.  When you are done storing positions, you press another button, and the robot takes off on its own.  The great thing about this method is: that the program is fully customizable to different rooms or locations, that you have an unlimited amount of picture locations ( basically unlimited, ) and the robot is very easy to build.
There are definitely some things that I want to change, most importantly, I want to be able to change a certain coordinate without having to go back and re-enter all of them.  There are also innumerable extras that would be fun to add, such as a sound sensor to determine the loudest part of the room, and take most of the pictures there, or maybe a portrait taking program that would use an ultrasonic sensor to locate a person and take their picture.  Well I'll leave it at that until I have more time.  See Ya Back!!!


I have added a function to my code. It enables you to change existing parameters and even add new ones!
I am working on pictures right now so stay tuned!


void set_a_val()
{
   PlayTone(1000, 100); Wait(100);
   int c;
   for(c = 0; ButtonPressed(3, true) == false; ){
      ClearScreen();
      NumOut(32, 50, c, false);
      if(ButtonPressed(1, true) == true){
         c++; until(ButtonPressed(1, true) == false); }
      if(ButtonPressed(2, true) == true){
         c--; until(ButtonPressed(2, true) == false); }
   }
   if(c > L) c = L;
   else if(c < 0) c = 0;
   if(c > S) S = c + 1;
 
   until(ButtonPressed(1, true) == true);
   PlaceX[c] = MotorTachoCount(OUT_A); PlaceY[c] = MotorTachoCount(OUT_C);
   PlayTone(500, 100); Wait(200);
   PlayTone(1500, 100); Wait(100);
}


P.S. I recognize that by posting my code to the public, I have given you the permission to use and modify to any extent the said code.  But, this code may not be sold without permission from me, and I would appreciate it if you would give me credit if you do use this code.  Thank you!.

No comments:

Post a Comment