View unanswered posts | View active topics It is currently Thu Apr 24, 2014 12:43 am






Reply to topic  [ 2 posts ] 
My First Robot Project: A Puppy! 
Author Message
Rookie

Joined: Mon Nov 09, 2009 5:29 pm
Posts: 1
Post My First Robot Project: A Puppy!
I have programed my robot so that when it senses something close to it, it will stop, move back a little bit. Then it will come back and stop for a little bit, so that it looks like it is sniffing something, and then bark. Then it will continue to search until it senses another thing and repeat the program over again.

Here is a link to a video of my robot:

http://www.flickr.com/photos/29464331@N02/4152968403/in/set-72157608737193431/

This is the program I used for my robot:

Code:
#pragma config(Sensor, S1,     sonarSensor,         sensorSONAR)
//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//
task bark();

task main()
{
   while(true)

  {

      while(SensorValue(sonarSensor) > 49)

    {
      motor[motorC] = 100;
      motor[motorB] = 100;

    }
      motor[motorC] = 0;
      motor[motorB] = 0;
      wait1Msec(600);
      motor[motorC] = -100;
      motor[motorB] = -100;
      wait1Msec(600);
      motor[motorC] = 100;
      motor[motorB] = 100;
      wait1Msec(600);
      StartTask(bark);
      motor[motorC] = 0;
      motor[motorB] = 0;
      wait1Msec(1000);
      motor[motorC] = 100;
      motor[motorB] = -100;
      wait1Msec(500);
   }
  }
task bark()
{
   nVolume = 4;
  PlaySoundFile("dogbark.rso");
}


I had trouble with the sound of the bark, and even when I turned it up to the loudest it could be, it was still hard to hear. However, in the end, I figured that it was hard to hear because of the motors. If anyone has suggestions, please respond!

Thanks!


Attachments:
File comment: This is my robot puppy!
4127667773_01b0ce344a.jpg
4127667773_01b0ce344a.jpg [ 114.46 KiB | Viewed 1656 times ]
Wed Dec 02, 2009 3:00 pm
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3116
Location: Rotterdam, The Netherlands
Post Re: My First Robot Project: A Puppy!
I like your robot, it's cute :) It thought my dogs were barky, but yours barks even more than they do!

Regarding the volume, there is probably not a whole lot you can do about that. Perhaps make the recording a little louder before converting it to an rso file?

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Wed Dec 02, 2009 5:05 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.