Of the Cats, by the Cats, for the Cats

10,091

42

9

About: I am SoC engineer^^

One day my best friend noticed that she was not spending much time with her cats and she felts a bit sorry.

This is why I am starting this project.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Parts

Arm ... You just prepare only the part

- WIZwiki-W7500

- HC-SR04(Ultrasonic)

- SG-90(Servomotor)

- Jumper cable

Step 2: Schematic

Step 3: Source Code

mbed :mbed link

#include "mbed.h"<br>#include "stdlib.h"  //For rand function 
#include "Servo.h"
#include "HCSR04.h"
HCSR04 sensor(D11, D12); //(Trig Pin, Echo Pin) 
Servo myservo(D6);
int main()
{
  	int number = 0;
        while(1){ 
		long d = sensor.distance(1);
        	printf("d = %d\r\n",d);   
		myservo = 0.5;   
		if(d<=25)    //25cm
	        {
			number = rand()%11;  //0~10    
			double a = number*0.1;
			printf("%d = %3f\r\n",number,a);                      
			myservo = number*0.1;
		}    
	wait(0.2); 
    }
}

Step 4: Semblance

The size is greater than or equal to Card.

Step 5: Video

The cats were constantly coming and going.

You can make it easier.

If you have a question, please send me email(iriankim1225@gmail.com) or write the comment about this project

Homemade Gifts Contest 2015

Participated in the
Homemade Gifts Contest 2015

Animal Innovations Contest

Participated in the
Animal Innovations Contest

Tech Contest

Participated in the
Tech Contest

Share

    Recommendations

    • Indoor Lighting Contest

      Indoor Lighting Contest
    • Stone Concrete and Cement Contest

      Stone Concrete and Cement Contest
    • DIY Summer Camp Contest

      DIY Summer Camp Contest

    9 Discussions

    0
    None
    ElijahH3

    3 years ago

    Awesome project, I love this, I think i'll make this as my next project, if I do, I'll send you the picture. Thanks for sharing!

    0
    None
    BenicioMurray

    3 years ago

    I love this idea but the WIZwiki is difficult to get. Can you modify this instructional to use a Arduino?

    2 replies
    0
    None
    ElijahH3BenicioMurray

    Reply 3 years ago

    Yes, Arduino UNO can hook up the the Ultrasonic Range Finder and a servo, the code should be easy enough to write, you can look it up. Also, in case you didn't know this already, servos on the Arduino require a library, that can be found on this page: http://playground.arduino.cc/ComponentLib/Servo I hope this helps, even though it's a little late.

    0
    None
    irinak1BenicioMurray

    Reply 3 years ago

    I will test the arduino as soon as possible. wait for me^^

    0
    None
    irinak1joon874

    Reply 3 years ago

    sorry :), you can't see the cats. Just test video,^^

    0
    None
    ninja66

    3 years ago

    32-bit ARM to shake something and measure distance ?! huge overkill