Chuck Pressman
Published © Apache-2.0

Chicken Shot!

Chicken Shot! plays two different bird calls from the THETA internal speaker. Use in a chicken pen or maybe outdoors in order to catch chick

BeginnerFull instructions provided1 hour536
Chicken Shot!

Things used in this project

Hardware components

RICOH THETA V
RICOH THETA V
×1

Software apps and online services

Android Studio
Android Studio

Story

Read more

Code

index.html modifications

HTML
The images are in svg. I used InkScape to convert PNG or JPG files to svg.
<html>
<head>
    <title>Chicken Shot!</title>
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
</head>
<body>
<style>
.container {
    display: flex;
    flex-flow: column;
    justify-content: center;
    height: 100%;
    text-align: center;
}
svg {
    box-sizing: border-box;
    width: 80%;
    padding: 2em 5em;
    margin: 1em auto;
    border: 2px gray solid;
    border-radius: 3em;
}
</style>
<script>
    function post(path) {
        const req = new XMLHttpRequest();
        req.open('POST', path);
        req.send();
    }
</script>
<div class="container">
    <svg onclick="post('/meow')" version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"
         style="background-color: #ffe0ff"
         xml:space="preserve">
        <style type="text/css">
            .st0{fill:#4B4B4B;}
        </style>
        <g>
           <path d="m469.609375 249.960938c-13.269531-36.859376-44.386719-72.898438-80.421875-70.210938-12.414062-48.707031-41.472656-94.503906-85.757812-119.347656l9.695312-41.328125c3.265625-13.921875-12.566406-24.46875-24.15625-16.101563-23.316406 16.835938-102.464844 50.269532-104.550781 51.402344-52.871094 28.722656-86.386719 70.835938-99.824219 125.34375-35.769531-2.285156-66.617188 33.296875-79.917969 70.242188-17.328125 48.144531 18.980469 102.851562 20.535157 105.160156 3.789062 5.617187 10.769531 8.105468 17.226562 6.199218 1.023438-.300781 10.902344-3.289062 23.671875-9.570312 13.09375 47.726562 41.875 81.160156 81.96875 99.742188l-2.226563 29.519531h-29.769531c-8.554687 0-15.492187 6.9375-15.492187 15.496093 0 8.554688 6.9375 15.492188 15.492187 15.492188h44.140625c8.109375 0 14.84375-6.246094 15.453125-14.328125l2.675781-35.503906c33.816407 8.632812 75.050782 8.847656 107.652344 2.265625l2.503906 33.234375c.605469 8.085937 7.34375 14.332031 15.449219 14.332031h36.3125c8.554688 0 15.492188-6.9375 15.492188-15.492188 0-8.558593-6.9375-15.496093-15.492188-15.496093h-21.9375l-1.910156-25.371094c45.238281-17.515625 77.640625-52.464844 91.753906-103.890625 12.765625 6.28125 22.648438 9.269531 23.671875 9.570312 6.476563 1.910157 13.449219-.597656 17.226563-6.199218 1.554687-2.308594 37.863281-57.015625 20.535156-105.160156zm-270.585937-168.25c4.855468-2.296876 39.574218-16.40625 75.839843-35.234376l-4.390625 18.722657c-1.695312 7.230469 1.980469 14.648437 8.757813 17.679687 39.222656 17.542969 69.78125 59.160156 81.222656 109.871094-8.308594 8-14.253906 19.246094-17.328125 32.863281l-50.253906 29.828125-46.871094-32.667968c-5.304688-3.703126-12.382812-3.722657-17.71875 0l-46.871094 32.667968-50.253906-29.828125c-3.117188-13.839843-9.195312-25.210937-17.699219-33.230469 10.472657-48.808593 38.539063-85.074218 85.566407-110.671874zm-154.0625 245.652343c-7.773438-15.082031-19.480469-43.699219-11.128907-66.90625 12.207031-33.914062 37.535157-54.496093 52.816407-49 16.539062 5.957031 19.597656 38.253907 11.417968 65.519531-7.570312 25.085938-28.730468 40.050782-53.105468 50.386719zm192.179687 110.671875c-79.164063 0-128.53125-35.703125-143.34375-103.414062 20.789063-16.277344 34.605469-36.578125 38.863281-72.078125l41.515625 24.640625c5.226563 3.101562 11.78125 2.863281 16.765625-.613282l46.199219-32.199218 46.199219 32.199218c4.925781 3.433594 11.515625 3.730469 16.769531.613282l41.515625-24.640625c4.09375 34.15625 16.695312 54.722656 38.863281 72.078125-14.824219 67.710937-64.191406 103.414062-143.347656 103.414062zm192.238281-110.695312c-18.949218-8.089844-40.472656-21.523438-49.421875-40.183594-11.253906-23.472656-12.695312-68.363281 7.675781-75.699219 15.023438-5.40625 40.449219 14.632813 52.816407 49 8.414062 23.375-3.269531 51.851563-11.070313 66.882813zm0 0"/><path d="m160.164062 163.910156h7.644532c8.554687 0 15.492187-6.9375 15.492187-15.496094 0-8.558593-6.9375-15.496093-15.492187-15.496093h-7.644532c-8.558593 0-15.496093 6.9375-15.496093 15.496093 0 8.558594 6.9375 15.496094 15.496093 15.496094zm0 0"/><path d="m306.476562 163.910156h7.640626c8.558593 0 15.496093-6.9375 15.496093-15.496094 0-8.558593-6.9375-15.496093-15.496093-15.496093h-7.640626c-8.558593 0-15.496093 6.9375-15.496093 15.496093 0 8.558594 6.9375 15.496094 15.496093 15.496094zm0 0"/><path d="m299.222656 349.773438c-8.554687 0-15.492187 6.9375-15.492187 15.496093v10.613281c0 8.558594 6.9375 15.496094 15.492187 15.496094 8.558594 0 15.496094-6.9375 15.496094-15.496094v-10.613281c0-8.558593-6.9375-15.496093-15.496094-15.496093zm0 0"/><path d="m144.414062 300.671875c-8.558593 0-15.496093 6.9375-15.496093 15.496094v11c0 8.558593 6.9375 15.496093 15.496093 15.496093 8.558594 0 15.496094-6.9375 15.496094-15.496093v-11c0-8.558594-6.9375-15.496094-15.496094-15.496094zm0 0"/><path d="m339.300781 323.515625c-8.558593 0-15.496093 6.9375-15.496093 15.496094v11c0 8.558593 6.9375 15.496093 15.496093 15.496093 8.554688 0 15.492188-6.9375 15.492188-15.496093v-11c0-8.558594-6.933594-15.496094-15.492188-15.496094zm0 0"/><path d="m193.335938 180.429688 34.320312 26.574218c5.585938 4.324219 13.386719 4.324219 18.972656 0l34.316406-26.574218c3.789063-2.9375 6.007813-7.460938 6.007813-12.253907s-2.214844-9.316406-6.007813-12.25l-34.316406-26.578125c-5.585937-4.324218-13.386718-4.324218-18.972656 0l-34.320312 26.578125c-3.789063 2.933594-6.007813 7.457031-6.007813 12.25s2.21875 9.316407 6.007813 12.253907zm43.804687-19.230469 9.011719 6.976562-9.011719 6.980469-9.007813-6.980469zm0 0"/>

        </g>
    </svg>
    <svg onclick="post('/chicken')" version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"
         style="background-color: #81F79F"
         xml:space="preserve">
        <style type="text/css">
            .st0{fill:#4B4B4B;}
        </style>
        <g>
<path style="fill:#303C42;" d="M357.695,101.194C340.38,51.393,278.788,0,245.333,0c-12.854,0-32,8.521-32,32
	c0,3.654,0.586,7.307,1.469,10.948C164.684,43.855,128,48.383,128,74.667c0,14.594,13.542,25.656,43.146,34.583
	c-50.836,25.789-85.594,69.917-106.033,119.257l-1.322-6.6c-0.771-3.854-3.604-6.979-7.375-8.115
	c-3.667-1.146-7.854-0.115-10.625,2.667l-10.667,10.667c-3.25,3.25-4.063,8.208-2,12.313l8.784,17.569l-27.284-10.913
	c-3.271-1.302-7-0.906-9.938,1.073C1.75,249.156,0,252.458,0,256v21.333C0,283.229,4.771,288,10.667,288h21.346l-17.076,12.802
	c-2.479,1.854-4.021,4.688-4.25,7.771c-0.208,3.083,0.917,6.115,3.104,8.302l10.667,10.667c2,2.01,4.729,3.125,7.542,3.125
	c0.25,0,0.5-0.01,0.75-0.031c3.083-0.219,5.916-1.76,7.792-4.229l2.785-3.711c-0.404,6.26-0.66,12.488-0.66,18.638
	C42.667,445.01,138.958,512,288,512c140.271,0,224-75.76,224-202.667C512,223.277,447.365,136.603,357.695,101.194z"/>
<path style="fill:#FFFFFF;" d="M437.333,298.667c0,5.104-0.938,10.094-2.833,14.906c-13.508-2.829-26.863-3.919-39.944-3.69
	c0.01-0.193,0.111-0.354,0.111-0.549c0-5.892-4.776-10.667-10.667-10.667s-10.667,4.775-10.667,10.667
	c0,0.025,0.014,0.047,0.014,0.072c-1.648-0.01-3.284,0.292-4.785,1.053c-2.452,1.225-9.966,5.078-19.63,10.701
	c-18.766-1.832-38.262-1.053-58.099,3.081c-1.875-4.813-2.833-9.802-2.833-14.906c0-14.836,7.911-28.017,20.474-35.788
	l60.901,24.361c1.271,0.51,2.604,0.76,3.958,0.76c1.146,0,2.271-0.177,3.375-0.552l55.388-18.465
	C435.203,285.635,437.333,291.973,437.333,298.667z"/>
<path style="fill:#FDD835;" d="M304.021,383c10.292-13.688,34.896-33.24,69.458-51.115c12.875,6.5,50.771,28.01,67.563,63.49
	c-2.938-1.021-11.146-3.542-12.167-3.667C387.333,380.917,331.646,381.708,304.021,383z"/>
<path style="opacity:0.2;fill:#FFFFFF;enable-background:new    ;" d="M373.479,342.69c11.185,5.647,41.22,22.652,59.931,50.271
	c2.763,0.828,5.986,1.842,7.632,2.414c-16.792-35.479-54.688-56.99-67.563-63.49c-34.563,17.875-59.167,37.427-69.458,51.115
	c3.063-0.143,6.586-0.273,10.281-0.389C327.18,370.488,347.518,356.117,373.479,342.69z"/>
<path style="fill:#FDD835;" d="M409,409.104c-11.875,12.104-31.729,26.958-46.688,37.021c-24.479-14.51-46.583-30.885-57.146-41.854
	C332.833,402.979,375.125,403.042,409,409.104z"/>
<path style="opacity:0.1;enable-background:new    ;" d="M399.143,418.259c3.618-3.138,6.988-6.23,9.857-9.155
	c-33.875-6.063-76.167-6.125-103.833-4.833c2.923,3.036,6.882,6.539,11.379,10.249C340.668,413.848,371.753,414.397,399.143,418.259
	z"/>
<g>
	<path style="fill:#E53935;" d="M288,490.667c-103.333,0-224-39.115-224-149.333c0-88.813,44.854-192.708,145.042-224.604
		c5.021-1.594,9.042-6.51,8.229-11.708c-0.792-5.198-4.354-8.927-9.604-8.927c-54.167-10.521-58.313-21.406-58.333-21.427
		c0-2.944,7.652-9.704,75.184-10.529c13.164,20.13,36.018,38.477,58.087,51.268c5.063,2.917,11.604,1.229,14.583-3.885
		c2.958-5.094,1.208-11.615-3.875-14.573c-34.542-20-58.646-46.708-58.646-64.948c0-8.594,5.875-10.542,10.667-10.667
		c23.667,0,81,46.698,93.625,90.844c0.961,3.379,3.641,5.411,6.695,6.56l-0.174,0.471c49.206,18.224,91.085,54.556,117.066,97.311
		l-89.171,48.637l-90.854-50.479c-2.563-1.406-5.583-1.719-8.333-0.865c-2.792,0.854-5.083,2.813-6.396,5.417l-10.667,21.333
		c-1.333,2.667-1.479,5.771-0.438,8.563c1.063,2.792,3.25,5,6.021,6.115l22.776,9.111c-11.842,11.757-18.818,27.697-18.818,44.983
		c0,11.302,3.188,22.594,9.208,32.656c1.958,3.281,5.458,5.198,9.146,5.198c0.854,0,1.75-0.104,2.604-0.323
		c9.887-2.491,19.688-3.98,29.352-4.74c-20.693,15.469-39.643,34.509-39.643,52.542c0,24.844,55.979,59.51,80.042,73.26
		c1.646,0.938,3.458,1.406,5.292,1.406c2.021,0,4.021-0.573,5.771-1.698c5.208-3.354,46.75-30.49,63.813-52.844
		c7.979,2.646,14.833,5.854,20.021,9.74c0.599,0.451,1.361,0.421,2.023,0.728C420.406,467.605,363.813,490.667,288,490.667z"/>
	<path style="fill:#E53935;" d="M467.326,406.18c-8.482-33.905-32.499-58.611-53.674-74.434c7.949,0.928,15.99,2.421,24.057,4.452
		c0.854,0.219,1.729,0.323,2.604,0.323c3.687,0,7.188-1.917,9.146-5.198c6.021-10.063,9.208-21.354,9.208-32.656
		c0-9.035-2.111-17.771-5.822-25.934l30.53-10.177c4.678,15.462,7.292,31.193,7.292,46.777
		C490.667,347.147,482.564,379.548,467.326,406.18z"/>
</g>
<g>
	<path style="opacity:0.2;fill:#FFFFFF;enable-background:new    ;" d="M277.324,274.319c2.38-3.564,5.087-6.918,8.16-9.969
		l-8.152-3.262l7.49,3.262C281.999,267.401,279.51,270.755,277.324,274.319z"/>
	<path style="opacity:0.2;fill:#FFFFFF;enable-background:new    ;" d="M278.355,213.404c-0.342-0.039-0.678,0.1-1.022,0.1
		C277.677,213.504,278.013,213.371,278.355,213.404z"/>
	<path style="opacity:0.2;fill:#FFFFFF;enable-background:new    ;" d="M282.176,115.406c1.355,0.85,2.819,1.199,4.29,1.297
		c-1.324-0.184-2.639-0.592-3.862-1.297c-1.759-1.02-3.508-2.284-5.271-3.372C278.953,113.122,280.56,114.387,282.176,115.406z"/>
	<path style="opacity:0.2;fill:#FFFFFF;enable-background:new    ;" d="M284.396,347.188c0.135,0,0.276-0.049,0.413-0.056
		c-2.921-0.061-5.504-1.533-7.477-3.72C279.19,345.655,281.637,347.188,284.396,347.188z"/>
	<path style="opacity:0.2;fill:#FFFFFF;enable-background:new    ;" d="M316.977,342.125c-1.238,0.098-2.497,0.319-3.741,0.441
		c-18.806,15.391-35.902,34.234-35.902,52.1C277.333,376.634,296.284,357.594,316.977,342.125z"/>
</g>
<circle style="fill:#303C42;" cx="330.667" cy="309.333" r="10.667"/>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="-30.6741" y1="628.1334" x2="-27.221" y2="624.6793" gradientTransform="matrix(21.3333 0 0 -21.3333 996.3334 13791.667)">
	<stop  offset="0" style="stop-color:#000000;stop-opacity:0.1"/>
	<stop  offset="1" style="stop-color:#000000;stop-opacity:0"/>
</linearGradient>
<path style="fill:url(#SVGID_1_);" d="M432.25,414.792c-17.063,22.354-58.604,49.49-63.813,52.844
	c-1.75,1.125-3.75,1.698-5.771,1.698c-1.833,0-3.646-0.469-5.292-1.406c-13.406-7.66-36.706-21.818-54.725-37.148l52.531,52.53
	c42.634-9.826,76.186-29.4,99.113-58.049c-0.663-0.307-1.424-0.277-2.023-0.728C447.083,420.646,440.229,417.438,432.25,414.792z"/>
<path style="opacity:0.1;enable-background:new    ;" d="M65.789,363.035C80.656,456.681,191.785,490.667,288,490.667
	c75.813,0,132.406-23.061,166.294-65.408c-0.663-0.307-1.424-0.277-2.023-0.728c-5.188-3.885-12.042-7.094-20.021-9.74
	c-17.063,22.354-58.604,49.49-63.813,52.844c-1.75,1.125-3.75,1.698-5.771,1.698c-1.833,0-3.646-0.469-5.292-1.406
	c-15.294-8.74-43.443-25.931-61.954-43.677c-12.536,1.503-25.595,2.417-39.421,2.417C169.967,426.667,103.275,403.19,65.789,363.035
	z"/>
<path style="opacity:0.1;enable-background:new    ;" d="M458.667,298.667c0,11.302-3.188,22.594-9.208,32.656
	c-1.958,3.281-5.459,5.198-9.146,5.198c-0.576,0-1.143-0.118-1.714-0.212c-2.01,3.898-4.262,7.598-6.565,11.259
	c15.217,14.948,29.232,34.389,35.292,58.612c15.238-26.632,23.341-59.033,23.341-96.846c0-15.585-2.613-31.315-7.292-46.777
	l-26.206,8.736c-0.368,3.469-0.807,6.889-1.326,10.253C457.495,287.102,458.667,292.781,458.667,298.667z"/>
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="-44.8289" y1="638.6147" x2="-23.1622" y2="628.5118" gradientTransform="matrix(21.3333 0 0 -21.3333 996.3334 13791.667)">
	<stop  offset="0" style="stop-color:#FFFFFF;stop-opacity:0.2"/>
	<stop  offset="1" style="stop-color:#FFFFFF;stop-opacity:0"/>
</linearGradient>
<path style="fill:url(#SVGID_2_);" d="M357.695,101.194C340.38,51.393,278.788,0,245.333,0c-12.854,0-32,8.521-32,32
	c0,3.654,0.586,7.307,1.469,10.948C164.684,43.855,128,48.383,128,74.667c0,14.594,13.542,25.656,43.146,34.583
	c-50.836,25.789-85.594,69.917-106.033,119.257l-1.322-6.6c-0.771-3.854-3.604-6.979-7.375-8.115
	c-3.667-1.146-7.854-0.115-10.625,2.667l-10.667,10.667c-3.25,3.25-4.063,8.208-2,12.313l8.784,17.569l-27.284-10.913
	c-3.271-1.302-7-0.906-9.938,1.073C1.75,249.156,0,252.458,0,256v21.333C0,283.229,4.771,288,10.667,288h21.346l-17.076,12.802
	c-2.479,1.854-4.021,4.688-4.25,7.771c-0.208,3.083,0.917,6.115,3.104,8.302l10.667,10.667c2,2.01,4.729,3.125,7.542,3.125
	c0.25,0,0.5-0.01,0.75-0.031c3.083-0.219,5.916-1.76,7.792-4.229l2.785-3.711c-0.404,6.26-0.66,12.488-0.66,18.638
	C42.667,445.01,138.958,512,288,512c140.271,0,224-75.76,224-202.667C512,223.277,447.365,136.603,357.695,101.194z"/>
<g>
</g>
        </g>
    </svg>
    <svg onclick="post('/take_picture')" version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" style="background-color: #e0efff" xml:space="preserve">
        <style type="text/css">
            .st0{fill:#4B4B4B;}
        </style>
        <g>
            <path class="st0" d="M235.194,131.024c4.298-0.115,8.845-0.192,13.72-0.192c54.374-0.01,144.447,8.509,252.193,51.19
                c-12.337-40.941-34.595-77.545-64.084-107.034c-23.46-23.451-51.402-42.335-82.448-55.296
                C303.931,57.372,264.923,95.968,235.194,131.024z"/>
            <path class="st0" d="M175.627,150.831c30.423-42.374,75.219-93.65,138.832-144.052C295.671,2.403,276.134,0,255.991,0
                C197.512,0.01,143.745,19.605,100.66,52.574c7.298,62.672,21.23,115.736,36.72,158.966
                C146.254,195.146,158.696,174.398,175.627,150.831z"/>
            <path class="st0" d="M124.726,273.029c-21.47-47.528-43.469-111.949-55.315-192.195C26.374,126.668,0.009,188.156,0,256
                c0,11.115,0.788,22.047,2.154,32.788c57.911,24.998,110.871,39.527,156.062,47.738
                C148.436,320.632,136.687,299.489,124.726,273.029z"/>
            <path class="st0" d="M276.807,380.967c-4.298,0.115-8.856,0.192-13.73,0.192c-54.374,0.019-144.456-8.51-252.183-51.181
                c12.336,40.922,34.595,77.536,64.084,107.034c23.461,23.442,51.402,42.326,82.449,55.296
                C208.069,454.628,247.078,416.013,276.807,380.967z"/>
            <path class="st0" d="M336.372,361.169c-30.421,42.374-75.218,93.65-138.832,144.053c18.788,4.384,38.326,6.778,58.451,6.778
                c58.498-0.009,112.245-19.605,155.35-52.574c-7.317-62.671-21.239-115.717-36.72-158.966
                C365.746,316.854,353.304,337.604,336.372,361.169z"/>
            <path class="st0" d="M509.847,223.213c-57.912-24.99-110.872-39.537-156.062-47.748c9.769,15.893,21.528,37.047,33.488,63.507
                c21.471,47.527,43.47,111.948,55.316,192.205C485.626,385.332,511.99,323.844,512,256C512,244.886,511.211,233.943,509.847,223.213
                z"/>
        </g>
    </svg>    
</div>
</body>
</html>

Meow Shot! by Hideki Shiro

Modify this code for your favorite animal

Credits

Chuck Pressman

Chuck Pressman

1 project • 1 follower

Comments