{"id":28905,"date":"2026-05-12T15:27:49","date_gmt":"2026-05-12T15:27:49","guid":{"rendered":"https:\/\/retotech.fundacionendesa.org\/multisite\/?p=28905"},"modified":"2026-05-12T16:44:26","modified_gmt":"2026-05-12T16:44:26","slug":"1-funcionament-general","status":"publish","type":"post","link":"https:\/\/retotech.fundacionendesa.org\/multisite\/2026\/05\/12\/1-funcionament-general\/","title":{"rendered":"PROJECTE TASU &#8211; 1. Funcionament general"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\"><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Tenim <strong>3 sensors<\/strong>: esquerre, central i dret.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Cada sensor mesura la dist\u00e0ncia.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">El sensor amb la <strong>dist\u00e0ncia m\u00e9s petita<\/strong> indica la direcci\u00f3 de l\u2019intr\u00fas.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">El servo es mou a un angle predefinit:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Esquerra \u2192 45\u00b0<\/li>\n\n\n\n<li>Centre \u2192 90\u00b0<\/li>\n\n\n\n<li>Dreta \u2192 135\u00b0<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Si <strong>algun sensor detecta un intr\u00fas<\/strong> (p. ex. &lt; 300\u202fcm), el LED associat s\u2019enc\u00e9n.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">La torreta funciona com un <strong>radar<\/strong>:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>El servo pot girar de 0\u00b0 a 180\u00b0 (o 0\u2013160\u00b0 per seguretat mec\u00e0nica). Hi ha tres sensors ultras\u00f2nics (HC-SR04) col\u00b7locats amb un angle f\u00edsic entre ells (per exemple, 30\u00b0 o 45\u00b0): esquerre, central i dret.<\/li>\n\n\n\n<li>Cada sensor mesura la dist\u00e0ncia al mateix obstacle.<\/li>\n\n\n\n<li>El sensor que detecti la dist\u00e0ncia m\u00e9s petita ser\u00e0 el que \u201cveur\u00e0\u201d l\u2019obstacle m\u00e9s directament. Per tant, el servo girar\u00e0 cap a l\u2019angle associat a aquell sensor:<\/li>\n<\/ol>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Esquerra \u2192 45\u00b0<\/li>\n\n\n\n<li>Centre \u2192 90\u00b0<\/li>\n\n\n\n<li>Dreta \u2192 135\u00b0<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Aix\u00f2 permet detectar la dist\u00e0ncia respecte l\u2019\u201dintr\u00fas\u201d i estimar angle aproximat (escalat entre els dos sensors).<\/p>\n\n\n\n<ol start=\"4\" class=\"wp-block-list\">\n<li>A m\u00e9s, en cas que <strong>algun sensor detecti un intr\u00fas<\/strong> (en el nostre cas, que es trobi a una dist\u00e0ncia menor de 300\u202fcm), s\u2019encendr\u00e0 el LED associat amb aquell sensor. En cas que un sensor d\u2019ultrasons no <strong>detecti res<\/strong> (\u00e9s a dir, que la dist\u00e0ncia mesurada sigui igual o superior a 300 cm), aquest mateix LED romandr\u00e0 apagat.<\/li>\n\n\n\n<li>Arduino envia la parella <strong>(angle, dist\u00e0ncia)<\/strong> al m\u00f2bil.<\/li>\n\n\n\n<li>L\u2019app dibuixa un punt en un radar circular.<\/li>\n\n\n\n<li>Si la dist\u00e0ncia \u00e9s inferior a un llindar, la torreta pot:<\/li>\n<\/ol>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Enviar una alerta.<\/li>\n\n\n\n<li>Encendre un LED.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Tenim 3 sensors: esquerre, central i dret. Cada sensor mesura la dist\u00e0ncia. El sensor amb la dist\u00e0ncia m\u00e9s petita indica<\/p>\n","protected":false},"author":6283,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-28905","post","type-post","status-publish","format-standard","hentry","category-blog-retotech"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>PROJECTE TASU - 1. Funcionament general - RetoTech 2020-2021<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/retotech.fundacionendesa.org\/multisite\/2026\/05\/12\/1-funcionament-general\/\" \/>\n<meta property=\"og:locale\" content=\"es_ES\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PROJECTE TASU - 1. Funcionament general - RetoTech 2020-2021\" \/>\n<meta property=\"og:description\" content=\"Tenim 3 sensors: esquerre, central i dret. Cada sensor mesura la dist\u00e0ncia. El sensor amb la dist\u00e0ncia m\u00e9s petita indica\" \/>\n<meta property=\"og:url\" content=\"https:\/\/retotech.fundacionendesa.org\/multisite\/2026\/05\/12\/1-funcionament-general\/\" \/>\n<meta property=\"og:site_name\" content=\"RetoTech 2020-2021\" \/>\n<meta property=\"article:published_time\" content=\"2026-05-12T15:27:49+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-05-12T16:44:26+00:00\" \/>\n<meta name=\"author\" content=\"Institut Pompeu Fabra\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Escrito por\" \/>\n\t<meta name=\"twitter:data1\" content=\"Institut Pompeu Fabra\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tiempo de lectura\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minuto\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/retotech.fundacionendesa.org\\\/multisite\\\/2026\\\/05\\\/12\\\/1-funcionament-general\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/retotech.fundacionendesa.org\\\/multisite\\\/2026\\\/05\\\/12\\\/1-funcionament-general\\\/\"},\"author\":{\"name\":\"Institut Pompeu Fabra\",\"@id\":\"https:\\\/\\\/retotech.fundacionendesa.org\\\/multisite\\\/#\\\/schema\\\/person\\\/1ac441b4ad8522610ea61a6281a3bc84\"},\"headline\":\"PROJECTE TASU &#8211; 1. Funcionament general\",\"datePublished\":\"2026-05-12T15:27:49+00:00\",\"dateModified\":\"2026-05-12T16:44:26+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/retotech.fundacionendesa.org\\\/multisite\\\/2026\\\/05\\\/12\\\/1-funcionament-general\\\/\"},\"wordCount\":264,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/retotech.fundacionendesa.org\\\/multisite\\\/#organization\"},\"articleSection\":[\"Blog RetoTech\"],\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/retotech.fundacionendesa.org\\\/multisite\\\/2026\\\/05\\\/12\\\/1-funcionament-general\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/retotech.fundacionendesa.org\\\/multisite\\\/2026\\\/05\\\/12\\\/1-funcionament-general\\\/\",\"url\":\"https:\\\/\\\/retotech.fundacionendesa.org\\\/multisite\\\/2026\\\/05\\\/12\\\/1-funcionament-general\\\/\",\"name\":\"PROJECTE TASU - 1. Funcionament general - RetoTech 2020-2021\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/retotech.fundacionendesa.org\\\/multisite\\\/#website\"},\"datePublished\":\"2026-05-12T15:27:49+00:00\",\"dateModified\":\"2026-05-12T16:44:26+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/retotech.fundacionendesa.org\\\/multisite\\\/2026\\\/05\\\/12\\\/1-funcionament-general\\\/#breadcrumb\"},\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/retotech.fundacionendesa.org\\\/multisite\\\/2026\\\/05\\\/12\\\/1-funcionament-general\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/retotech.fundacionendesa.org\\\/multisite\\\/2026\\\/05\\\/12\\\/1-funcionament-general\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Portada\",\"item\":\"https:\\\/\\\/retotech.fundacionendesa.org\\\/multisite\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PROJECTE TASU &#8211; 1. Funcionament general\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/retotech.fundacionendesa.org\\\/multisite\\\/#website\",\"url\":\"https:\\\/\\\/retotech.fundacionendesa.org\\\/multisite\\\/\",\"name\":\"RetoTech 2020-2021\",\"description\":\"Reto Tech Fundaci\u00f3n Endesa 2020-2021\",\"publisher\":{\"@id\":\"https:\\\/\\\/retotech.fundacionendesa.org\\\/multisite\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/retotech.fundacionendesa.org\\\/multisite\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"es\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/retotech.fundacionendesa.org\\\/multisite\\\/#organization\",\"name\":\"RetoTech 2020-2021\",\"url\":\"https:\\\/\\\/retotech.fundacionendesa.org\\\/multisite\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\\\/\\\/retotech.fundacionendesa.org\\\/multisite\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/retotech.fundacionendesa.org\\\/multisite\\\/wp-content\\\/uploads\\\/sites\\\/3\\\/2024\\\/07\\\/logo-endesa-white-1-1-2-e1720700070114.png\",\"contentUrl\":\"https:\\\/\\\/retotech.fundacionendesa.org\\\/multisite\\\/wp-content\\\/uploads\\\/sites\\\/3\\\/2024\\\/07\\\/logo-endesa-white-1-1-2-e1720700070114.png\",\"width\":512,\"height\":181,\"caption\":\"RetoTech 2020-2021\"},\"image\":{\"@id\":\"https:\\\/\\\/retotech.fundacionendesa.org\\\/multisite\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/retotech.fundacionendesa.org\\\/multisite\\\/#\\\/schema\\\/person\\\/1ac441b4ad8522610ea61a6281a3bc84\",\"name\":\"Institut Pompeu Fabra\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a7a04d739d87425ef7ffa0ed816ed6e87ec102ef9a9821b5806e032c35483ed1?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a7a04d739d87425ef7ffa0ed816ed6e87ec102ef9a9821b5806e032c35483ed1?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a7a04d739d87425ef7ffa0ed816ed6e87ec102ef9a9821b5806e032c35483ed1?s=96&d=mm&r=g\",\"caption\":\"Institut Pompeu Fabra\"},\"url\":\"https:\\\/\\\/retotech.fundacionendesa.org\\\/multisite\\\/author\\\/pompeufabra\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"PROJECTE TASU - 1. Funcionament general - RetoTech 2020-2021","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/retotech.fundacionendesa.org\/multisite\/2026\/05\/12\/1-funcionament-general\/","og_locale":"es_ES","og_type":"article","og_title":"PROJECTE TASU - 1. Funcionament general - RetoTech 2020-2021","og_description":"Tenim 3 sensors: esquerre, central i dret. Cada sensor mesura la dist\u00e0ncia. El sensor amb la dist\u00e0ncia m\u00e9s petita indica","og_url":"https:\/\/retotech.fundacionendesa.org\/multisite\/2026\/05\/12\/1-funcionament-general\/","og_site_name":"RetoTech 2020-2021","article_published_time":"2026-05-12T15:27:49+00:00","article_modified_time":"2026-05-12T16:44:26+00:00","author":"Institut Pompeu Fabra","twitter_card":"summary_large_image","twitter_misc":{"Escrito por":"Institut Pompeu Fabra","Tiempo de lectura":"1 minuto"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/retotech.fundacionendesa.org\/multisite\/2026\/05\/12\/1-funcionament-general\/#article","isPartOf":{"@id":"https:\/\/retotech.fundacionendesa.org\/multisite\/2026\/05\/12\/1-funcionament-general\/"},"author":{"name":"Institut Pompeu Fabra","@id":"https:\/\/retotech.fundacionendesa.org\/multisite\/#\/schema\/person\/1ac441b4ad8522610ea61a6281a3bc84"},"headline":"PROJECTE TASU &#8211; 1. Funcionament general","datePublished":"2026-05-12T15:27:49+00:00","dateModified":"2026-05-12T16:44:26+00:00","mainEntityOfPage":{"@id":"https:\/\/retotech.fundacionendesa.org\/multisite\/2026\/05\/12\/1-funcionament-general\/"},"wordCount":264,"commentCount":0,"publisher":{"@id":"https:\/\/retotech.fundacionendesa.org\/multisite\/#organization"},"articleSection":["Blog RetoTech"],"inLanguage":"es","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/retotech.fundacionendesa.org\/multisite\/2026\/05\/12\/1-funcionament-general\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/retotech.fundacionendesa.org\/multisite\/2026\/05\/12\/1-funcionament-general\/","url":"https:\/\/retotech.fundacionendesa.org\/multisite\/2026\/05\/12\/1-funcionament-general\/","name":"PROJECTE TASU - 1. Funcionament general - RetoTech 2020-2021","isPartOf":{"@id":"https:\/\/retotech.fundacionendesa.org\/multisite\/#website"},"datePublished":"2026-05-12T15:27:49+00:00","dateModified":"2026-05-12T16:44:26+00:00","breadcrumb":{"@id":"https:\/\/retotech.fundacionendesa.org\/multisite\/2026\/05\/12\/1-funcionament-general\/#breadcrumb"},"inLanguage":"es","potentialAction":[{"@type":"ReadAction","target":["https:\/\/retotech.fundacionendesa.org\/multisite\/2026\/05\/12\/1-funcionament-general\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/retotech.fundacionendesa.org\/multisite\/2026\/05\/12\/1-funcionament-general\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Portada","item":"https:\/\/retotech.fundacionendesa.org\/multisite\/"},{"@type":"ListItem","position":2,"name":"PROJECTE TASU &#8211; 1. Funcionament general"}]},{"@type":"WebSite","@id":"https:\/\/retotech.fundacionendesa.org\/multisite\/#website","url":"https:\/\/retotech.fundacionendesa.org\/multisite\/","name":"RetoTech 2020-2021","description":"Reto Tech Fundaci\u00f3n Endesa 2020-2021","publisher":{"@id":"https:\/\/retotech.fundacionendesa.org\/multisite\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/retotech.fundacionendesa.org\/multisite\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"es"},{"@type":"Organization","@id":"https:\/\/retotech.fundacionendesa.org\/multisite\/#organization","name":"RetoTech 2020-2021","url":"https:\/\/retotech.fundacionendesa.org\/multisite\/","logo":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/retotech.fundacionendesa.org\/multisite\/#\/schema\/logo\/image\/","url":"https:\/\/retotech.fundacionendesa.org\/multisite\/wp-content\/uploads\/sites\/3\/2024\/07\/logo-endesa-white-1-1-2-e1720700070114.png","contentUrl":"https:\/\/retotech.fundacionendesa.org\/multisite\/wp-content\/uploads\/sites\/3\/2024\/07\/logo-endesa-white-1-1-2-e1720700070114.png","width":512,"height":181,"caption":"RetoTech 2020-2021"},"image":{"@id":"https:\/\/retotech.fundacionendesa.org\/multisite\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/retotech.fundacionendesa.org\/multisite\/#\/schema\/person\/1ac441b4ad8522610ea61a6281a3bc84","name":"Institut Pompeu Fabra","image":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/secure.gravatar.com\/avatar\/a7a04d739d87425ef7ffa0ed816ed6e87ec102ef9a9821b5806e032c35483ed1?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/a7a04d739d87425ef7ffa0ed816ed6e87ec102ef9a9821b5806e032c35483ed1?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a7a04d739d87425ef7ffa0ed816ed6e87ec102ef9a9821b5806e032c35483ed1?s=96&d=mm&r=g","caption":"Institut Pompeu Fabra"},"url":"https:\/\/retotech.fundacionendesa.org\/multisite\/author\/pompeufabra\/"}]}},"_links":{"self":[{"href":"https:\/\/retotech.fundacionendesa.org\/multisite\/wp-json\/wp\/v2\/posts\/28905","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/retotech.fundacionendesa.org\/multisite\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/retotech.fundacionendesa.org\/multisite\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/retotech.fundacionendesa.org\/multisite\/wp-json\/wp\/v2\/users\/6283"}],"replies":[{"embeddable":true,"href":"https:\/\/retotech.fundacionendesa.org\/multisite\/wp-json\/wp\/v2\/comments?post=28905"}],"version-history":[{"count":4,"href":"https:\/\/retotech.fundacionendesa.org\/multisite\/wp-json\/wp\/v2\/posts\/28905\/revisions"}],"predecessor-version":[{"id":28979,"href":"https:\/\/retotech.fundacionendesa.org\/multisite\/wp-json\/wp\/v2\/posts\/28905\/revisions\/28979"}],"wp:attachment":[{"href":"https:\/\/retotech.fundacionendesa.org\/multisite\/wp-json\/wp\/v2\/media?parent=28905"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/retotech.fundacionendesa.org\/multisite\/wp-json\/wp\/v2\/categories?post=28905"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/retotech.fundacionendesa.org\/multisite\/wp-json\/wp\/v2\/tags?post=28905"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}