{"id":202,"date":"2022-07-25T19:42:51","date_gmt":"2022-07-25T19:42:51","guid":{"rendered":"http:\/\/bechele.de\/?page_id=202"},"modified":"2026-02-23T17:42:33","modified_gmt":"2026-02-23T17:42:33","slug":"the-joy-stick","status":"publish","type":"page","link":"https:\/\/bechele.de\/?page_id=202","title":{"rendered":"The Joy Stick"},"content":{"rendered":"\n<p class=\"has-large-font-size wp-block-paragraph\"><sub>The self made joy stick as an input device and its wiring<\/sub><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The joy Stich to record the servo movement syncronous to the sound is realized using an arduino.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The wiring diagram can be downloaded using the link below:<\/p>\n\n\n\n<div class=\"wp-block-group is-nowrap is-layout-flex wp-container-core-group-is-layout-8f761849 wp-block-group-is-layout-flex\">\n<div data-wp-interactive=\"core\/file\" class=\"wp-block-file\"><object data-wp-bind--hidden=\"!state.hasPdfPreview\" hidden class=\"wp-block-file__embed\" data=\"https:\/\/bechele.de\/wp-content\/uploads\/2022\/07\/teach-device.pdf\" type=\"application\/pdf\" style=\"width:100%;height:500px\" aria-label=\"Embed of teach device.\"><\/object><a id=\"wp-block-file--media-044285bf-0438-4208-84eb-8f32a4da6f9a\" href=\"https:\/\/bechele.de\/wp-content\/uploads\/2022\/07\/teach-device.pdf\">teach device<\/a><a href=\"https:\/\/bechele.de\/wp-content\/uploads\/2022\/07\/teach-device.pdf\" class=\"wp-block-file__button wp-element-button\" download aria-describedby=\"wp-block-file--media-044285bf-0438-4208-84eb-8f32a4da6f9a\">Download the wiring diagram<\/a><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-group is-nowrap is-layout-flex wp-container-core-group-is-layout-8f761849 wp-block-group-is-layout-flex\">\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"247\" height=\"400\" src=\"https:\/\/bechele.de\/wp-content\/uploads\/2022\/07\/54-1.jpg\" alt=\"\" class=\"wp-image-268\" srcset=\"https:\/\/bechele.de\/wp-content\/uploads\/2022\/07\/54-1.jpg 247w, https:\/\/bechele.de\/wp-content\/uploads\/2022\/07\/54-1-185x300.jpg 185w\" sizes=\"auto, (max-width: 247px) 100vw, 247px\" \/><figcaption class=\"wp-element-caption\">The self made joystick<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"400\" height=\"264\" src=\"https:\/\/bechele.de\/wp-content\/uploads\/2022\/07\/54-2.jpg\" alt=\"\" class=\"wp-image-269\" srcset=\"https:\/\/bechele.de\/wp-content\/uploads\/2022\/07\/54-2.jpg 400w, https:\/\/bechele.de\/wp-content\/uploads\/2022\/07\/54-2-300x198.jpg 300w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><figcaption class=\"wp-element-caption\">Bottom side<\/figcaption><\/figure>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Here the software of the joy stick for downloading:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Alternatively to the serial joystick, you may use also the following alternative if you prefer to use a USB HID device joystick:  <a href=\"https:\/\/bechele.de\/?p=1521\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-purple-color\">USB HID Joystick<\/mark><\/strong><\/a><\/p>\n\n\n\n<div class=\"wp-block-group is-nowrap is-layout-flex wp-container-core-group-is-layout-8f761849 wp-block-group-is-layout-flex\">\n<div class=\"wp-block-file\"><a id=\"wp-block-file--media-9b1d71dd-ce9e-4798-8f23-e30e48477e58\" href=\"https:\/\/bechele.de\/wp-content\/uploads\/2022\/07\/JoystickAveragedOffset.zip\">JoystickAveragedOffset<\/a><a href=\"https:\/\/bechele.de\/wp-content\/uploads\/2022\/07\/JoystickAveragedOffset.zip\" class=\"wp-block-file__button wp-element-button\" download aria-describedby=\"wp-block-file--media-9b1d71dd-ce9e-4798-8f23-e30e48477e58\">Download<\/a><\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>The Arduino source code for the joy stick<\/strong><\/p>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">or using&nbsp; drag and drop:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&nbsp;\/\/ These constants won't change.  They're used to give names<br>\/\/ to the pins used:<br>const int analogInPin = A0;   \/\/ Analog input pin that the potentiometer is attached to<br>const int analogInPin2 = A1 ; \/\/ Analog output pin that the LED is attached to<br>const int Button1 = 2 ;<br>const int Button2 = 8 ;<br>int AsensorValue1 = 512;         \/\/ value read from the pot<br>int AsensorValue2 = 512;         \/\/ value read from the pot<br>int inByte = 0;               \/\/ incoming serial byte<br><br>void setup() {<br>  \/\/ initialize serial communications at 9600 bps:<br>  Serial.begin(38400); <br>}<br><br>void loop() {<br>  \/\/ read the analog in value:<br>  AsensorValue1 = (AsensorValue1\/10*9+analogRead(analogInPin)\/10);     \/\/ Mittelwertberechnung<br>  AsensorValue2 = (AsensorValue2\/10*9+analogRead(analogInPin2)\/10);    \/\/ schleichend<br>  int button1State = digitalRead(Button1);<br>  int button2State = digitalRead(Button2);        <br>  if (Serial.available() &gt; 0) {<br>  inByte = Serial.read();<br>    if (inByte == 52) {<br>      \/\/ print the results to the serial monitor:                     <br>      Serial.print(AsensorValue1-50);      <br>      Serial.print(\" \");<br>      Serial.print(AsensorValue2-110);  <br>      Serial.print(\" \");<br>      Serial.print(button1State);<br>      Serial.print(\" \");<br>      Serial.println(button2State);   <br>    }<br>  inByte = 0;  <br>  }            <br>}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The self made joy stick as an input device and its wiring The joy Stich to record the servo movement syncronous to the sound is&hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":193,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-202","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/bechele.de\/index.php?rest_route=\/wp\/v2\/pages\/202","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bechele.de\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/bechele.de\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/bechele.de\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/bechele.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=202"}],"version-history":[{"count":9,"href":"https:\/\/bechele.de\/index.php?rest_route=\/wp\/v2\/pages\/202\/revisions"}],"predecessor-version":[{"id":1532,"href":"https:\/\/bechele.de\/index.php?rest_route=\/wp\/v2\/pages\/202\/revisions\/1532"}],"up":[{"embeddable":true,"href":"https:\/\/bechele.de\/index.php?rest_route=\/wp\/v2\/pages\/193"}],"wp:attachment":[{"href":"https:\/\/bechele.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=202"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}