{"id":2409,"date":"2022-06-11T17:24:12","date_gmt":"2022-06-11T15:24:12","guid":{"rendered":"https:\/\/timvis.de\/blog\/?p=2409"},"modified":"2022-07-26T22:31:18","modified_gmt":"2022-07-26T20:31:18","slug":"sensor-controlled-visual","status":"publish","type":"post","link":"https:\/\/timvis.de\/blog\/2022\/06\/sensor-controlled-visual\/","title":{"rendered":"Custom: Sensor influenced visual"},"content":{"rendered":"<p>Any display shows a live visual, created with GLSL shaders, that is affected by the touch of a big mushroom shaped sensor. With the Raspberry Pi, the display can also be a cathode ray tube TV easily, not only HDMI.<\/p>\n<p><!--more--><\/p>\n<h3>Hardware from the pool<\/h3>\n<ul>\n<li>The low-spec Raspberry Pi 1 Model B is basically enough for the task.<\/li>\n<li>But for more complex shaders the GPU power a Raspberry Pi 4 is recommended.<\/li>\n<li>Adafruit MPR121 Touch Sensor Hat<\/li>\n<li>A sensor built from a metal lampshade and a light light-tripod.<\/li>\n<\/ul>\n<h3>Software\/System<\/h3>\n<ul>\n<li>Raspberry Pi OS (console, headless)<\/li>\n<li>custom compiled GLSL viewer with OSC server functionality<\/li>\n<li>custom Python script to read the sensor values and broadcast as OSC messages in localhost.<\/li>\n<li>selected GLSL shaders, adapted for OpenGL ES and and external variables from OSC messages.<\/li>\n<li>Autostart everything als <em>systemd<\/em> service<\/li>\n<\/ul>\n<h3>further Customization \/ Scalability<\/h3>\n<ul>\n<li>A Python script that allows to change the displayed shaders with hardware buttons. More\/other sensors. Better integration of the jumping sensor values into generative shaders for deeper understandment of interaction.<\/li>\n<\/ul>\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-2 is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/timvis.de\/blog\/wp-content\/uploads\/2022\/06\/01-1.jpg\" data-lbwps-width=\"1920\" data-lbwps-height=\"1280\" data-lbwps-srcsmall=\"https:\/\/timvis.de\/blog\/wp-content\/uploads\/2022\/06\/01-1.jpg\"><img decoding=\"async\" width=\"1920\" height=\"1280\" data-id=\"2416\" src=\"https:\/\/timvis.de\/blog\/wp-content\/uploads\/2022\/06\/01-1.jpg\" alt=\"\" class=\"wp-image-2416\" srcset=\"https:\/\/timvis.de\/blog\/wp-content\/uploads\/2022\/06\/01-1.jpg 1920w, https:\/\/timvis.de\/blog\/wp-content\/uploads\/2022\/06\/01-1-512x341.jpg 512w, https:\/\/timvis.de\/blog\/wp-content\/uploads\/2022\/06\/01-1-200x133.jpg 200w, https:\/\/timvis.de\/blog\/wp-content\/uploads\/2022\/06\/01-1-768x512.jpg 768w, https:\/\/timvis.de\/blog\/wp-content\/uploads\/2022\/06\/01-1-1536x1024.jpg 1536w\" sizes=\"(max-width: 1920px) 100vw, 1920px\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/timvis.de\/blog\/wp-content\/uploads\/2022\/06\/02-1.jpg\" data-lbwps-width=\"1920\" data-lbwps-height=\"1920\" data-lbwps-srcsmall=\"https:\/\/timvis.de\/blog\/wp-content\/uploads\/2022\/06\/02-1.jpg\"><img decoding=\"async\" width=\"1920\" height=\"1920\" data-id=\"2417\" src=\"https:\/\/timvis.de\/blog\/wp-content\/uploads\/2022\/06\/02-1.jpg\" alt=\"\" class=\"wp-image-2417\" srcset=\"https:\/\/timvis.de\/blog\/wp-content\/uploads\/2022\/06\/02-1.jpg 1920w, https:\/\/timvis.de\/blog\/wp-content\/uploads\/2022\/06\/02-1-512x512.jpg 512w, https:\/\/timvis.de\/blog\/wp-content\/uploads\/2022\/06\/02-1-200x200.jpg 200w, https:\/\/timvis.de\/blog\/wp-content\/uploads\/2022\/06\/02-1-768x768.jpg 768w, https:\/\/timvis.de\/blog\/wp-content\/uploads\/2022\/06\/02-1-1536x1536.jpg 1536w\" sizes=\"(max-width: 1920px) 100vw, 1920px\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/timvis.de\/blog\/wp-content\/uploads\/2022\/06\/03-1.jpg\" data-lbwps-width=\"1920\" data-lbwps-height=\"1280\" data-lbwps-srcsmall=\"https:\/\/timvis.de\/blog\/wp-content\/uploads\/2022\/06\/03-1.jpg\"><img decoding=\"async\" width=\"1920\" height=\"1280\" data-id=\"2418\" src=\"https:\/\/timvis.de\/blog\/wp-content\/uploads\/2022\/06\/03-1.jpg\" alt=\"\" class=\"wp-image-2418\" srcset=\"https:\/\/timvis.de\/blog\/wp-content\/uploads\/2022\/06\/03-1.jpg 1920w, https:\/\/timvis.de\/blog\/wp-content\/uploads\/2022\/06\/03-1-512x341.jpg 512w, https:\/\/timvis.de\/blog\/wp-content\/uploads\/2022\/06\/03-1-200x133.jpg 200w, https:\/\/timvis.de\/blog\/wp-content\/uploads\/2022\/06\/03-1-768x512.jpg 768w, https:\/\/timvis.de\/blog\/wp-content\/uploads\/2022\/06\/03-1-1536x1024.jpg 1536w\" sizes=\"(max-width: 1920px) 100vw, 1920px\" \/><\/a><\/figure>\n<\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Any display shows a live visual, created with GLSL shaders, that is affected by the touch of a big mushroom shaped sensor. With the Raspberry Pi, the display can also be a cathode ray tube TV easily, not only HDMI.<\/p>\n","protected":false},"author":2,"featured_media":2418,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"lazy_load_responsive_images_disabled":false,"footnotes":""},"categories":[107,4,116,106],"tags":[],"class_list":["post-2409","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-coding","category-custom_technology","category-rpi-use-case","category-visuals"],"_links":{"self":[{"href":"https:\/\/timvis.de\/blog\/wp-json\/wp\/v2\/posts\/2409","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/timvis.de\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/timvis.de\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/timvis.de\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/timvis.de\/blog\/wp-json\/wp\/v2\/comments?post=2409"}],"version-history":[{"count":0,"href":"https:\/\/timvis.de\/blog\/wp-json\/wp\/v2\/posts\/2409\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/timvis.de\/blog\/wp-json\/wp\/v2\/media\/2418"}],"wp:attachment":[{"href":"https:\/\/timvis.de\/blog\/wp-json\/wp\/v2\/media?parent=2409"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/timvis.de\/blog\/wp-json\/wp\/v2\/categories?post=2409"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/timvis.de\/blog\/wp-json\/wp\/v2\/tags?post=2409"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}