NSI/Ressources/Raspberry Pi Pico Web Server (MicroPython) Random Nerd Tutorials.htm
2025-03-22 00:49:46 +01:00

2074 lines
203 KiB
HTML
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html dir="ltr" lang="en-US" prefix="og: https://ogp.me/ns#">
<head>
<meta charset="UTF-8">
<title>Raspberry Pi Pico: Web Server (MicroPython) | Random Nerd Tutorials</title>
<link rel='preload' href='https://randomnerdtutorials.com/wp-content/uploads/2016/04/logornt.png' as='image' imagesrcset='' imagesizes='' />
<link rel='preload' href='https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-Web-Server-Micropython.jpg?resize=828%2C466&#038;quality=100&#038;strip=all&#038;ssl=1' as='image' imagesrcset='https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-Web-Server-Micropython.jpg?w=1280&amp;quality=100&amp;strip=all&amp;ssl=1 1280w, https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-Web-Server-Micropython.jpg?resize=300%2C169&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-Web-Server-Micropython.jpg?resize=1024%2C576&amp;quality=100&amp;strip=all&amp;ssl=1 1024w, https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-Web-Server-Micropython.jpg?resize=768%2C432&amp;quality=100&amp;strip=all&amp;ssl=1 768w' imagesizes='(max-width: 828px) 100vw, 828px' />
<link rel='preload' href='https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-Web-Server-example.png?resize=828%2C256&#038;quality=100&#038;strip=all&#038;ssl=1' as='image' imagesrcset='https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-Web-Server-example.png?w=1135&amp;quality=100&amp;strip=all&amp;ssl=1 1135w, https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-Web-Server-example.png?resize=300%2C93&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-Web-Server-example.png?resize=1024%2C317&amp;quality=100&amp;strip=all&amp;ssl=1 1024w, https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-Web-Server-example.png?resize=768%2C238&amp;quality=100&amp;strip=all&amp;ssl=1 768w' imagesizes='(max-width: 828px) 100vw, 828px' />
<link rel='preload' href='https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-WebServer.png?resize=716%2C471&#038;quality=100&#038;strip=all&#038;ssl=1' as='image' imagesrcset='https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-WebServer.png?w=716&amp;quality=100&amp;strip=all&amp;ssl=1 716w, https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-WebServer.png?resize=300%2C197&amp;quality=100&amp;strip=all&amp;ssl=1 300w' imagesizes='(max-width: 716px) 100vw, 716px' />
<link rel='preload' href='https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-it-works-1.png?resize=828%2C446&#038;quality=100&#038;strip=all&#038;ssl=1' as='image' imagesrcset='https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-it-works-1.png?w=1167&amp;quality=100&amp;strip=all&amp;ssl=1 1167w, https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-it-works-1.png?resize=300%2C162&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-it-works-1.png?resize=1024%2C552&amp;quality=100&amp;strip=all&amp;ssl=1 1024w, https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-it-works-1.png?resize=768%2C414&amp;quality=100&amp;strip=all&amp;ssl=1 768w' imagesizes='(max-width: 828px) 100vw, 828px' />
<link rel='preload' href='https://randomnerdtutorials.com/wp-content/themes/generatepress/assets/fonts/generatepress.woff2' as='font' type='font/woff2' fetchpriority='high' crossorigin='anonymous'>
<!-- All in One SEO 4.7.5 - aioseo.com -->
<meta name="description" content="Create a basic Raspberry Pi Pico local web server to control outputs and fetch data. You&#039;ll build a web page to control an LED on and off and fetch some random values generated by the Pico." />
<meta name="robots" content="max-image-preview:large" />
<meta name="keywords" content="raspberry pi pico web server micropython,raspberry pi pico web server micropython script,raspberry pi pico basic web server micropython led on off outputs" />
<link rel="canonical" href="https://randomnerdtutorials.com/raspberry-pi-pico-web-server-micropython/" />
<meta name="generator" content="All in One SEO (AIOSEO) 4.7.5" />
<meta property="og:locale" content="en_US" />
<meta property="og:site_name" content="Random Nerd Tutorials" />
<meta property="og:type" content="article" />
<meta property="og:title" content="Raspberry Pi Pico: Web Server (MicroPython) | Random Nerd Tutorials" />
<meta property="og:description" content="Create a basic Raspberry Pi Pico local web server to control outputs and fetch data. You&#039;ll build a web page to control an LED on and off and fetch some random values generated by the Pico." />
<meta property="og:url" content="https://randomnerdtutorials.com/raspberry-pi-pico-web-server-micropython/" />
<meta property="og:image" content="https://randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-Web-Server-Micropython.jpg" />
<meta property="og:image:secure_url" content="https://randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-Web-Server-Micropython.jpg" />
<meta property="og:image:width" content="1280" />
<meta property="og:image:height" content="720" />
<meta property="article:published_time" content="2024-01-11T13:55:58+00:00" />
<meta property="article:modified_time" content="2024-05-06T10:53:07+00:00" />
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content="Raspberry Pi Pico: Web Server (MicroPython) | Random Nerd Tutorials" />
<meta name="twitter:description" content="Create a basic Raspberry Pi Pico local web server to control outputs and fetch data. You&#039;ll build a web page to control an LED on and off and fetch some random values generated by the Pico." />
<meta name="twitter:image" content="https://randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-Web-Server-Micropython.jpg" />
<meta name="google" content="nositelinkssearchbox" />
<script type="application/ld+json" class="aioseo-schema">
{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/randomnerdtutorials.com\/raspberry-pi-pico-web-server-micropython\/#article","name":"Raspberry Pi Pico: Web Server (MicroPython) | Random Nerd Tutorials","headline":"Raspberry Pi Pico: Web Server (MicroPython)","author":{"@id":"https:\/\/randomnerdtutorials.com\/author\/sara-santos\/#author"},"publisher":{"@id":"https:\/\/randomnerdtutorials.com\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2023\/12\/Raspberry-Pi-Pico-Web-Server-Micropython.jpg?fit=1280%2C720&quality=100&strip=all&ssl=1","width":1280,"height":720},"datePublished":"2024-01-11T13:55:58+00:00","dateModified":"2024-05-06T10:53:07+00:00","inLanguage":"en-US","commentCount":18,"mainEntityOfPage":{"@id":"https:\/\/randomnerdtutorials.com\/raspberry-pi-pico-web-server-micropython\/#webpage"},"isPartOf":{"@id":"https:\/\/randomnerdtutorials.com\/raspberry-pi-pico-web-server-micropython\/#webpage"},"articleSection":"Raspberry Pi Pico, Raspberry Pi Pico MicroPython"},{"@type":"BreadcrumbList","@id":"https:\/\/randomnerdtutorials.com\/raspberry-pi-pico-web-server-micropython\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/randomnerdtutorials.com\/#listItem","position":1,"name":"Home","item":"https:\/\/randomnerdtutorials.com\/","nextItem":"https:\/\/randomnerdtutorials.com\/raspberry-pi-pico-web-server-micropython\/#listItem"},{"@type":"ListItem","@id":"https:\/\/randomnerdtutorials.com\/raspberry-pi-pico-web-server-micropython\/#listItem","position":2,"name":"Raspberry Pi Pico: Web Server (MicroPython)","previousItem":"https:\/\/randomnerdtutorials.com\/#listItem"}]},{"@type":"Organization","@id":"https:\/\/randomnerdtutorials.com\/#organization","name":"Random Nerd Tutorials","description":"Learn ESP8266, ESP32, Arduino, and Raspberry Pi","url":"https:\/\/randomnerdtutorials.com\/"},{"@type":"Person","@id":"https:\/\/randomnerdtutorials.com\/author\/sara-santos\/#author","url":"https:\/\/randomnerdtutorials.com\/author\/sara-santos\/","name":"Sara Santos","image":{"@type":"ImageObject","@id":"https:\/\/randomnerdtutorials.com\/raspberry-pi-pico-web-server-micropython\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/25e3da92f25bc3fde695d9c0d92207b0?s=96&d=mm&r=g","width":96,"height":96,"caption":"Sara Santos"}},{"@type":"WebPage","@id":"https:\/\/randomnerdtutorials.com\/raspberry-pi-pico-web-server-micropython\/#webpage","url":"https:\/\/randomnerdtutorials.com\/raspberry-pi-pico-web-server-micropython\/","name":"Raspberry Pi Pico: Web Server (MicroPython) | Random Nerd Tutorials","description":"Create a basic Raspberry Pi Pico local web server to control outputs and fetch data. You'll build a web page to control an LED on and off and fetch some random values generated by the Pico.","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/randomnerdtutorials.com\/#website"},"breadcrumb":{"@id":"https:\/\/randomnerdtutorials.com\/raspberry-pi-pico-web-server-micropython\/#breadcrumblist"},"author":{"@id":"https:\/\/randomnerdtutorials.com\/author\/sara-santos\/#author"},"creator":{"@id":"https:\/\/randomnerdtutorials.com\/author\/sara-santos\/#author"},"image":{"@type":"ImageObject","url":"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2023\/12\/Raspberry-Pi-Pico-Web-Server-Micropython.jpg?fit=1280%2C720&quality=100&strip=all&ssl=1","@id":"https:\/\/randomnerdtutorials.com\/raspberry-pi-pico-web-server-micropython\/#mainImage","width":1280,"height":720},"primaryImageOfPage":{"@id":"https:\/\/randomnerdtutorials.com\/raspberry-pi-pico-web-server-micropython\/#mainImage"},"datePublished":"2024-01-11T13:55:58+00:00","dateModified":"2024-05-06T10:53:07+00:00"},{"@type":"WebSite","@id":"https:\/\/randomnerdtutorials.com\/#website","url":"https:\/\/randomnerdtutorials.com\/","name":"Random Nerd Tutorials","description":"Learn ESP8266, ESP32, Arduino, and Raspberry Pi","inLanguage":"en-US","publisher":{"@id":"https:\/\/randomnerdtutorials.com\/#organization"}}]}
</script>
<!-- All in One SEO -->
<meta name="viewport" content="width=device-width, initial-scale=1"><link rel='dns-prefetch' href='//scripts.mediavine.com' />
<link rel='dns-prefetch' href='//v0.wordpress.com' />
<link rel='dns-prefetch' href='//i0.wp.com' />
<link rel="alternate" type="application/rss+xml" title="Random Nerd Tutorials &raquo; Feed" href="https://randomnerdtutorials.com/feed/" />
<link rel="alternate" type="application/rss+xml" title="Random Nerd Tutorials &raquo; Comments Feed" href="https://randomnerdtutorials.com/comments/feed/" />
<link rel="alternate" type="application/rss+xml" title="Random Nerd Tutorials &raquo; Raspberry Pi Pico: Web Server (MicroPython) Comments Feed" href="https://randomnerdtutorials.com/raspberry-pi-pico-web-server-micropython/feed/" />
<script>
window._wpemojiSettings = {"baseUrl":"https:\/\/s.w.org\/images\/core\/emoji\/15.0.3\/72x72\/","ext":".png","svgUrl":"https:\/\/s.w.org\/images\/core\/emoji\/15.0.3\/svg\/","svgExt":".svg","source":{"concatemoji":"https:\/\/randomnerdtutorials.com\/wp-includes\/js\/wp-emoji-release.min.js?ver=6.6.2"}};
/*! This file is auto-generated */
!function(i,n){var o,s,e;function c(e){try{var t={supportTests:e,timestamp:(new Date).valueOf()};sessionStorage.setItem(o,JSON.stringify(t))}catch(e){}}function p(e,t,n){e.clearRect(0,0,e.canvas.width,e.canvas.height),e.fillText(t,0,0);var t=new Uint32Array(e.getImageData(0,0,e.canvas.width,e.canvas.height).data),r=(e.clearRect(0,0,e.canvas.width,e.canvas.height),e.fillText(n,0,0),new Uint32Array(e.getImageData(0,0,e.canvas.width,e.canvas.height).data));return t.every(function(e,t){return e===r[t]})}function u(e,t,n){switch(t){case"flag":return n(e,"\ud83c\udff3\ufe0f\u200d\u26a7\ufe0f","\ud83c\udff3\ufe0f\u200b\u26a7\ufe0f")?!1:!n(e,"\ud83c\uddfa\ud83c\uddf3","\ud83c\uddfa\u200b\ud83c\uddf3")&&!n(e,"\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc65\udb40\udc6e\udb40\udc67\udb40\udc7f","\ud83c\udff4\u200b\udb40\udc67\u200b\udb40\udc62\u200b\udb40\udc65\u200b\udb40\udc6e\u200b\udb40\udc67\u200b\udb40\udc7f");case"emoji":return!n(e,"\ud83d\udc26\u200d\u2b1b","\ud83d\udc26\u200b\u2b1b")}return!1}function f(e,t,n){var r="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?new OffscreenCanvas(300,150):i.createElement("canvas"),a=r.getContext("2d",{willReadFrequently:!0}),o=(a.textBaseline="top",a.font="600 32px Arial",{});return e.forEach(function(e){o[e]=t(a,e,n)}),o}function t(e){var t=i.createElement("script");t.src=e,t.defer=!0,i.head.appendChild(t)}"undefined"!=typeof Promise&&(o="wpEmojiSettingsSupports",s=["flag","emoji"],n.supports={everything:!0,everythingExceptFlag:!0},e=new Promise(function(e){i.addEventListener("DOMContentLoaded",e,{once:!0})}),new Promise(function(t){var n=function(){try{var e=JSON.parse(sessionStorage.getItem(o));if("object"==typeof e&&"number"==typeof e.timestamp&&(new Date).valueOf()<e.timestamp+604800&&"object"==typeof e.supportTests)return e.supportTests}catch(e){}return null}();if(!n){if("undefined"!=typeof Worker&&"undefined"!=typeof OffscreenCanvas&&"undefined"!=typeof URL&&URL.createObjectURL&&"undefined"!=typeof Blob)try{var e="postMessage("+f.toString()+"("+[JSON.stringify(s),u.toString(),p.toString()].join(",")+"));",r=new Blob([e],{type:"text/javascript"}),a=new Worker(URL.createObjectURL(r),{name:"wpTestEmojiSupports"});return void(a.onmessage=function(e){c(n=e.data),a.terminate(),t(n)})}catch(e){}c(n=f(s,u,p))}t(n)}).then(function(e){for(var t in e)n.supports[t]=e[t],n.supports.everything=n.supports.everything&&n.supports[t],"flag"!==t&&(n.supports.everythingExceptFlag=n.supports.everythingExceptFlag&&n.supports[t]);n.supports.everythingExceptFlag=n.supports.everythingExceptFlag&&!n.supports.flag,n.DOMReady=!1,n.readyCallback=function(){n.DOMReady=!0}}).then(function(){return e}).then(function(){var e;n.supports.everything||(n.readyCallback(),(e=n.source||{}).concatemoji?t(e.concatemoji):e.wpemoji&&e.twemoji&&(t(e.twemoji),t(e.wpemoji)))}))}((window,document),window._wpemojiSettings);
</script>
<style id='wp-emoji-styles-inline-css'>img.wp-smiley, img.emoji {
display: inline !important;
border: none !important;
box-shadow: none !important;
height: 1em !important;
width: 1em !important;
margin: 0 0.07em !important;
vertical-align: -0.1em !important;
background: none !important;
padding: 0 !important;
}</style>
<link rel='stylesheet' id='wp-block-library-css' href='https://randomnerdtutorials.com/wp-content/cache/flying-press/319580d7d894.style.min.css' media='all' />
<link rel='stylesheet' id='mediaelement-css' href='https://randomnerdtutorials.com/wp-content/cache/flying-press/2b0dd7eecea0.mediaelementplayer-legacy.min.css' media='all' />
<link rel='stylesheet' id='wp-mediaelement-css' href='https://randomnerdtutorials.com/wp-content/cache/flying-press/ea958276b7de.wp-mediaelement.min.css' media='all' />
<style id='jetpack-sharing-buttons-style-inline-css'>.jetpack-sharing-buttons__services-list{display:flex;flex-direction:row;flex-wrap:wrap;gap:0;list-style-type:none;margin:5px;padding:0}.jetpack-sharing-buttons__services-list.has-small-icon-size{font-size:12px}.jetpack-sharing-buttons__services-list.has-normal-icon-size{font-size:16px}.jetpack-sharing-buttons__services-list.has-large-icon-size{font-size:24px}.jetpack-sharing-buttons__services-list.has-huge-icon-size{font-size:36px}@media print{.jetpack-sharing-buttons__services-list{display:none!important}}.editor-styles-wrapper .wp-block-jetpack-sharing-buttons{gap:0;padding-inline-start:0}ul.jetpack-sharing-buttons__services-list.has-background{padding:1.25em 2.375em}</style>
<style id='classic-theme-styles-inline-css'>/*! This file is auto-generated */
.wp-block-button__link{color:#fff;background-color:#32373c;border-radius:9999px;box-shadow:none;text-decoration:none;padding:calc(.667em + 2px) calc(1.333em + 2px);font-size:1.125em}.wp-block-file__button{background:#32373c;color:#fff;text-decoration:none}</style>
<style id='global-styles-inline-css'>:root{--wp--preset--aspect-ratio--square: 1;--wp--preset--aspect-ratio--4-3: 4/3;--wp--preset--aspect-ratio--3-4: 3/4;--wp--preset--aspect-ratio--3-2: 3/2;--wp--preset--aspect-ratio--2-3: 2/3;--wp--preset--aspect-ratio--16-9: 16/9;--wp--preset--aspect-ratio--9-16: 9/16;--wp--preset--color--black: #000000;--wp--preset--color--cyan-bluish-gray: #abb8c3;--wp--preset--color--white: #ffffff;--wp--preset--color--pale-pink: #f78da7;--wp--preset--color--vivid-red: #cf2e2e;--wp--preset--color--luminous-vivid-orange: #ff6900;--wp--preset--color--luminous-vivid-amber: #fcb900;--wp--preset--color--light-green-cyan: #7bdcb5;--wp--preset--color--vivid-green-cyan: #00d084;--wp--preset--color--pale-cyan-blue: #8ed1fc;--wp--preset--color--vivid-cyan-blue: #0693e3;--wp--preset--color--vivid-purple: #9b51e0;--wp--preset--color--contrast: var(--contrast);--wp--preset--color--contrast-2: var(--contrast-2);--wp--preset--color--contrast-3: var(--contrast-3);--wp--preset--color--base: var(--base);--wp--preset--color--base-2: var(--base-2);--wp--preset--color--base-3: var(--base-3);--wp--preset--color--accent: var(--accent);--wp--preset--gradient--vivid-cyan-blue-to-vivid-purple: linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%);--wp--preset--gradient--light-green-cyan-to-vivid-green-cyan: linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%);--wp--preset--gradient--luminous-vivid-amber-to-luminous-vivid-orange: linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%);--wp--preset--gradient--luminous-vivid-orange-to-vivid-red: linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%);--wp--preset--gradient--very-light-gray-to-cyan-bluish-gray: linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%);--wp--preset--gradient--cool-to-warm-spectrum: linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%);--wp--preset--gradient--blush-light-purple: linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%);--wp--preset--gradient--blush-bordeaux: linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%);--wp--preset--gradient--luminous-dusk: linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%);--wp--preset--gradient--pale-ocean: linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%);--wp--preset--gradient--electric-grass: linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%);--wp--preset--gradient--midnight: linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%);--wp--preset--font-size--small: 13px;--wp--preset--font-size--medium: 20px;--wp--preset--font-size--large: 36px;--wp--preset--font-size--x-large: 42px;--wp--preset--spacing--20: 0.44rem;--wp--preset--spacing--30: 0.67rem;--wp--preset--spacing--40: 1rem;--wp--preset--spacing--50: 1.5rem;--wp--preset--spacing--60: 2.25rem;--wp--preset--spacing--70: 3.38rem;--wp--preset--spacing--80: 5.06rem;--wp--preset--shadow--natural: 6px 6px 9px rgba(0, 0, 0, 0.2);--wp--preset--shadow--deep: 12px 12px 50px rgba(0, 0, 0, 0.4);--wp--preset--shadow--sharp: 6px 6px 0px rgba(0, 0, 0, 0.2);--wp--preset--shadow--outlined: 6px 6px 0px -3px rgba(255, 255, 255, 1), 6px 6px rgba(0, 0, 0, 1);--wp--preset--shadow--crisp: 6px 6px 0px rgba(0, 0, 0, 1);}:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flex{display: flex;}.is-layout-flex{flex-wrap: wrap;align-items: center;}.is-layout-flex > :is(*, div){margin: 0;}body .is-layout-grid{display: grid;}.is-layout-grid > :is(*, div){margin: 0;}:where(.wp-block-columns.is-layout-flex){gap: 2em;}:where(.wp-block-columns.is-layout-grid){gap: 2em;}:where(.wp-block-post-template.is-layout-flex){gap: 1.25em;}:where(.wp-block-post-template.is-layout-grid){gap: 1.25em;}.has-black-color{color: var(--wp--preset--color--black) !important;}.has-cyan-bluish-gray-color{color: var(--wp--preset--color--cyan-bluish-gray) !important;}.has-white-color{color: var(--wp--preset--color--white) !important;}.has-pale-pink-color{color: var(--wp--preset--color--pale-pink) !important;}.has-vivid-red-color{color: var(--wp--preset--color--vivid-red) !important;}.has-luminous-vivid-orange-color{color: var(--wp--preset--color--luminous-vivid-orange) !important;}.has-luminous-vivid-amber-color{color: var(--wp--preset--color--luminous-vivid-amber) !important;}.has-light-green-cyan-color{color: var(--wp--preset--color--light-green-cyan) !important;}.has-vivid-green-cyan-color{color: var(--wp--preset--color--vivid-green-cyan) !important;}.has-pale-cyan-blue-color{color: var(--wp--preset--color--pale-cyan-blue) !important;}.has-vivid-cyan-blue-color{color: var(--wp--preset--color--vivid-cyan-blue) !important;}.has-vivid-purple-color{color: var(--wp--preset--color--vivid-purple) !important;}.has-black-background-color{background-color: var(--wp--preset--color--black) !important;}.has-cyan-bluish-gray-background-color{background-color: var(--wp--preset--color--cyan-bluish-gray) !important;}.has-white-background-color{background-color: var(--wp--preset--color--white) !important;}.has-pale-pink-background-color{background-color: var(--wp--preset--color--pale-pink) !important;}.has-vivid-red-background-color{background-color: var(--wp--preset--color--vivid-red) !important;}.has-luminous-vivid-orange-background-color{background-color: var(--wp--preset--color--luminous-vivid-orange) !important;}.has-luminous-vivid-amber-background-color{background-color: var(--wp--preset--color--luminous-vivid-amber) !important;}.has-light-green-cyan-background-color{background-color: var(--wp--preset--color--light-green-cyan) !important;}.has-vivid-green-cyan-background-color{background-color: var(--wp--preset--color--vivid-green-cyan) !important;}.has-pale-cyan-blue-background-color{background-color: var(--wp--preset--color--pale-cyan-blue) !important;}.has-vivid-cyan-blue-background-color{background-color: var(--wp--preset--color--vivid-cyan-blue) !important;}.has-vivid-purple-background-color{background-color: var(--wp--preset--color--vivid-purple) !important;}.has-black-border-color{border-color: var(--wp--preset--color--black) !important;}.has-cyan-bluish-gray-border-color{border-color: var(--wp--preset--color--cyan-bluish-gray) !important;}.has-white-border-color{border-color: var(--wp--preset--color--white) !important;}.has-pale-pink-border-color{border-color: var(--wp--preset--color--pale-pink) !important;}.has-vivid-red-border-color{border-color: var(--wp--preset--color--vivid-red) !important;}.has-luminous-vivid-orange-border-color{border-color: var(--wp--preset--color--luminous-vivid-orange) !important;}.has-luminous-vivid-amber-border-color{border-color: var(--wp--preset--color--luminous-vivid-amber) !important;}.has-light-green-cyan-border-color{border-color: var(--wp--preset--color--light-green-cyan) !important;}.has-vivid-green-cyan-border-color{border-color: var(--wp--preset--color--vivid-green-cyan) !important;}.has-pale-cyan-blue-border-color{border-color: var(--wp--preset--color--pale-cyan-blue) !important;}.has-vivid-cyan-blue-border-color{border-color: var(--wp--preset--color--vivid-cyan-blue) !important;}.has-vivid-purple-border-color{border-color: var(--wp--preset--color--vivid-purple) !important;}.has-vivid-cyan-blue-to-vivid-purple-gradient-background{background: var(--wp--preset--gradient--vivid-cyan-blue-to-vivid-purple) !important;}.has-light-green-cyan-to-vivid-green-cyan-gradient-background{background: var(--wp--preset--gradient--light-green-cyan-to-vivid-green-cyan) !important;}.has-luminous-vivid-amber-to-luminous-vivid-orange-gradient-background{background: var(--wp--preset--gradient--luminous-vivid-amber-to-luminous-vivid-orange) !important;}.has-luminous-vivid-orange-to-vivid-red-gradient-background{background: var(--wp--preset--gradient--luminous-vivid-orange-to-vivid-red) !important;}.has-very-light-gray-to-cyan-bluish-gray-gradient-background{background: var(--wp--preset--gradient--very-light-gray-to-cyan-bluish-gray) !important;}.has-cool-to-warm-spectrum-gradient-background{background: var(--wp--preset--gradient--cool-to-warm-spectrum) !important;}.has-blush-light-purple-gradient-background{background: var(--wp--preset--gradient--blush-light-purple) !important;}.has-blush-bordeaux-gradient-background{background: var(--wp--preset--gradient--blush-bordeaux) !important;}.has-luminous-dusk-gradient-background{background: var(--wp--preset--gradient--luminous-dusk) !important;}.has-pale-ocean-gradient-background{background: var(--wp--preset--gradient--pale-ocean) !important;}.has-electric-grass-gradient-background{background: var(--wp--preset--gradient--electric-grass) !important;}.has-midnight-gradient-background{background: var(--wp--preset--gradient--midnight) !important;}.has-small-font-size{font-size: var(--wp--preset--font-size--small) !important;}.has-medium-font-size{font-size: var(--wp--preset--font-size--medium) !important;}.has-large-font-size{font-size: var(--wp--preset--font-size--large) !important;}.has-x-large-font-size{font-size: var(--wp--preset--font-size--x-large) !important;}
:where(.wp-block-post-template.is-layout-flex){gap: 1.25em;}:where(.wp-block-post-template.is-layout-grid){gap: 1.25em;}
:where(.wp-block-columns.is-layout-flex){gap: 2em;}:where(.wp-block-columns.is-layout-grid){gap: 2em;}
:root :where(.wp-block-pullquote){font-size: 1.5em;line-height: 1.6;}</style>
<link rel='stylesheet' id='generate-style-css' href='https://randomnerdtutorials.com/wp-content/cache/flying-press/e87403c2e99d.all.min.css' media='all' />
<style id='generate-style-inline-css'>body{background-color:#ffffff;color:#3a3a3a;}a{color:#1b78e2;}a:visited{color:#1b78e2;}a:hover, a:focus, a:active{color:#000000;}body .grid-container{max-width:1380px;}.wp-block-group__inner-container{max-width:1380px;margin-left:auto;margin-right:auto;}.navigation-search{position:absolute;left:-99999px;pointer-events:none;visibility:hidden;z-index:20;width:100%;top:0;transition:opacity 100ms ease-in-out;opacity:0;}.navigation-search.nav-search-active{left:0;right:0;pointer-events:auto;visibility:visible;opacity:1;}.navigation-search input[type="search"]{outline:0;border:0;vertical-align:bottom;line-height:1;opacity:0.9;width:100%;z-index:20;border-radius:0;-webkit-appearance:none;height:60px;}.navigation-search input::-ms-clear{display:none;width:0;height:0;}.navigation-search input::-ms-reveal{display:none;width:0;height:0;}.navigation-search input::-webkit-search-decoration, .navigation-search input::-webkit-search-cancel-button, .navigation-search input::-webkit-search-results-button, .navigation-search input::-webkit-search-results-decoration{display:none;}.main-navigation li.search-item{z-index:21;}li.search-item.active{transition:opacity 100ms ease-in-out;}.nav-left-sidebar .main-navigation li.search-item.active,.nav-right-sidebar .main-navigation li.search-item.active{width:auto;display:inline-block;float:right;}.gen-sidebar-nav .navigation-search{top:auto;bottom:0;}:root{--contrast:#222222;--contrast-2:#575760;--contrast-3:#b2b2be;--base:#f0f0f0;--base-2:#f7f8f9;--base-3:#ffffff;--accent:#1e73be;}:root .has-contrast-color{color:var(--contrast);}:root .has-contrast-background-color{background-color:var(--contrast);}:root .has-contrast-2-color{color:var(--contrast-2);}:root .has-contrast-2-background-color{background-color:var(--contrast-2);}:root .has-contrast-3-color{color:var(--contrast-3);}:root .has-contrast-3-background-color{background-color:var(--contrast-3);}:root .has-base-color{color:var(--base);}:root .has-base-background-color{background-color:var(--base);}:root .has-base-2-color{color:var(--base-2);}:root .has-base-2-background-color{background-color:var(--base-2);}:root .has-base-3-color{color:var(--base-3);}:root .has-base-3-background-color{background-color:var(--base-3);}:root .has-accent-color{color:var(--accent);}:root .has-accent-background-color{background-color:var(--accent);}body, button, input, select, textarea{font-family:Helvetica;font-size:18px;}body{line-height:1.5;}p{margin-bottom:1.4em;}.entry-content > [class*="wp-block-"]:not(:last-child):not(.wp-block-heading){margin-bottom:1.4em;}.main-title{font-size:45px;}.main-navigation .main-nav ul ul li a{font-size:14px;}.widget-title{font-weight:600;}.sidebar .widget, .footer-widgets .widget{font-size:17px;}button:not(.menu-toggle),html input[type="button"],input[type="reset"],input[type="submit"],.button,.wp-block-button .wp-block-button__link{font-size:20px;}h1{font-weight:600;font-size:36px;margin-bottom:14px;}h2{font-weight:600;font-size:36px;line-height:1.3em;margin-bottom:18px;}h3{font-weight:600;line-height:1.3em;margin-bottom:10px;}h4{font-weight:600;font-size:20px;}h5{font-size:inherit;}@media (max-width:768px){.main-title{font-size:30px;}h1{font-size:27px;}h2{font-size:27px;}}.top-bar{background-color:#636363;color:#ffffff;}.top-bar a{color:#ffffff;}.top-bar a:hover{color:#303030;}.site-header{background-color:#ffffff;color:#3a3a3a;}.site-header a{color:#3a3a3a;}.main-title a,.main-title a:hover{color:#222222;}.site-description{color:#757575;}.main-navigation,.main-navigation ul ul{background-color:#2f4468;}.main-navigation .main-nav ul li a, .main-navigation .menu-toggle, .main-navigation .menu-bar-items{color:#ffffff;}.main-navigation .main-nav ul li:not([class*="current-menu-"]):hover > a, .main-navigation .main-nav ul li:not([class*="current-menu-"]):focus > a, .main-navigation .main-nav ul li.sfHover:not([class*="current-menu-"]) > a, .main-navigation .menu-bar-item:hover > a, .main-navigation .menu-bar-item.sfHover > a{color:#dee5ed;background-color:#2f4468;}button.menu-toggle:hover,button.menu-toggle:focus,.main-navigation .mobile-bar-items a,.main-navigation .mobile-bar-items a:hover,.main-navigation .mobile-bar-items a:focus{color:#ffffff;}.main-navigation .main-nav ul li[class*="current-menu-"] > a{color:#ffffff;background-color:rgba(10,10,10,0.31);}.navigation-search input[type="search"],.navigation-search input[type="search"]:active, .navigation-search input[type="search"]:focus, .main-navigation .main-nav ul li.search-item.active > a, .main-navigation .menu-bar-items .search-item.active > a{color:#dee5ed;background-color:#2f4468;}.main-navigation ul ul{background-color:#3f3f3f;}.main-navigation .main-nav ul ul li a{color:#ffffff;}.main-navigation .main-nav ul ul li:not([class*="current-menu-"]):hover > a,.main-navigation .main-nav ul ul li:not([class*="current-menu-"]):focus > a, .main-navigation .main-nav ul ul li.sfHover:not([class*="current-menu-"]) > a{color:#ffffff;background-color:#4f4f4f;}.main-navigation .main-nav ul ul li[class*="current-menu-"] > a{color:#ffffff;background-color:#4f4f4f;}.separate-containers .inside-article, .separate-containers .comments-area, .separate-containers .page-header, .one-container .container, .separate-containers .paging-navigation, .inside-page-header{background-color:#ffffff;}.entry-title a{color:#2f4468;}.entry-title a:hover{color:#0a0000;}.entry-meta{color:#878787;}.entry-meta a{color:#727272;}.entry-meta a:hover{color:#0a0101;}.sidebar .widget{background-color:#ffffff;}.sidebar .widget .widget-title{color:#000000;}.footer-widgets{color:#ffffff;background-color:#2f4468;}.footer-widgets a{color:#ffffff;}.footer-widgets .widget-title{color:#ffffff;}.site-info{color:#2f4468;}.site-info a{color:#2f4468;}.site-info a:hover{color:#0a0a0a;}.footer-bar .widget_nav_menu .current-menu-item a{color:#0a0a0a;}input[type="text"],input[type="email"],input[type="url"],input[type="password"],input[type="search"],input[type="tel"],input[type="number"],textarea,select{color:#666666;background-color:#fafafa;border-color:#cccccc;}input[type="text"]:focus,input[type="email"]:focus,input[type="url"]:focus,input[type="password"]:focus,input[type="search"]:focus,input[type="tel"]:focus,input[type="number"]:focus,textarea:focus,select:focus{color:#666666;background-color:#ffffff;border-color:#bfbfbf;}button,html input[type="button"],input[type="reset"],input[type="submit"],a.button,a.wp-block-button__link:not(.has-background){color:#ffffff;background-color:#2f4468;}button:hover,html input[type="button"]:hover,input[type="reset"]:hover,input[type="submit"]:hover,a.button:hover,button:focus,html input[type="button"]:focus,input[type="reset"]:focus,input[type="submit"]:focus,a.button:focus,a.wp-block-button__link:not(.has-background):active,a.wp-block-button__link:not(.has-background):focus,a.wp-block-button__link:not(.has-background):hover{color:#ffffff;background-color:#0c2c68;}a.generate-back-to-top{background-color:rgba( 0,0,0,0.4 );color:#ffffff;}a.generate-back-to-top:hover,a.generate-back-to-top:focus{background-color:rgba( 0,0,0,0.6 );color:#ffffff;}:root{--gp-search-modal-bg-color:var(--base-3);--gp-search-modal-text-color:var(--contrast);--gp-search-modal-overlay-bg-color:rgba(0,0,0,0.2);}@media (max-width: 768px){.main-navigation .menu-bar-item:hover > a, .main-navigation .menu-bar-item.sfHover > a{background:none;color:#ffffff;}}.inside-top-bar{padding:10px;}.inside-header{padding:0px;}.separate-containers .inside-article, .separate-containers .comments-area, .separate-containers .page-header, .separate-containers .paging-navigation, .one-container .site-content, .inside-page-header{padding:10px 8px 8px 8px;}.site-main .wp-block-group__inner-container{padding:10px 8px 8px 8px;}.entry-content .alignwide, body:not(.no-sidebar) .entry-content .alignfull{margin-left:-8px;width:calc(100% + 16px);max-width:calc(100% + 16px);}.one-container.right-sidebar .site-main,.one-container.both-right .site-main{margin-right:8px;}.one-container.left-sidebar .site-main,.one-container.both-left .site-main{margin-left:8px;}.one-container.both-sidebars .site-main{margin:0px 8px 0px 8px;}.separate-containers .widget, .separate-containers .site-main > *, .separate-containers .page-header, .widget-area .main-navigation{margin-bottom:8px;}.separate-containers .site-main{margin:8px;}.both-right.separate-containers .inside-left-sidebar{margin-right:4px;}.both-right.separate-containers .inside-right-sidebar{margin-left:4px;}.both-left.separate-containers .inside-left-sidebar{margin-right:4px;}.both-left.separate-containers .inside-right-sidebar{margin-left:4px;}.separate-containers .page-header-image, .separate-containers .page-header-contained, .separate-containers .page-header-image-single, .separate-containers .page-header-content-single{margin-top:8px;}.separate-containers .inside-right-sidebar, .separate-containers .inside-left-sidebar{margin-top:8px;margin-bottom:8px;}.rtl .menu-item-has-children .dropdown-menu-toggle{padding-left:20px;}.rtl .main-navigation .main-nav ul li.menu-item-has-children > a{padding-right:20px;}.widget-area .widget{padding:10px 2px 4px 2px;}.site-info{padding:20px;}@media (max-width:768px){.separate-containers .inside-article, .separate-containers .comments-area, .separate-containers .page-header, .separate-containers .paging-navigation, .one-container .site-content, .inside-page-header{padding:30px;}.site-main .wp-block-group__inner-container{padding:30px;}.site-info{padding-right:10px;padding-left:10px;}.entry-content .alignwide, body:not(.no-sidebar) .entry-content .alignfull{margin-left:-30px;width:calc(100% + 60px);max-width:calc(100% + 60px);}}/* End cached CSS */@media (max-width: 768px){.main-navigation .menu-toggle,.main-navigation .mobile-bar-items,.sidebar-nav-mobile:not(#sticky-placeholder){display:block;}.main-navigation ul,.gen-sidebar-nav{display:none;}[class*="nav-float-"] .site-header .inside-header > *{float:none;clear:both;}}
.dynamic-author-image-rounded{border-radius:100%;}.dynamic-featured-image, .dynamic-author-image{vertical-align:middle;}.one-container.blog .dynamic-content-template:not(:last-child), .one-container.archive .dynamic-content-template:not(:last-child){padding-bottom:0px;}.dynamic-entry-excerpt > p:last-child{margin-bottom:0px;}
.main-navigation .navigation-logo img {height:60px;}@media (max-width: 1390px) {.main-navigation .navigation-logo.site-logo {margin-left:0;}body.sticky-menu-logo.nav-float-left .main-navigation .site-logo.navigation-logo {margin-right:0;}}.main-navigation .main-nav ul li a,.menu-toggle,.main-navigation .mobile-bar-items a{transition: line-height 300ms ease}.main-navigation.toggled .main-nav > ul{background-color: #2f4468}</style>
<link rel='stylesheet' id='generate-font-icons-css' href='https://randomnerdtutorials.com/wp-content/cache/flying-press/b77f9e5ba86f.font-icons.min.css' media='all' />
<link rel='stylesheet' id='generate-child-css' href='https://randomnerdtutorials.com/wp-content/cache/flying-press/f80ef9a1321c.style.css' media='all' />
<link rel='stylesheet' id='elementor-frontend-css' href='https://randomnerdtutorials.com/wp-content/cache/flying-press/7c038aa5b3f0.frontend.min.css' media='all' />
<link rel='stylesheet' id='widget-heading-css' href='https://randomnerdtutorials.com/wp-content/cache/flying-press/a94f5ad22794.widget-heading.min.css' media='all' />
<link rel='stylesheet' id='widget-text-editor-css' href='https://randomnerdtutorials.com/wp-content/cache/flying-press/22bfff108c9d.widget-text-editor.min.css' media='all' />
<link rel='stylesheet' id='widget-form-css' href='https://randomnerdtutorials.com/wp-content/cache/flying-press/2d9dc692b152.widget-form.min.css' media='all' />
<link rel='stylesheet' id='e-animation-zoomIn-css' href='https://randomnerdtutorials.com/wp-content/cache/flying-press/7339af1b7f9c.zoomIn.min.css' media='all' />
<link rel='stylesheet' id='elementor-icons-css' href='https://randomnerdtutorials.com/wp-content/cache/flying-press/99b2b23e8775.elementor-icons.min.css' media='all' />
<link rel='stylesheet' id='swiper-css' href='https://randomnerdtutorials.com/wp-content/cache/flying-press/a2431bc290cf.swiper.min.css' media='all' />
<link rel='stylesheet' id='e-swiper-css' href='https://randomnerdtutorials.com/wp-content/cache/flying-press/f9a4d42bf664.e-swiper.min.css' media='all' />
<link rel='stylesheet' id='elementor-post-94299-css' href='https://randomnerdtutorials.com/wp-content/cache/flying-press/ed31998fdd64.post-94299.css' media='all' />
<link rel='stylesheet' id='e-popup-style-css' href='https://randomnerdtutorials.com/wp-content/cache/flying-press/6f95bbac11f1.popup.min.css' media='all' />
<link rel='stylesheet' id='font-awesome-5-all-css' href='https://randomnerdtutorials.com/wp-content/cache/flying-press/74bab4578692.all.min.css' media='all' />
<link rel='stylesheet' id='font-awesome-4-shim-css' href='https://randomnerdtutorials.com/wp-content/cache/flying-press/c55205bce667.v4-shims.min.css' media='all' />
<link rel='stylesheet' id='elementor-post-83058-css' href='https://randomnerdtutorials.com/wp-content/cache/flying-press/0e3e95a9eefa.post-83058.css' media='all' />
<link rel='stylesheet' id='generate-sticky-css' href='https://randomnerdtutorials.com/wp-content/cache/flying-press/858f6e0503fe.sticky.min.css' media='all' />
<link rel='stylesheet' id='generate-menu-logo-css' href='https://randomnerdtutorials.com/wp-content/cache/flying-press/c1185c7ce5bc.menu-logo.min.css' media='all' />
<style id='generate-menu-logo-inline-css'>@media (max-width: 768px){.sticky-menu-logo .navigation-stick:not(.mobile-header-navigation) .menu-toggle,.menu-logo .main-navigation:not(.mobile-header-navigation) .menu-toggle{display:inline-block;clear:none;width:auto;float:right;}.sticky-menu-logo .navigation-stick:not(.mobile-header-navigation) .mobile-bar-items,.menu-logo .main-navigation:not(.mobile-header-navigation) .mobile-bar-items{position:relative;float:right;}.regular-menu-logo .main-navigation:not(.navigation-stick):not(.mobile-header-navigation) .menu-toggle{display:inline-block;clear:none;width:auto;float:right;}.regular-menu-logo .main-navigation:not(.navigation-stick):not(.mobile-header-navigation) .mobile-bar-items{position:relative;float:right;}body[class*="nav-float-"].menu-logo-enabled:not(.sticky-menu-logo) .main-navigation .main-nav{display:block;}.sticky-menu-logo.nav-float-left .navigation-stick:not(.mobile-header-navigation) .menu-toggle,.menu-logo.nav-float-left .main-navigation:not(.mobile-header-navigation) .menu-toggle,.regular-menu-logo.nav-float-left .main-navigation:not(.navigation-stick):not(.mobile-header-navigation) .menu-toggle{float:left;}}</style>
<link rel='stylesheet' id='google-fonts-1-css' href="https://randomnerdtutorials.com/wp-content/cache/flying-press/627a94a572b6.600acba18df6.google-font.css" media='all' />
<script src="https://randomnerdtutorials.com/wp-includes/js/jquery/jquery.min.js?ver=826eb77e86b0" id="jquery-core-js"></script>
<script async="async" data-noptimize="1" data-cfasync="false" src="https://scripts.mediavine.com/tags/random-nerd-tutorials.js?ver=6.6.2" id="mv-script-wrapper-js"></script>
<script src="https://randomnerdtutorials.com/wp-content/plugins/elementor/assets/lib/font-awesome/js/v4-shims.min.js?ver=ef17c8ffc514" id="font-awesome-4-shim-js" defer></script>
<link rel="https://api.w.org/" href="https://randomnerdtutorials.com/wp-json/" /><link rel="alternate" title="JSON" type="application/json" href="https://randomnerdtutorials.com/wp-json/wp/v2/posts/144635" /><link rel="EditURI" type="application/rsd+xml" title="RSD" href="https://randomnerdtutorials.com/xmlrpc.php?rsd" />
<meta name="generator" content="WordPress 6.6.2" />
<link rel='shortlink' href='https://randomnerdtutorials.com/?p=144635' />
<link rel="alternate" title="oEmbed (JSON)" type="application/json+oembed" href="https://randomnerdtutorials.com/wp-json/oembed/1.0/embed?url=https%3A%2F%2Frandomnerdtutorials.com%2Fraspberry-pi-pico-web-server-micropython%2F" />
<link rel="alternate" title="oEmbed (XML)" type="text/xml+oembed" href="https://randomnerdtutorials.com/wp-json/oembed/1.0/embed?url=https%3A%2F%2Frandomnerdtutorials.com%2Fraspberry-pi-pico-web-server-micropython%2F&#038;format=xml" />
<meta name="generator" content="Elementor 3.25.6; features: additional_custom_breakpoints, e_optimized_control_loading; settings: css_print_method-external, google_font-enabled, font_display-auto">
<style>.e-con.e-parent:nth-of-type(n+4):not(.e-lazyloaded):not(.e-no-lazyload),
.e-con.e-parent:nth-of-type(n+4):not(.e-lazyloaded):not(.e-no-lazyload) * {
background-image: none !important;
}
@media screen and (max-height: 1024px) {
.e-con.e-parent:nth-of-type(n+3):not(.e-lazyloaded):not(.e-no-lazyload),
.e-con.e-parent:nth-of-type(n+3):not(.e-lazyloaded):not(.e-no-lazyload) * {
background-image: none !important;
}
}
@media screen and (max-height: 640px) {
.e-con.e-parent:nth-of-type(n+2):not(.e-lazyloaded):not(.e-no-lazyload),
.e-con.e-parent:nth-of-type(n+2):not(.e-lazyloaded):not(.e-no-lazyload) * {
background-image: none !important;
}
}</style>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script src="https://www.googletagmanager.com/gtag/js?id=UA-41273278-2" defer></script>
<script src="data:text/javascript,window.dataLayer%20%3D%20window.dataLayer%20%7C%7C%20%5B%5D%3B%0D%0A%20%20function%20gtag%28%29%7BdataLayer.push%28arguments%29%3B%7D%0D%0A%20%20gtag%28%27js%27%2C%20new%20Date%28%29%29%3B%0D%0A%0D%0A%20%20gtag%28%27config%27%2C%20%27UA-41273278-2%27%29%3B" defer></script>
<style>@media ( min-width: 782px ) {
.skip-link {
display:none;
}
}
.is-logo-image {
width: 145px;
height: 60px;
}
.rntn-top-menu {
background: #edeff3;
border-radius: 4px;
padding: 4px 8px;
margin: 4px;
}
.rnt-menu-top-links a {
text-decoration: none;
color: #3a3a3a ;
}
.rnt-menu-top-links a:hover { text-decoration: underline; color: #3a3a3a; }</style><link rel="icon" href="https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2018/03/n-favicon-2018.png?fit=16%2C16&#038;quality=100&#038;strip=all&#038;ssl=1" sizes="32x32" />
<link rel="icon" href="https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2018/03/n-favicon-2018.png?fit=16%2C16&#038;quality=100&#038;strip=all&#038;ssl=1" sizes="192x192" />
<link rel="apple-touch-icon" href="https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2018/03/n-favicon-2018.png?fit=16%2C16&#038;quality=100&#038;strip=all&#038;ssl=1" />
<meta name="msapplication-TileImage" content="https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2018/03/n-favicon-2018.png?fit=16%2C16&#038;quality=100&#038;strip=all&#038;ssl=1" />
</head>
<body data-rsssl=1 class="post-template-default single single-post postid-144635 single-format-standard wp-embed-responsive post-image-above-header post-image-aligned-center sticky-menu-no-transition sticky-enabled menu-logo menu-logo-enabled both-sticky-menu both-sidebars nav-above-header separate-containers fluid-header active-footer-widgets-0 nav-search-enabled nav-aligned-center header-aligned-center dropdown-hover elementor-default elementor-kit-94299 elementor-page-82536" itemtype="https://schema.org/Blog" itemscope>
<a class="screen-reader-text skip-link" href="#content" title="Skip to content">Skip to content</a> <nav class="auto-hide-sticky main-navigation sub-menu-right" id="site-navigation" aria-label="Primary" itemtype="https://schema.org/SiteNavigationElement" itemscope>
<div class="inside-navigation grid-container grid-parent">
<div class="site-logo sticky-logo navigation-logo">
<a href="https://randomnerdtutorials.com/" title="Random Nerd Tutorials" rel="home">
<img src="https://randomnerdtutorials.com/wp-content/uploads/2016/04/logornt.png" alt="Random Nerd Tutorials" class="is-logo-image" width="250" height="80" loading="eager" fetchpriority="high" decoding="async"/>
</a>
</div><form method="get" class="search-form navigation-search" action="https://randomnerdtutorials.com/">
<input type="search" class="search-field" value="" name="s" title="Search" />
</form> <div class="mobile-bar-items">
<span class="search-item">
<a aria-label="Open Search Bar" href="#">
</a>
</span>
</div>
<button class="menu-toggle" aria-controls="primary-menu" aria-expanded="false">
<span class="mobile-menu">Menu</span> </button>
<div id="primary-menu" class="main-nav"><ul id="menu-newtop" class=" menu sf-menu"><li id="menu-item-20487" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-20487"><a href="https://randomnerdtutorials.com/download">Free eBooks</a></li>
<li id="menu-item-20484" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-20484"><a href="https://randomnerdtutorials.com/about">About</a></li>
<li id="menu-item-20485" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-20485"><a href="https://randomnerdtutorials.com/contact">Contact</a></li>
<li id="menu-item-68854" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-68854"><a target="_blank" rel="noopener" href="https://rntlab.com/login">Courses Login</a></li>
<li id="menu-item-20483" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-20483"><a href="https://randomnerdtutorials.com/courses/"><strong>Get Courses</strong><span role="presentation" class="dropdown-menu-toggle"></span></a>
<ul class="sub-menu">
<li id="menu-item-40154" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-40154"><a href="https://randomnerdtutorials.com/courses/"><strong>All eBooks &#038; Courses</strong></a></li>
<li id="menu-item-159548" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-159548"><a href="https://randomnerdtutorials.com/learn-lvgl-esp32-ebook/"><strong>🔥 Learn LVGL: Build GUIs for ESP32 Projects</strong></a></li>
<li id="menu-item-116277" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-116277"><a href="https://randomnerdtutorials.com/smart-home-ebook/">Smart Home with Raspberry Pi, ESP32, and ESP8266</a></li>
<li id="menu-item-69105" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-69105"><a href="https://randomnerdtutorials.com/learn-esp32-with-arduino-ide/">Learn ESP32 with Arduino IDE</a></li>
<li id="menu-item-100940" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-100940"><a href="https://randomnerdtutorials.com/build-web-servers-esp32-esp8266-ebook/">Build Web Servers with ESP32 and ESP8266</a></li>
<li id="menu-item-108037" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-108037"><a href="https://randomnerdtutorials.com/firebase-esp32-esp8266-ebook/">Firebase Web App with ESP32 and ESP8266</a></li>
<li id="menu-item-96038" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-96038"><a href="https://randomnerdtutorials.com/esp32-cam-projects-ebook/">Build ESP32-CAM Projects</a></li>
<li id="menu-item-83302" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-83302"><a href="https://randomnerdtutorials.com/micropython-programming-with-esp32-and-esp8266/">MicroPython Programming with ESP32 and ESP8266</a></li>
<li id="menu-item-40149" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-40149"><a href="https://randomnerdtutorials.com/home-automation-using-esp8266/">Home Automation Using ESP8266</a></li>
<li id="menu-item-149647" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-149647"><a href="https://randomnerdtutorials.com/raspberry-pi-pico-w-micropython-ebook/">Learn Raspberry Pi Pico/Pico W with MicroPython</a></li>
<li id="menu-item-40151" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-40151"><a href="https://randomnerdtutorials.com/arduino-step-by-step-projects/">Arduino Step-by-step Projects</a></li>
<li id="menu-item-40153" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-40153"><a href="https://randomnerdtutorials.com/android-apps-for-arduino-with-mit-app-inventor-2/">Android Apps For Arduino</a></li>
<li id="menu-item-40152" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-40152"><a href="https://randomnerdtutorials.com/electronics-for-beginners/">Electronics For Beginners</a></li>
</ul>
</li>
<li class="search-item menu-item-align-right"><a aria-label="Open Search Bar" href="#"></a></li></ul></div> </div>
</nav>
<header class="site-header" id="masthead" aria-label="Site" itemtype="https://schema.org/WPHeader" itemscope>
<div class="inside-header">
</div>
</header>
<div class="site grid-container container hfeed grid-parent" id="page">
<div class="rnt-menu-top-links" style="margin-top: 10px; padding: 10px;">
<a class="rntn-top-menu" href="https://randomnerdtutorials.com/">HOME</a>
<a class="rntn-top-menu" href="https://randomnerdtutorials.com/projects-esp32/">ESP32</a>
<a class="rntn-top-menu" href="https://randomnerdtutorials.com/projects-esp8266/">ESP8266</a>
<a class="rntn-top-menu" href="https://randomnerdtutorials.com/projects-esp32-cam/">ESP32-CAM</a>
<a class="rntn-top-menu" href="https://randomnerdtutorials.com/projects-raspberry-pi/">RASPBERRY PI</a>
<a class="rntn-top-menu" href="https://randomnerdtutorials.com/projects-esp32-esp8266-micropython/">MICROPYTHON</a>
<a class="rntn-top-menu" href="https://randomnerdtutorials.com/projects-raspberry-pi-pico/">RPi PICO</a>
<a class="rntn-top-menu" href="https://randomnerdtutorials.com/projects-arduino/">ARDUINO</a>
<a class="rntn-top-menu" href="https://makeradvisor.com/" target="_blank" rel="noopener">REVIEWS</a>
</div> <div class="site-content" id="content">
<div class="content-area grid-parent mobile-grid-100 push-15 grid-60 tablet-push-15 tablet-grid-60" id="primary">
<main class="site-main" id="main">
<article id="post-144635" class="post-144635 post type-post status-publish format-standard has-post-thumbnail hentry category-raspberry-pi-pico category-raspberry-pi-pico-micropython mv-content-wrapper" itemtype="https://schema.org/CreativeWork" itemscope>
<div class="inside-article">
<header class="entry-header">
<h1 class="entry-title" itemprop="headline">Raspberry Pi Pico: Web Server (MicroPython)</h1> </header>
<div class="entry-content" itemprop="text">
<p>In this guide, you&#8217;ll learn how to create a basic Raspberry Pi Pico local web server to control outputs and fetch data. As an example, we&#8217;ll create a web page to control an LED on and off and fetch some random values generated by the Pico. This example can be easily modified or extended to control multiple outputs and fetch data from sensors instead of random numbers.</p>
<div class="wp-block-image">
<figure class="aligncenter size-full"><img data-recalc-dims="1" fetchpriority="high" decoding="async" width="828" height="466" src="https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-Web-Server-Micropython.jpg?resize=828%2C466&#038;quality=100&#038;strip=all&#038;ssl=1" alt="Raspberry Pi Pico Basic Web Server MicroPython" class="wp-image-144648" srcset="https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-Web-Server-Micropython.jpg?w=1280&amp;quality=100&amp;strip=all&amp;ssl=1 1280w, https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-Web-Server-Micropython.jpg?resize=300%2C169&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-Web-Server-Micropython.jpg?resize=1024%2C576&amp;quality=100&amp;strip=all&amp;ssl=1 1024w, https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-Web-Server-Micropython.jpg?resize=768%2C432&amp;quality=100&amp;strip=all&amp;ssl=1 768w" sizes="(max-width: 828px) 100vw, 828px" loading="eager"/></figure></div>
<p class="rntbox rntcred">This tutorial is <strong>only compatible with the Raspberry Pi Pico W</strong> that comes with Wi-Fi support. Throughout this tutorial whenever we refer to the Raspberry Pi Pico, we&#8217;re referring to the Raspberry Pi Pico W.</p>
<p class="rntbox rntclblue"><strong>New to the Raspberry Pi Pico?</strong> Start here: <a href="https://randomnerdtutorials.com/getting-started-raspberry-pi-pico-w/" title="">Getting Started with Raspberry Pi Pico</a>.</p>
<p><strong>Table of Contents</strong></p>
<p>This tutorial covers the following topics:</p>
<ul class="wp-block-list">
<li><a href="#web-server-basic-concepts" title="">Introducing Basic Web Server Concepts</a>
<ul class="wp-block-list">
<li><a href="#pico-web-server" title="">The Raspberry Pi Pico as a Web Server</a></li>
<li><a href="#client-server" title="">Client and Server</a></li>
<li><a href="#ip-address" title="">IP Address</a></li>
<li><a href="#sockets" title="">Sockets</a></li>
</ul>
</li>
<li><a href="#project-overview" title="">Project Overview</a></li>
<li><a href="#html-page" title="">Creating the HTML Page</a></li>
<li><a href="#raspberry-pi-pico-web-server-micropython-code" title="">Raspberry Pi Pico Web Server &#8211; MicroPython Script</a>
<ul class="wp-block-list">
<li><a href="#how-code-works" title="">How does the code work?</a></li>
</ul>
</li>
<li><a href="#demonstration" title="">Raspberry Pi Pico Web Server Demonstration</a></li>
</ul>
<h2 class="wp-block-heading" id="prerequisites">Prerequisites &#8211; MicroPython Firmware</h2>
<p>To follow this tutorial you need MicroPython firmware installed in your Raspberry Pi Pico board. You also need an IDE to write and upload the code to your board. </p>
<p>The recommended MicroPython IDE for the Raspberry Pi Pico is Thonny IDE. Follow the next tutorial to learn how to install Thonny IDE, flash MicroPython firmware, and upload code to the board.</p>
<ul class="wp-block-list">
<li><a href="https://randomnerdtutorials.com/getting-started-raspberry-pi-pico-w/#install-thonny-ide" title="">Programming Raspberry Pi Pico using MicroPython</a></li>
</ul>
<h2 class="wp-block-heading" id="web-server-basic-concepts">Introducing Basic Concepts</h2>
<p class="rntbox rntclgreen">Already familiar with basic web server concepts? <a href="#project-overview" title="">Jump to the Project Overview section</a>.</p>
<h3 class="wp-block-heading" id="pico-web-server">The Raspberry Pi Pico as a Web Server</h3>
<p>In simple terms, a web server is a “computer” that provides web pages. It stores the websites files, including all HTML documents and related assets like images, CSS style sheets, fonts, and/or other files. It also brings those files to the users web browser device when the user makes a request to the server.</p>
<div class="wp-block-image">
<figure class="aligncenter size-full"><img data-recalc-dims="1" decoding="async" width="828" height="256" src="https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-Web-Server-example.png?resize=828%2C256&#038;quality=100&#038;strip=all&#038;ssl=1" alt="Raspberry Pi Pico Web Server" class="wp-image-144691" srcset="https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-Web-Server-example.png?w=1135&amp;quality=100&amp;strip=all&amp;ssl=1 1135w, https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-Web-Server-example.png?resize=300%2C93&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-Web-Server-example.png?resize=1024%2C317&amp;quality=100&amp;strip=all&amp;ssl=1 1024w, https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-Web-Server-example.png?resize=768%2C238&amp;quality=100&amp;strip=all&amp;ssl=1 768w" sizes="(max-width: 828px) 100vw, 828px" loading="eager" fetchpriority="high"/></figure></div>
<p>When using the Raspberry Pi Pico as a web server, you&#8217;re essentially turning it into a small computer that stores and provides web pages. As users access a web page, their browsers send requests to the Pico using Hypertext Transfer Protocol (HTTP). The Pico then responds by sending back the requested web page.</p>
<h3 class="wp-block-heading" id="client-server">Client and Server</h3>
<p>When you type a URL in your browser,&nbsp;in the background, you (the client) send a request via Hypertext Transfer Protocol (HTTP) to a server. When the server receives the request, it sends a response through HTTP, and you will see the web page requested in your browser. Clients and servers communicate over a computer network.</p>
<p>In simple terms, clients make requests to servers. Servers handle the clients requests. In this particular tutorial, the Raspberry Pi Pico will be the server, and you (your browser) will be the client.</p>
<h3 class="wp-block-heading" id="ip-address">Ip Address</h3>
<p>An IP address is a numerical label assigned to each device connected to a computer network. It is a series of four values separated by periods with each value ranging from 0 to 255. Heres an example:</p>
<pre class="wp-block-code"><code>192.168.1.75</code></pre>
<p>At home, your devices are connected to a private network through your router (local network). All devices connected to your router are part of your local network. Inside this network, each device has its own IP address.</p>
<p>Devices that are connected to the same router can access each other via the IP address. Devices outside your local network cant access your local devices using their local IP address.</p>
<p>When you connect your Raspberry Pi Pico to your router, it becomes part of your local network. So, it will be assigned a unique local IP address and you can access it from your computer on your local network.</p>
<h3 class="wp-block-heading" id="sockets">Sockets</h3>
<p>Well create our web server using <em>sockets </em>and the <a href="https://docs.python.org/3/library/socket.html" target="_blank" rel="noopener" title="">Python socket API</a>.</p>
<p>Sockets and the socket API are used to send messages across a network. They provide a form of&nbsp;inter-process communication (IPC).&nbsp;</p>
<p>Sockets can be used in client-server applications, where one side acts as the server and waits for connections from clients thats what well do here (the Raspberry Pi Pico is a server waiting for connections from clients).</p>
<h2 class="wp-block-heading" id="project-overview">Project Overview</h2>
<p>Before going straight to the project, it is important to outline what our web server will do so that it is easier to understand how everything works.</p>
<p>We&#8217;ll create a simple web page with two buttons to control the Raspberry Pi Pico onboard LED on and off. The web page also has another button to request a new random value (this can easily be modified to request sensor readings).</p>
<div class="wp-block-image">
<figure class="aligncenter size-full"><img data-recalc-dims="1" decoding="async" width="716" height="471" src="https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-WebServer.png?resize=716%2C471&#038;quality=100&#038;strip=all&#038;ssl=1" alt="Raspberry Pi Pico Basic Web Server basic example" class="wp-image-144652" srcset="https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-WebServer.png?w=716&amp;quality=100&amp;strip=all&amp;ssl=1 716w, https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-WebServer.png?resize=300%2C197&amp;quality=100&amp;strip=all&amp;ssl=1 300w" sizes="(max-width: 716px) 100vw, 716px" loading="eager" fetchpriority="high"/></figure></div>
<p>Here&#8217;s a quick explanation of how everything works.</p>
<p>When you enter the Raspberry Pi Pico address on your web browser, you&#8217;re making a request to the Raspberry Pi Pico on the root (/) URL. When it receives that request, it responds with the HTML to build the web page we&#8217;ve seen previously.</p>
<div class="wp-block-image">
<figure class="aligncenter size-full"><img data-recalc-dims="1" loading="eager" decoding="async" width="828" height="446" src="https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-it-works-1.png?resize=828%2C446&#038;quality=100&#038;strip=all&#038;ssl=1" alt="Raspberry Pi Pico Basic Web Server how it works request response" class="wp-image-144651" srcset="https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-it-works-1.png?w=1167&amp;quality=100&amp;strip=all&amp;ssl=1 1167w, https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-it-works-1.png?resize=300%2C162&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-it-works-1.png?resize=1024%2C552&amp;quality=100&amp;strip=all&amp;ssl=1 1024w, https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-it-works-1.png?resize=768%2C414&amp;quality=100&amp;strip=all&amp;ssl=1 768w" sizes="(max-width: 828px) 100vw, 828px" fetchpriority="high"/></figure></div>
<p>When you click on the <em>Light on</em> button, it makes a request on the <strong>/lighton?</strong> URL. When it receives that request, it turns the onboard LED on and sends the web page with the updated LED state.</p>
<p>When you click on the <em>Light off</em> button, a request is made on the <strong>/lightoff? </strong>URL. When that happens, it will turn off the LED and send the web page with the current LED state.</p>
<div class="wp-block-image">
<figure class="aligncenter size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="828" height="442" src="https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-it-works-2.png?resize=828%2C442&#038;quality=100&#038;strip=all&#038;ssl=1" alt="Raspberry Pi Pico Basic Web Server How it Works Diagram" class="wp-image-144653" srcset="https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-it-works-2.png?w=1280&amp;quality=100&amp;strip=all&amp;ssl=1 1280w, https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-it-works-2.png?resize=300%2C160&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-it-works-2.png?resize=1024%2C547&amp;quality=100&amp;strip=all&amp;ssl=1 1024w, https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-it-works-2.png?resize=768%2C410&amp;quality=100&amp;strip=all&amp;ssl=1 768w" sizes="(max-width: 828px) 100vw, 828px" fetchpriority="low"/></figure></div>
<p>Finally, we also have a button to request a random value from the Raspberry Pi Pico. This can be easily modified to request sensor readings or any other useful piece of information. That button sends a request on the <strong>/value?</strong> URL. When the Pico receives that request, it generates a new random value and sends the HTML page updated with that new value.</p>
<div class="wp-block-image">
<figure class="aligncenter size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="828" height="340" src="https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-it-works-3.png?resize=828%2C340&#038;quality=100&#038;strip=all&#038;ssl=1" alt="Basic Raspberry Pi Pico Web Server Request a new value" class="wp-image-144654" srcset="https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-it-works-3.png?w=1280&amp;quality=100&amp;strip=all&amp;ssl=1 1280w, https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-it-works-3.png?resize=300%2C123&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-it-works-3.png?resize=1024%2C421&amp;quality=100&amp;strip=all&amp;ssl=1 1024w, https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-it-works-3.png?resize=768%2C316&amp;quality=100&amp;strip=all&amp;ssl=1 768w" sizes="(max-width: 828px) 100vw, 828px" fetchpriority="low"/></figure></div>
<h2 class="wp-block-heading" id="html-page">The HTML Page</h2>
<p>Below you can find the HTML we&#8217;ll use to build the web page:</p>
<pre class="wp-block-code language-html"><code>&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Pico Web Server&lt;/title&gt;
&lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Raspberry Pi Pico Web Server&lt;/h1&gt;
&lt;h2&gt;Led Control&lt;/h2&gt;
&lt;form action="./lighton"&gt;
&lt;input type="submit" value="Light on" /&gt;
&lt;/form&gt;
&lt;br&gt;
&lt;form action="./lightoff"&gt;
&lt;input type="submit" value="Light off" /&gt;
&lt;/form&gt;
&lt;p&gt;LED state: <strong>{state}</strong>&lt;/p&gt;
&lt;h2&gt;Fetch New Value&lt;/h2&gt;
&lt;form action="./value"&gt;
&lt;input type="submit" value="Fetch value" /&gt;
&lt;/form&gt;
&lt;p&gt;Fetched value: <strong>{random_value}</strong>&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</code></pre>
<p>In this particular example, we&#8217;ll save the contents of the HTML file in a variable in our MicroPython script (but, it can also be saved in a file in the Raspberry Pi Pico filesystem—not covered in this tutorial).</p>
<p>This HTML structure creates a basic web page for controlling an LED and fetching a random value, for interaction with a Raspberry Pi Pico web server.</p>
<p>The <span class="rnthl rntliteral">{state}</span> and <span class="rnthl rntliteral">{random_value}</span> variables are meant to be dynamically populated with values from the server-side logic.</p>
<p>In summary, this HTML creates three different forms with buttons.</p>
<h2 class="wp-block-heading" id="raspberry-pi-pico-web-server-micropython-code">Raspberry Pi Pico Web Server &#8211; MicroPython Script</h2>
<p>Create a new file in Thonny IDE and copy the following code.</p>
<pre style="max-height: 40em; margin-bottom: 20px;"><code class="language-python"># Complete project details at https://RandomNerdTutorials.com/raspberry-pi-pico-web-server-micropython/
# Import necessary modules
import network
import socket
import time
import random
from machine import Pin
# Create an LED object on pin 'LED'
led = Pin('LED', Pin.OUT)
# Wi-Fi credentials
ssid = 'REPLACE_WITH_YOUR_SSID'
password = 'REPLACE_WITH_YOUR_PASSWORD'
# HTML template for the webpage
def webpage(random_value, state):
html = f&quot;&quot;&quot;
&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Pico Web Server&lt;/title&gt;
&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1&quot;&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Raspberry Pi Pico Web Server&lt;/h1&gt;
&lt;h2&gt;Led Control&lt;/h2&gt;
&lt;form action=&quot;./lighton&quot;&gt;
&lt;input type=&quot;submit&quot; value=&quot;Light on&quot; /&gt;
&lt;/form&gt;
&lt;br&gt;
&lt;form action=&quot;./lightoff&quot;&gt;
&lt;input type=&quot;submit&quot; value=&quot;Light off&quot; /&gt;
&lt;/form&gt;
&lt;p&gt;LED state: {state}&lt;/p&gt;
&lt;h2&gt;Fetch New Value&lt;/h2&gt;
&lt;form action=&quot;./value&quot;&gt;
&lt;input type=&quot;submit&quot; value=&quot;Fetch value&quot; /&gt;
&lt;/form&gt;
&lt;p&gt;Fetched value: {random_value}&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;
&quot;&quot;&quot;
return str(html)
# Connect to WLAN
wlan = network.WLAN(network.STA_IF)
wlan.active(True)
wlan.connect(ssid, password)
# Wait for Wi-Fi connection
connection_timeout = 10
while connection_timeout &gt; 0:
if wlan.status() &gt;= 3:
break
connection_timeout -= 1
print('Waiting for Wi-Fi connection...')
time.sleep(1)
# Check if connection is successful
if wlan.status() != 3:
raise RuntimeError('Failed to establish a network connection')
else:
print('Connection successful!')
network_info = wlan.ifconfig()
print('IP address:', network_info[0])
# Set up socket and start listening
addr = socket.getaddrinfo('0.0.0.0', 80)[0][-1]
s = socket.socket()
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
s.bind(addr)
s.listen()
print('Listening on', addr)
# Initialize variables
state = &quot;OFF&quot;
random_value = 0
# Main loop to listen for connections
while True:
try:
conn, addr = s.accept()
print('Got a connection from', addr)
# Receive and parse the request
request = conn.recv(1024)
request = str(request)
print('Request content = %s' % request)
try:
request = request.split()[1]
print('Request:', request)
except IndexError:
pass
# Process the request and update variables
if request == '/lighton?':
print(&quot;LED on&quot;)
led.value(1)
state = &quot;ON&quot;
elif request == '/lightoff?':
led.value(0)
state = 'OFF'
elif request == '/value?':
random_value = random.randint(0, 20)
# Generate HTML response
response = webpage(random_value, state)
# Send the HTTP response and close the connection
conn.send('HTTP/1.0 200 OK\r\nContent-type: text/html\r\n\r\n')
conn.send(response)
conn.close()
except OSError as e:
conn.close()
print('Connection closed')
</code></pre>
<p style="text-align:center"><a class="rntwhite" href="https://github.com/RuiSantosdotme/Random-Nerd-Tutorials/raw/master/Projects/Raspberry-Pi-Pico/MicroPython/main_Basic_Web_Server.py" target="_blank">View raw code</a></p>
<p>You just need to insert your SSID and password on the following variables and the code should work straight away.</p>
<pre class="wp-block-code language-python"><code># Wi-Fi credentials
ssid = 'REPLACE_WITH_YOUR_SSID'
password = 'REPLACE_WITH_YOUR_PASSWORD'</code></pre>
<h3 class="wp-block-heading" id="how-code-works">How does the Code Work?</h3>
<p>Continue reading to learn how the code works, or skip to the <a href="#demonstration" title="">Demonstration section</a>.</p>
<h4 class="wp-block-heading">Importing Libraries</h4>
<p>Start by importing the required modules, including <span class="rnthl rntliteral">network</span> for Wi-Fi, <span class="rnthl rntliteral">socket</span> for communication between client and server, <span class="rnthl rntliteral">time</span> for delays, <span class="rnthl rntliteral">random</span> for generating random numbers, and <span class="rnthl rntliteral">Pin</span> from <span class="rnthl rntliteral">machine</span> for GPIO pin control.</p>
<pre class="wp-block-code language-python"><code>import network
import socket
import time
import random
from machine import Pin</code></pre>
<h4 class="wp-block-heading">Declaring the LED Pin</h4>
<p>Create a <span class="rnthl rntliteral">Pin</span> object named <span class="rnthl rntliteral">led</span> that corresponds to the Raspberry Pi Pico onboard LED. It&#8217;s configured as an output pin. It will interpret <span class="rnthl rntliteral">&#8216;LED&#8217;</span> as the onboard LED.</p>
<pre class="wp-block-code language-python"><code>led = Pin('LED', Pin.OUT)</code></pre>
<p>Set the Wi-Fi credentials for the network you want to connect to. Modify these variables with your own credentials.</p>
<pre class="wp-block-code language-python"><code># Wi-Fi credentials
ssid = 'REPLACE_WITH_YOUR_SSID'
password = 'REPLACE_WITH_YOUR_PASSWORD'</code></pre>
<h4 class="wp-block-heading">Creating the Web Page</h4>
<p>To generate the web page, we created a function called <span class="rnthl rntliteral">webpage()</span> that accepts as arguments a random value and the LED state. We&#8217;re generating the web page in a function because it allows us to dynamically change its content at the time of sending it to the client. This way, we can send the page with the latest information about the GPIO state or random value.</p>
<pre class="wp-block-code language-python"><code># HTML template for the webpage
def webpage(random_value, state):
html = f"""
&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Pico Web Server&lt;/title&gt;
&lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Raspberry Pi Pico Web Server&lt;/h1&gt;
&lt;h2&gt;Led Control&lt;/h2&gt;
&lt;form action="./lighton"&gt;
&lt;input type="submit" value="Light on" /&gt;
&lt;/form&gt;
&lt;br&gt;
&lt;form action="./lightoff"&gt;
&lt;input type="submit" value="Light off" /&gt;
&lt;/form&gt;
&lt;p&gt;LED state: {state}&lt;/p&gt;
&lt;h2&gt;Fetch New Value&lt;/h2&gt;
&lt;form action="./value"&gt;
&lt;input type="submit" value="Fetch value" /&gt;
&lt;/form&gt;
&lt;p&gt;Fetched value: {random_value}&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;
"""
return str(html)</code></pre>
<p>To better understand how this works and the usage of f-strings along with curly braces <strong>{}</strong> to include variables in the HTML string, continue reading.</p>
<p>The <strong>triple quotes (&#8220;&#8221;&#8221;)</strong> are used to create a multi-line string. This allows for easy formatting of the HTML content without needing to concatenate multiple strings. Our HTML content is more readable this way, but you can concatenate everything on the same line if you want to.</p>
<p>The <strong>f</strong> before the opening triple quote denotes an f-string, which is a way to embed expressions inside string literals. In this case, it allows the inclusion of variables (<span class="rnthl rntliteral">random_value</span> and <span class="rnthl rntliteral">state</span>) directly within the string.</p>
<pre class="wp-block-code language-python"><code>html = f"""</code></pre>
<p>The curly braces <strong>{}</strong> inside the f-string act as placeholders for variables. The variables inside the curly braces are replaced with their actual values during the string formatting.</p>
<p>In summary, the <span class="rnthl rntliteral">{state}</span> and <span class="rnthl rntliteral">{random_value}</span> within the HTML content are placeholders for the actual values of the <span class="rnthl rntliteral">state</span> and <span class="rnthl rntliteral">random_value</span> variables.</p>
<pre class="wp-block-code language-python"><code>&lt;p&gt;LED state: {state}&lt;/p&gt;</code></pre>
<pre class="wp-block-code language-python"><code>&lt;p&gt;Fetched value: {random_value}&lt;/p&gt;</code></pre>
<p>This dynamic string formatting makes it easy to incorporate variable values directly into the HTML content, providing a clean and readable way to generate dynamic web pages.</p>
<p>When we call this function, it will return an HTML page with the current random value and LED state.</p>
<h4 class="wp-block-heading">Connecting to the Internet</h4>
<p>The following lines are responsible for connecting your Raspberry Pi Pico to your local network using the SSID and password you defined earlier.</p>
<pre class="wp-block-code language-python"><code># Connect to WLAN
wlan = network.WLAN(network.STA_IF)
wlan.active(True)
wlan.connect(ssid, password)</code></pre>
<p>Wait for the Wi-Fi connection to be established. It checks the connection status, and if it&#8217;s <span class="rnthl rntliteral">wlan.status() &gt;= 3</span> (this means it has even connected to the network or failed to connect), the loop exits. It waits for a maximum of 10 seconds.</p>
<p>The method <span class="rnthl rntliteral">wlan.status</span>, as the name suggests, checks the status of the Wi-Fi connection of the Raspberry Pi. This method returns an integer with the following meaning:</p>
<ul class="wp-block-list">
<li>0: WLAN is not enabled</li>
<li>1: WLAN is currently scanning for networks</li>
<li>2: WLAN is connecting to a network</li>
<li>3: WLAN is connected to a network</li>
<li>4: WLAN failed to connect to a network</li>
</ul>
<p>Then, we check if it&#8217;s connected or not (we know that status = 3 means it&#8217;s connected). If <span class="rnthl rntliteral">wlan.status()</span> is different than 3, we know it failed to establish a connection.</p>
<p>Otherwise, it means we succeed. In case we succeed, we can get the network information using the <span class="rnthl rntliteral">ifconfig()</span> method. This method returns a tupple with the following information:</p>
<pre class="wp-block-code language-python"><code>network_info&#091;0]: The IP address assigned to the Pico on the network.
network_info&#091;1]: The subnet mask.
network_info&#091;2]: The gateway IP address.
network_info&#091;3]: The DNS (Domain Name System) server IP address.</code></pre>
<p>We just need the IP address, so we just get the first element of the array (<span class="rnthl rntliteral">network_info[0]</span>).</p>
<pre class="wp-block-code language-python"><code>else:
print('Connection successful!')
network_info = wlan.ifconfig()
print('IP address:', network_info&#091;0])</code></pre>
<h4 class="wp-block-heading">Creating a socket server</h4>
<p>After establishing a connection with our network, we need to create a listening socket to listen for incoming requests and send the HTML text in response. For a better understanding, the following figure shows a diagram of how to create sockets for server-client interaction:</p>
<div class="wp-block-image">
<figure class="aligncenter size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="688" height="900" src="https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2018/10/socket-server.png?resize=688%2C900&#038;quality=100&#038;strip=all&#038;ssl=1" alt="Creating a socket server diagram" class="wp-image-76666" srcset="https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2018/10/socket-server.png?w=688&amp;quality=100&amp;strip=all&amp;ssl=1 688w, https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2018/10/socket-server.png?resize=229%2C300&amp;quality=100&amp;strip=all&amp;ssl=1 229w" sizes="(max-width: 688px) 100vw, 688px" fetchpriority="low"/></figure></div>
<p>Set up a socket to listen on port 80. It uses the 0.0.0.0 address, indicating that it will listen on all available network interfaces. The <span class="rnthl rntliteral">SO_REUSEADDR</span> option allows the socket to reuse the address (this way you won&#8217;t have problems with addresses already in use when you try to run the webserver after the first time).</p>
<pre class="wp-block-code language-python"><code>addr = socket.getaddrinfo('0.0.0.0', 80)&#091;0]&#091;-1]
s = socket.socket()
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
s.bind(addr)
s.listen()</code></pre>
<p>The following line gets information about the socket address, specifically the address and port.</p>
<pre class="wp-block-code language-python"><code>addr = socket.getaddrinfo('0.0.0.0', 80)&#091;0]&#091;-1]</code></pre>
<p>Create a socket using <span class="rnthl rntliteral">socket.socket()</span>.</p>
<pre class="wp-block-code language-python"><code>s = socket.socket()</code></pre>
<p>Next, bind the socket to an address (network interface and port number) using the <span class="rnthl rntliteral">bind()</span> method. The <span class="rnthl rntliteral">bind()</span> method accepts a tupple variable with the ip address, and port number, that we saved previously on the <span class="rnthl rntliteral">addr</span> variable:</p>
<pre class="wp-block-code language-python"><code>s.bind(addr)</code></pre>
<p>Put the socket into listening mode. This means it&#8217;s now ready to accept incoming connections.</p>
<pre class="wp-block-code language-python"><code>s.listen()</code></pre>
<h4 class="wp-block-heading">Initializing Variables</h4>
<p>Initialize variables for the LED state (<span class="rnthl rntliteral">state</span>) and for the random value (<span class="rnthl rntliteral">random_value</span>).</p>
<pre class="wp-block-code language-python"><code># Initialize variables
state = "OFF"
random_value = 0</code></pre>
<h4 class="wp-block-heading">Listening for Connections</h4>
<p>In the while loop, we listen for requests and send responses. When a client connects, the server calls the <span class="rnthl rntliteral">accept()</span> method to accept the connection. When a client connects, it saves a new socket object to accept and send data on the <span class="rnthl rntliteral">conn</span> variable, and saves the client address to connect to the server on the <span class="rnthl rntliteral">addr</span> variable.</p>
<pre class="wp-block-code language-python"><code>conn, addr = s.accept()</code></pre>
<p>Then, print the address of the client saved on the <span class="rnthl rntliteral">addr</span> variable.</p>
<pre class="wp-block-code language-python"><code>print('Got a connection from', addr)</code></pre>
<p>The data is exchanged between the client and server using the <span class="rnthl rntliteral">send()</span> and <span class="rnthl rntliteral">recv()</span> methods.</p>
<p>The following line gets the request received on the newly created socket and saves it in the <span class="rnthl rntliteral">request</span> variable.</p>
<pre class="wp-block-code language-python"><code>request = conn.recv(1024)</code></pre>
<p>The <span class="rnthl rntliteral">recv()</span> method receives the data from the client socket (remember that weve created a new socket object on the <span class="rnthl rntliteral">conn</span> variable). The argument of the <span class="rnthl rntliteral">recv()</span> method specifies the maximum amount of data that can be received at once in bytes.</p>
<p>The next line simply prints the content of the request:</p>
<pre class="wp-block-code language-python"><code>print('Request content = %s' % request)</code></pre>
<h4 class="wp-block-heading">Get the Request Content</h4>
<p>Then, we get the content of the request with <span class="rnthl rntliteral">request.split()[1]</span>. It splits the received HTTP request string into a list of words and takes the second element (index 1) of the list. This is typically the path part of the HTTP request, which is the information that we need to know which button was clicked on the web interface.</p>
<pre class="wp-block-code language-python"><code>try:
request = request.split()&#091;1]
print('Request:', request)
except IndexError:
pass</code></pre>
<h4 class="wp-block-heading">Process the requests</h4>
<p>We then check the contents of the request and act accordingly. If the request is on the <span class="rnthl rntliteral">/lighton?</span> path, we turn the LED on and update the <span class="rnthl rntliteral">state</span> variable to <span class="rnthl rntliteral">&#8216;ON&#8217;</span>.</p>
<pre class="wp-block-code language-python"><code>if request == '/lighton?':
print("LED on")
led.value(1)
state = "ON"</code></pre>
<p>If the request is <span class="rnthl rntliteral">/lightoff?</span>, we turn the LED off and update the state variable to <span class="rnthl rntliteral">&#8216;OFF&#8217;</span>.</p>
<pre class="wp-block-code language-python"><code>elif request == '/lightoff?':
led.value(0)
state = 'OFF'</code></pre>
<p>Finally, if the request is on the <span class="rnthl rntliteral">/value?</span> path, we generate a new random value and save it on the <span class="rnthl rntliteral">random_value</span> variable.</p>
<pre class="wp-block-code language-python"><code>elif request == '/value?':
random_value = random.randint(0, 20)</code></pre>
<p>As we&#8217;ve mentioned previously, instead of generating a random value, you can <a href="https://randomnerdtutorials.com/raspberry-pi-pico-ds18b20-micropython/" title="">get sensor readings</a>.</p>
<h4 class="wp-block-heading">Sending the Response</h4>
<p>After processing the request, we&#8217;ll call the <span class="rnthl rntliteral">webpage()</span> function with <span class="rnthl rntliteral">random_value</span> and <span class="rnthl rntliteral">state</span> as arguments to generate an HTML page with the updated values. The content to generate the web page is saved on the <span class="rnthl rntliteral">response</span> variable.</p>
<pre class="wp-block-code language-python"><code>response = webpage(random_value, state) </code></pre>
<p>Finally, send the response to the socket client using the <span class="rnthl rntliteral">send()</span>&nbsp;method:</p>
<pre class="wp-block-code language-python"><code>conn.send('HTTP/1.0 200 OK\r\nContent-type: text/html\r\n\r\n')
conn.send(response)</code></pre>
<p>In the end, close the created socket.</p>
<pre class="wp-block-code language-python"><code>conn.close()</code></pre>
<h2 class="wp-block-heading demonstration" id="demonstration">Raspberry Pi Pico Web Server &#8211; Demonstration</h2>
<p>Run the previous code on your Raspberry Pi Pico. You just need to click on the Thonny IDE green <em>run</em> button.</p>
<div class="wp-block-image">
<figure class="aligncenter size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="470" height="114" src="https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/thonny-ide-run-button.png?resize=470%2C114&#038;quality=100&#038;strip=all&#038;ssl=1" alt="Thonny IDE Run Green Button" class="wp-image-144594" srcset="https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/thonny-ide-run-button.png?w=470&amp;quality=100&amp;strip=all&amp;ssl=1 470w, https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/thonny-ide-run-button.png?resize=300%2C73&amp;quality=100&amp;strip=all&amp;ssl=1 300w" sizes="(max-width: 470px) 100vw, 470px" fetchpriority="low"/></figure></div>
<p>The Raspberry Pi IP address will be printed after a few seconds. In my case, it&#8217;s 192.168.1.82.</p>
<div class="wp-block-image">
<figure class="aligncenter size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="700" height="231" src="https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-Web-Server-Get-IP-Address.png?resize=700%2C231&#038;quality=100&#038;strip=all&#038;ssl=1" alt="Getting the Raspberry Pi Pico IP Address Thonny IDE" class="wp-image-144655" srcset="https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-Web-Server-Get-IP-Address.png?w=700&amp;quality=100&amp;strip=all&amp;ssl=1 700w, https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-Web-Server-Get-IP-Address.png?resize=300%2C99&amp;quality=100&amp;strip=all&amp;ssl=1 300w" sizes="(max-width: 700px) 100vw, 700px" fetchpriority="low"/></figure></div>
<p>Open a web browser on your local network and type your Raspberry Pi Pico IP address. The following web page should load.</p>
<div class="wp-block-image">
<figure class="aligncenter size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="716" height="471" src="https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-WebServer-1.png?resize=716%2C471&#038;quality=100&#038;strip=all&#038;ssl=1" alt="Raspberry Pi Pico Basic Web Server on Web Browser" class="wp-image-144656" srcset="https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-WebServer-1.png?w=716&amp;quality=100&amp;strip=all&amp;ssl=1 716w, https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-WebServer-1.png?resize=300%2C197&amp;quality=100&amp;strip=all&amp;ssl=1 300w" sizes="(max-width: 716px) 100vw, 716px" fetchpriority="low"/></figure></div>
<p>You can click the <em>Light on</em> and <em>Light off</em> buttons to turn the Raspberry Pi Pico onboard LED on and off.</p>
<div class="wp-block-jetpack-tiled-gallery aligncenter is-style-rectangular"><div class="tiled-gallery__gallery"><div class="tiled-gallery__row"><div class="tiled-gallery__col" style="flex-basis:50.00000%"><figure class="tiled-gallery__item"><img decoding="async" srcset="https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/05/Raspberry-Pi-Pico-Blinking-LED-Off.jpg?strip=info&#038;w=600&#038;ssl=1 600w, https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/05/Raspberry-Pi-Pico-Blinking-LED-Off.jpg?strip=info&#038;w=750&#038;ssl=1 750w" alt="Raspberry Pi Pico W onboard LED off" data-height="422" data-id="130908" data-link="https://randomnerdtutorials.com/getting-started-raspberry-pi-pico-w/raspberry-pi-pico-blinking-led-off/#main" data-url="https://randomnerdtutorials.com/wp-content/uploads/2023/05/Raspberry-Pi-Pico-Blinking-LED-Off.jpg" data-width="750" src="https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/05/Raspberry-Pi-Pico-Blinking-LED-Off.jpg?ssl=1" data-amp-layout="responsive" loading="lazy" fetchpriority="low"/></figure></div><div class="tiled-gallery__col" style="flex-basis:50.00000%"><figure class="tiled-gallery__item"><img decoding="async" srcset="https://i2.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/05/Raspberry-Pi-Pico-Blinking-LED-On.jpg?strip=info&#038;w=600&#038;ssl=1 600w, https://i2.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/05/Raspberry-Pi-Pico-Blinking-LED-On.jpg?strip=info&#038;w=750&#038;ssl=1 750w" alt="Raspberry Pi Pico W onboard LED on" data-height="422" data-id="130907" data-link="https://randomnerdtutorials.com/getting-started-raspberry-pi-pico-w/raspberry-pi-pico-blinking-led-on/#main" data-url="https://randomnerdtutorials.com/wp-content/uploads/2023/05/Raspberry-Pi-Pico-Blinking-LED-On.jpg" data-width="750" src="https://i2.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/05/Raspberry-Pi-Pico-Blinking-LED-On.jpg?ssl=1" data-amp-layout="responsive" loading="lazy" fetchpriority="low"/></figure></div></div></div></div>
<p>You can also click on the <em>Fetch value</em> to request a new random generated value from the Raspberry Pi Pico. It should respond with the web page containing the newest value.</p>
<div class="wp-block-image">
<figure class="aligncenter size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="741" height="490" src="https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/web-server-fetch-value-1.png?resize=741%2C490&#038;quality=100&#038;strip=all&#038;ssl=1" alt="Raspberry Pi Pico Web Server Request a New Value" class="wp-image-144693" srcset="https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/web-server-fetch-value-1.png?w=741&amp;quality=100&amp;strip=all&amp;ssl=1 741w, https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/web-server-fetch-value-1.png?resize=300%2C198&amp;quality=100&amp;strip=all&amp;ssl=1 300w" sizes="(max-width: 741px) 100vw, 741px" fetchpriority="low"/></figure></div>
<p>You can easily modify the web server to request sensor readings or any other useful information.</p>
<p>The web server is also accessible from your smartphone as long as it is connected to the same network.</p>
<div class="wp-block-image">
<figure class="aligncenter size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="361" height="723" src="https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-Basic-Webserver-Smartphone.png?resize=361%2C723&#038;quality=100&#038;strip=all&#038;ssl=1" alt="Raspberry Pi Pico Web Server on Smarphone" class="wp-image-144695" srcset="https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-Basic-Webserver-Smartphone.png?w=361&amp;quality=100&amp;strip=all&amp;ssl=1 361w, https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/12/Raspberry-Pi-Pico-Basic-Webserver-Smartphone.png?resize=150%2C300&amp;quality=100&amp;strip=all&amp;ssl=1 150w" sizes="(max-width: 361px) 100vw, 361px" fetchpriority="low"/></figure></div>
<p>If you want the Raspberry Pi Pico to run the webserver without being connected to your computer, you need to upload the code as <em>main.py</em> to the Raspberry Pi Pico filesystem. For that, after copying the code to a new file, go to <strong>File </strong>&gt; <strong>Save as</strong> and select <strong>Raspberry Pi Pico</strong>.</p>
<div class="wp-block-image">
<figure class="aligncenter size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="214" height="203" src="https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/05/Save-file-to-Raspberry-Pi-Pico.png?resize=214%2C203&#038;quality=100&#038;strip=all&#038;ssl=1" alt="Save Files to Raspberry Pi Pico Thonny IDE" class="wp-image-130899" fetchpriority="low"/></figure></div>
<p>Name the file main.py and click OK to save the file on the Raspberry Pi Pico. Now, it will run the <em>main.py </em>file on boot without the need to be connected to the computer.</p>
<div class="wp-block-image">
<figure class="aligncenter size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="545" height="327" src="https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/06/micropython-main-py-file.png?resize=545%2C327&#038;quality=100&#038;strip=all&#038;ssl=1" alt="Micropython saving main.py file Thonny IDE" class="wp-image-132452" srcset="https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/06/micropython-main-py-file.png?w=545&amp;quality=100&amp;strip=all&amp;ssl=1 545w, https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/06/micropython-main-py-file.png?resize=300%2C180&amp;quality=100&amp;strip=all&amp;ssl=1 300w" sizes="(max-width: 545px) 100vw, 545px" fetchpriority="low"/></figure></div>
<h2 class="wp-block-heading">Wrapping Up</h2>
<p>In this tutorial, you learned the basics of building a web server with the Raspberry Pi Pico. As an example, we&#8217;ve built a simple page with buttons to control a GPIO and a section to request a new random value from the board.</p>
<p>This is just a basic example for you to understand how building a web server works. The idea is to modify the project to control GPIOs to activate relays, control motors, and display sensor readings or any other useful information.</p>
<p>We hope you&#8217;ve found this tutorial useful.</p>
<p>Learn more about the Raspberry Pi Pico with our eBook:</p>
<ul class="wp-block-list">
<li><a href="https://randomnerdtutorials.com/raspberry-pi-pico-w-micropython-ebook/" title="">Learn Raspberry Pi Pico with MicroPython (eBook)</a></li>
</ul>
<p>If you like the Raspberry Pi Pico, make sure you take a look at other tutorials on our blog:</p>
<ul class="wp-block-list">
<li><a href="https://randomnerdtutorials.com/raspberry-pi-pico-w-pinout-gpios/">Raspberry Pi Pico and Pico W Pinout Guide: GPIOs Explained</a></li>
<li><a href="https://randomnerdtutorials.com/raspberry-pi-pico-outputs-inputs-micropython/">Raspberry Pi Pico: Control Digital Outputs and Read Digital Inputs (MicroPython)</a></li>
<li><a href="https://randomnerdtutorials.com/raspberry-pi-pico-pwm-micropython/">Raspberry Pi Pico: PWM Fading an LED (MicroPython)</a></li>
<li><a href="https://randomnerdtutorials.com/raspberry-pi-pico-dht11-dht22-micropython/">Raspberry Pi Pico: DHT11/DHT22 Temperature and Humidity Sensor (MicroPython)</a></li>
</ul>
<p><a href="https://randomnerdtutorials.com/projects-raspberry-pi-pico/">Check out all our Raspberry Pi Pico Guides »</a></p>
<p>Thanks for reading.</p>
</div>
<br>
<center><a href="https://randomnerdtutorials.com/pcbway" target="_blank"><img src="https://randomnerdtutorials.com/wp-content/uploads/2022/03/728x280.jpg" width="728" height="280" loading="lazy" fetchpriority="low"></a></center>
<br>
<div data-elementor-type="section" data-elementor-id="83032" class="elementor elementor-83032" data-elementor-post-type="elementor_library">
<section class="elementor-section elementor-top-section elementor-element elementor-element-2d8a9105 elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="2d8a9105" data-element_type="section">
<div class="elementor-container elementor-column-gap-default">
<div class="elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-2280806f" data-id="2280806f" data-element_type="column">
<div class="elementor-widget-wrap elementor-element-populated">
<section class="elementor-section elementor-inner-section elementor-element elementor-element-4a840dd4 elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="4a840dd4" data-element_type="section">
<div class="elementor-container elementor-column-gap-default">
<div class="elementor-column elementor-col-50 elementor-inner-column elementor-element elementor-element-3497580" data-id="3497580" data-element_type="column">
<div class="elementor-widget-wrap elementor-element-populated">
<div class="elementor-element elementor-element-7b0162e9 elementor-widget elementor-widget-image" data-id="7b0162e9" data-element_type="widget" data-widget_type="image.default">
<div class="elementor-widget-container">
<a href="https://randomnerdtutorials.com/smart-home-ebook/">
<img src="https://randomnerdtutorials.com/wp-content/uploads/elementor/thumbs/Smart-Home-Raspberry-Pi-ESP32-ESP8266-eBook500px-pupj8i6e7hlzpgwxe82jjd8skst9vmrjt9lpqb0v0g.jpg" title="Smart-Home-Raspberry-Pi-ESP32-ESP8266-eBook500px" alt="SMART HOME with Raspberry Pi ESP32 and ESP8266 Node-RED InfluxDB eBook" loading="lazy" width="117" height="180" fetchpriority="low"/> </a>
</div>
</div>
</div>
</div>
<div class="elementor-column elementor-col-50 elementor-inner-column elementor-element elementor-element-45a69540" data-id="45a69540" data-element_type="column">
<div class="elementor-widget-wrap elementor-element-populated">
<div class="elementor-element elementor-element-d7f411a elementor-widget-mobile__width-initial elementor-widget elementor-widget-heading" data-id="d7f411a" data-element_type="widget" data-widget_type="heading.default">
<div class="elementor-widget-container">
<h4 class="elementor-heading-title elementor-size-default"><a href="https://randomnerdtutorials.com/smart-home-ebook/">SMART HOME with Raspberry Pi, ESP32, ESP8266 [eBook] </a></h4> </div>
</div>
<div class="elementor-element elementor-element-5dc4402f elementor-hidden-phone elementor-widget elementor-widget-text-editor" data-id="5dc4402f" data-element_type="widget" data-widget_type="text-editor.default">
<div class="elementor-widget-container">
Learn how to build a home automation system and well cover the following main subjects: Node-RED, Node-RED Dashboard, Raspberry Pi, ESP32, ESP8266, MQTT, and InfluxDB database <strong><a href="https://randomnerdtutorials.com/smart-home-ebook/" rel="noopener">DOWNLOAD »</a></strong> </div>
</div>
</div>
</div>
</div>
</section>
<div class="elementor-element elementor-element-4de314b8 elementor-hidden-desktop elementor-hidden-tablet elementor-widget elementor-widget-text-editor" data-id="4de314b8" data-element_type="widget" data-widget_type="text-editor.default">
<div class="elementor-widget-container">
Learn how to build a home automation system and well cover the following main subjects: Node-RED, Node-RED Dashboard, Raspberry Pi, ESP32, ESP8266, MQTT, and InfluxDB database <strong><a href="https://randomnerdtutorials.com/smart-home-ebook/" rel="noopener">DOWNLOAD »</a></strong> </div>
</div>
</div>
</div>
</div>
</section>
</div>
<div data-elementor-type="section" data-elementor-id="82533" class="elementor elementor-82533" data-elementor-post-type="elementor_library">
<section class="elementor-section elementor-top-section elementor-element elementor-element-31c9920 elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="31c9920" data-element_type="section">
<div class="elementor-container elementor-column-gap-default">
<div class="elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-e6bec81" data-id="e6bec81" data-element_type="column">
<div class="elementor-widget-wrap elementor-element-populated">
<div class="elementor-element elementor-element-ae5f36f elementor-widget elementor-widget-text-editor" data-id="ae5f36f" data-element_type="widget" data-widget_type="text-editor.default">
<div class="elementor-widget-container">
<h3>Recommended Resources</h3> </div>
</div>
</div>
</div>
</div>
</section>
<section class="elementor-section elementor-top-section elementor-element elementor-element-df31b19 elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="df31b19" data-element_type="section">
<div class="elementor-container elementor-column-gap-default">
<div class="elementor-column elementor-col-33 elementor-top-column elementor-element elementor-element-f988f78" data-id="f988f78" data-element_type="column">
<div class="elementor-widget-wrap elementor-element-populated">
<div class="elementor-element elementor-element-ea4ffd5 elementor-widget elementor-widget-image" data-id="ea4ffd5" data-element_type="widget" data-widget_type="image.default">
<div class="elementor-widget-container">
<a href="https://randomnerdtutorials.com/build-a-home-automation-system-for-100/">
<img width="400" height="225" src="https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2017/10/home-automation-sb-img.jpg?fit=400%2C225&amp;quality=100&amp;strip=all&amp;ssl=1" class="attachment-full size-full wp-image-44151" alt="" srcset="https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2017/10/home-automation-sb-img.jpg?w=400&amp;quality=100&amp;strip=all&amp;ssl=1 400w, https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2017/10/home-automation-sb-img.jpg?resize=300%2C169&amp;quality=100&amp;strip=all&amp;ssl=1 300w" sizes="(max-width: 400px) 100vw, 400px" loading="lazy" fetchpriority="low"/> </a>
</div>
</div>
<div class="elementor-element elementor-element-1d03956 elementor-widget elementor-widget-text-editor" data-id="1d03956" data-element_type="widget" data-widget_type="text-editor.default">
<div class="elementor-widget-container">
<p><strong><a href="https://randomnerdtutorials.com/build-a-home-automation-system-for-100/">Build a Home Automation System from Scratch »</a> </strong>With Raspberry Pi, ESP8266, Arduino, and Node-RED.</p> </div>
</div>
</div>
</div>
<div class="elementor-column elementor-col-33 elementor-top-column elementor-element elementor-element-c804b9b" data-id="c804b9b" data-element_type="column">
<div class="elementor-widget-wrap elementor-element-populated">
<div class="elementor-element elementor-element-caff517 elementor-widget elementor-widget-image" data-id="caff517" data-element_type="widget" data-widget_type="image.default">
<div class="elementor-widget-container">
<a href="https://randomnerdtutorials.com/home-automation-using-esp8266/">
<img width="400" height="225" src="https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2017/10/esp8266-sb-img.jpg?fit=400%2C225&amp;quality=100&amp;strip=all&amp;ssl=1" class="attachment-full size-full wp-image-44150" alt="" srcset="https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2017/10/esp8266-sb-img.jpg?w=400&amp;quality=100&amp;strip=all&amp;ssl=1 400w, https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2017/10/esp8266-sb-img.jpg?resize=300%2C169&amp;quality=100&amp;strip=all&amp;ssl=1 300w" sizes="(max-width: 400px) 100vw, 400px" loading="lazy" fetchpriority="low"/> </a>
</div>
</div>
<div class="elementor-element elementor-element-7bc712f elementor-widget elementor-widget-text-editor" data-id="7bc712f" data-element_type="widget" data-widget_type="text-editor.default">
<div class="elementor-widget-container">
<p><strong><a href="https://randomnerdtutorials.com/home-automation-using-esp8266/">Home Automation using ESP8266 eBook and video course »</a> </strong>Build IoT and home automation projects.</p> </div>
</div>
</div>
</div>
<div class="elementor-column elementor-col-33 elementor-top-column elementor-element elementor-element-9487535" data-id="9487535" data-element_type="column">
<div class="elementor-widget-wrap elementor-element-populated">
<div class="elementor-element elementor-element-330785f elementor-widget elementor-widget-image" data-id="330785f" data-element_type="widget" data-widget_type="image.default">
<div class="elementor-widget-container">
<a href="https://randomnerdtutorials.com/arduino-step-by-step-projects/">
<img width="400" height="225" src="https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2017/10/arduino-sb-img.jpg?fit=400%2C225&amp;quality=100&amp;strip=all&amp;ssl=1" class="attachment-full size-full wp-image-44149" alt="" srcset="https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2017/10/arduino-sb-img.jpg?w=400&amp;quality=100&amp;strip=all&amp;ssl=1 400w, https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2017/10/arduino-sb-img.jpg?resize=300%2C169&amp;quality=100&amp;strip=all&amp;ssl=1 300w" sizes="(max-width: 400px) 100vw, 400px" loading="lazy" fetchpriority="low"/> </a>
</div>
</div>
<div class="elementor-element elementor-element-e9540a9 elementor-widget elementor-widget-text-editor" data-id="e9540a9" data-element_type="widget" data-widget_type="text-editor.default">
<div class="elementor-widget-container">
<p><strong><a href="https://randomnerdtutorials.com/arduino-step-by-step-projects/">Arduino Step-by-Step Projects »</a> </strong>Build 25 Arduino projects with our course, even with no prior experience!</p> </div>
</div>
</div>
</div>
</div>
</section>
<section class="elementor-section elementor-top-section elementor-element elementor-element-a9e9c13 elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="a9e9c13" data-element_type="section">
<div class="elementor-container elementor-column-gap-default">
<div class="elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-25cf7ca" data-id="25cf7ca" data-element_type="column">
<div class="elementor-widget-wrap elementor-element-populated">
<div class="elementor-element elementor-element-88fc6c0 elementor-widget elementor-widget-text-editor" data-id="88fc6c0" data-element_type="widget" data-widget_type="text-editor.default">
<div class="elementor-widget-container">
<h3>What to Read Next&#8230;</h3> </div>
</div>
</div>
</div>
</div>
</section>
<section class="elementor-section elementor-top-section elementor-element elementor-element-d68ef93 elementor-section-height-min-height elementor-section-boxed elementor-section-height-default elementor-section-items-middle" data-id="d68ef93" data-element_type="section">
<div class="elementor-container elementor-column-gap-no">
<div class="elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-4ab337a" data-id="4ab337a" data-element_type="column">
<div class="elementor-widget-wrap elementor-element-populated">
<div class="elementor-element elementor-element-efac60e elementor-grid-3 elementor-grid-tablet-2 elementor-grid-mobile-1 elementor-posts--thumbnail-top elementor-card-shadow-yes elementor-posts__hover-gradient elementor-widget elementor-widget-posts" data-id="efac60e" data-element_type="widget" data-settings="{&quot;cards_row_gap&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:16,&quot;sizes&quot;:[]},&quot;cards_columns&quot;:&quot;3&quot;,&quot;cards_columns_tablet&quot;:&quot;2&quot;,&quot;cards_columns_mobile&quot;:&quot;1&quot;,&quot;cards_row_gap_tablet&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]},&quot;cards_row_gap_mobile&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:&quot;&quot;,&quot;sizes&quot;:[]}}" data-widget_type="posts.cards">
<div class="elementor-widget-container">
<div class="elementor-posts-container elementor-posts elementor-posts--skin-cards elementor-grid">
<article class="elementor-post elementor-grid-item post-98855 post type-post status-publish format-standard has-post-thumbnail hentry category-esp32 category-esp32-project category-esp32-arduino-ide category-0-esp32 category-project mv-content-wrapper">
<div class="elementor-post__card">
<a class="elementor-post__thumbnail__link" href="https://randomnerdtutorials.com/esp32-web-server-slider-pwm/" tabindex="-1" ><div class="elementor-post__thumbnail"><img width="1280" height="720" src="https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2020/08/ESP32-Slider-Web-Server-Control-LED-Brightness-PWM.jpg?fit=1280%2C720&amp;quality=100&amp;strip=all&amp;ssl=1" class="attachment-full size-full wp-image-98876" alt="ESP32 Web Server with Slider Control LED Brightness PWM using Arduino IDE" decoding="async" srcset="https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2020/08/ESP32-Slider-Web-Server-Control-LED-Brightness-PWM.jpg?w=1280&amp;quality=100&amp;strip=all&amp;ssl=1 1280w, https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2020/08/ESP32-Slider-Web-Server-Control-LED-Brightness-PWM.jpg?resize=300%2C169&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2020/08/ESP32-Slider-Web-Server-Control-LED-Brightness-PWM.jpg?resize=1024%2C576&amp;quality=100&amp;strip=all&amp;ssl=1 1024w, https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2020/08/ESP32-Slider-Web-Server-Control-LED-Brightness-PWM.jpg?resize=768%2C432&amp;quality=100&amp;strip=all&amp;ssl=1 768w" sizes="(max-width: 1280px) 100vw, 1280px" loading="lazy" fetchpriority="low"/></div></a>
<div class="elementor-post__text">
<h3 class="elementor-post__title">
<a href="https://randomnerdtutorials.com/esp32-web-server-slider-pwm/" >
ESP32 Web Server with Slider: Control LED Brightness (PWM) </a>
</h3>
</div>
</div>
</article>
<article class="elementor-post elementor-grid-item post-74402 post type-post status-publish format-standard has-post-thumbnail hentry category-esp32 category-esp32-project category-esp32-arduino-ide category-0-esp32 category-project mv-content-wrapper">
<div class="elementor-post__card">
<a class="elementor-post__thumbnail__link" href="https://randomnerdtutorials.com/esp32-static-fixed-ip-address-arduino-ide/" tabindex="-1" ><div class="elementor-post__thumbnail"><img width="1280" height="720" src="https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2018/10/static-ip-address-thumbnail.jpg?fit=1280%2C720&amp;quality=100&amp;strip=all&amp;ssl=1" class="attachment-full size-full wp-image-74412" alt="ESP32-static-IP-address" decoding="async" srcset="https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2018/10/static-ip-address-thumbnail.jpg?w=1280&amp;quality=100&amp;strip=all&amp;ssl=1 1280w, https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2018/10/static-ip-address-thumbnail.jpg?resize=300%2C169&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2018/10/static-ip-address-thumbnail.jpg?resize=768%2C432&amp;quality=100&amp;strip=all&amp;ssl=1 768w, https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2018/10/static-ip-address-thumbnail.jpg?resize=1024%2C576&amp;quality=100&amp;strip=all&amp;ssl=1 1024w" sizes="(max-width: 1280px) 100vw, 1280px" loading="lazy" fetchpriority="low"/></div></a>
<div class="elementor-post__text">
<h3 class="elementor-post__title">
<a href="https://randomnerdtutorials.com/esp32-static-fixed-ip-address-arduino-ide/" >
ESP32 Static/Fixed IP Address </a>
</h3>
</div>
</div>
</article>
<article class="elementor-post elementor-grid-item post-130716 post type-post status-publish format-standard has-post-thumbnail hentry category-esp32 category-esp32-project category-esp32-arduino-ide category-0-esp32 category-project mv-content-wrapper">
<div class="elementor-post__card">
<a class="elementor-post__thumbnail__link" href="https://randomnerdtutorials.com/esp32-websocket-server-sensor/" tabindex="-1" ><div class="elementor-post__thumbnail"><img width="1280" height="720" src="https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/04/ESP32-Websocket-Server-Sensor-Readings.jpg?fit=1280%2C720&amp;quality=100&amp;strip=all&amp;ssl=1" class="attachment-full size-full wp-image-130726" alt="ESP32 WebSocket Server Display Sensor Readings Arduino IDE" decoding="async" srcset="https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/04/ESP32-Websocket-Server-Sensor-Readings.jpg?w=1280&amp;quality=100&amp;strip=all&amp;ssl=1 1280w, https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/04/ESP32-Websocket-Server-Sensor-Readings.jpg?resize=300%2C169&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/04/ESP32-Websocket-Server-Sensor-Readings.jpg?resize=1024%2C576&amp;quality=100&amp;strip=all&amp;ssl=1 1024w, https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2023/04/ESP32-Websocket-Server-Sensor-Readings.jpg?resize=768%2C432&amp;quality=100&amp;strip=all&amp;ssl=1 768w" sizes="(max-width: 1280px) 100vw, 1280px" loading="lazy" fetchpriority="low"/></div></a>
<div class="elementor-post__text">
<h3 class="elementor-post__title">
<a href="https://randomnerdtutorials.com/esp32-websocket-server-sensor/" >
ESP32 WebSocket Server: Display Sensor Readings </a>
</h3>
</div>
</div>
</article>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
<br>
<div data-elementor-type="section" data-elementor-id="82829" class="elementor elementor-82829" data-elementor-post-type="elementor_library">
<section class="elementor-section elementor-top-section elementor-element elementor-element-1e028b5e elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="1e028b5e" data-element_type="section">
<div class="elementor-container elementor-column-gap-default">
<div class="elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-69628243" data-id="69628243" data-element_type="column">
<div class="elementor-widget-wrap elementor-element-populated">
<section class="elementor-section elementor-inner-section elementor-element elementor-element-4a02bbce elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="4a02bbce" data-element_type="section">
<div class="elementor-container elementor-column-gap-default">
<div class="elementor-column elementor-col-100 elementor-inner-column elementor-element elementor-element-3a76ce22" data-id="3a76ce22" data-element_type="column">
<div class="elementor-widget-wrap elementor-element-populated">
<div class="elementor-element elementor-element-d86fe9d elementor-widget elementor-widget-heading" data-id="d86fe9d" data-element_type="widget" data-widget_type="heading.default">
<div class="elementor-widget-container">
<h3 class="elementor-heading-title elementor-size-default">Enjoyed this project? Stay updated by subscribing our newsletter!</h3> </div>
</div>
<div class="elementor-element elementor-element-86bce7d elementor-button-align-center elementor-tablet-button-align-center elementor-mobile-button-align-center elementor-widget elementor-widget-form" data-id="86bce7d" data-element_type="widget" data-settings="{&quot;button_width&quot;:&quot;40&quot;,&quot;button_width_tablet&quot;:&quot;100&quot;,&quot;button_width_mobile&quot;:&quot;100&quot;,&quot;step_next_label&quot;:&quot;Next&quot;,&quot;step_previous_label&quot;:&quot;Previous&quot;,&quot;step_type&quot;:&quot;number_text&quot;,&quot;step_icon_shape&quot;:&quot;circle&quot;}" data-widget_type="form.default">
<div class="elementor-widget-container">
<form class="elementor-form" method="post" name="New Form">
<input type="hidden" name="post_id" value="82829"/>
<input type="hidden" name="form_id" value="86bce7d"/>
<input type="hidden" name="referer_title" value="Raspberry Pi Pico: Web Server (MicroPython) | Random Nerd Tutorials" />
<input type="hidden" name="queried_id" value="144635"/>
<div class="elementor-form-fields-wrapper elementor-labels-">
<div class="elementor-field-type-email elementor-field-group elementor-column elementor-field-group-email elementor-col-60 elementor-md-100 elementor-sm-100 elementor-field-required">
<input size="1" type="email" name="form_fields[email]" id="form-field-email" class="elementor-field elementor-size-md elementor-field-textual" placeholder="Your Email Address" required="required" aria-required="true">
</div>
<div class="elementor-field-group elementor-column elementor-field-type-submit elementor-col-40 e-form__buttons elementor-md-100 elementor-sm-100">
<button class="elementor-button elementor-size-md" type="submit">
<span class="elementor-button-content-wrapper">
<span class="elementor-button-icon">
<i aria-hidden="true" class="far fa-envelope"></i> </span>
<span class="elementor-button-text">SUBSCRIBE</span>
</span>
</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
</div>
</div>
</section>
</div>
</div>
</article>
<div class="comments-area">
<div id="comments">
<h2 class="comments-title">18 thoughts on &ldquo;Raspberry Pi Pico: Web Server (MicroPython)&rdquo;</h2>
<ol class="comment-list">
<li id="comment-883522" class="comment even thread-even depth-1 parent">
<article class="comment-body" id="div-comment-883522" itemtype="https://schema.org/Comment" itemscope>
<footer class="comment-meta" aria-label="Comment meta">
<img alt='' src='https://secure.gravatar.com/avatar/cb21c58a8c00a7ae00de4999c751077e?s=50&#038;d=mm&#038;r=g' srcset='https://secure.gravatar.com/avatar/cb21c58a8c00a7ae00de4999c751077e?s=100&#038;d=mm&#038;r=g 2x' class='avatar avatar-50 photo' height='50' width='50' decoding='async' loading="lazy" fetchpriority="low"/> <div class="comment-author-info">
<div class="comment-author vcard" itemprop="author" itemtype="https://schema.org/Person" itemscope>
<cite itemprop="name" class="fn">Jacques Vermaak</cite> </div>
<div class="entry-meta comment-metadata">
<a href="https://randomnerdtutorials.com/raspberry-pi-pico-web-server-micropython/#comment-883522"> <time datetime="2024-01-12T08:37:54+00:00" itemprop="datePublished">
January 12, 2024 at 8:37 am </time>
</a> </div>
</div>
</footer>
<div class="comment-content" itemprop="text">
<p>As always, very informative.</p>
<p>I tried my hand at Micro Python over the past holiday season. I currently have a Pool Water Temperature controller system running (Arduino Nano) keeping my pool water WARM (35°C and more sometimes). The controller monitors the temperature of the water heater panels on the roof. Once they reach a threshold Set Point, the Pool pump is switched on. Then the water temperature is monitored going to the panels and returning from the panels. I calculate the Difference. If the returning water is not greater than a required set point value (e.g. 0.5°C) the pump is switched off, and the whole process repeats.<br />
I wanted to use a Pi Pico W to have all the variables displayed on my phone via web server from the Pico W. The Web page part works 100%, but the control part (as mentioned above) does not execute unless a web page is required or refreshed.</p>
<p>I have the same code in the main loop. The problem with python &#8220;try:&#8221; is that it only seems to be triggered from the web page request.<br />
# Main loop to listen for connections<br />
while True:<br />
try: (code here)</p>
<p>How can &#8220;Control&#8221; code be called cyclically in python without a web page request? The control code must run 24/7, vs a web page only being called say once or twice a day?</p>
<span class="reply"><a rel='nofollow' class='comment-reply-link' href='#comment-883522' data-commentid="883522" data-postid="144635" data-belowelement="div-comment-883522" data-respondelement="respond" data-replyto="Reply to Jacques Vermaak" aria-label='Reply to Jacques Vermaak'>Reply</a></span> </div>
</article>
<ul class="children">
<li id="comment-883612" class="comment byuser comment-author-sara-santos bypostauthor odd alt depth-2 parent">
<article class="comment-body" id="div-comment-883612" itemtype="https://schema.org/Comment" itemscope>
<footer class="comment-meta" aria-label="Comment meta">
<img alt='' src='https://secure.gravatar.com/avatar/25e3da92f25bc3fde695d9c0d92207b0?s=50&#038;d=mm&#038;r=g' srcset='https://secure.gravatar.com/avatar/25e3da92f25bc3fde695d9c0d92207b0?s=100&#038;d=mm&#038;r=g 2x' class='avatar avatar-50 photo' height='50' width='50' decoding='async' loading="lazy" fetchpriority="low"/> <div class="comment-author-info">
<div class="comment-author vcard" itemprop="author" itemtype="https://schema.org/Person" itemscope>
<cite itemprop="name" class="fn">Sara Santos</cite> </div>
<div class="entry-meta comment-metadata">
<a href="https://randomnerdtutorials.com/raspberry-pi-pico-web-server-micropython/#comment-883612"> <time datetime="2024-01-12T17:48:00+00:00" itemprop="datePublished">
January 12, 2024 at 5:48 pm </time>
</a> </div>
</div>
</footer>
<div class="comment-content" itemprop="text">
<p>Hi.<br />
I think you can add that logic to the while loop, but outside the try statement for the web server.<br />
Did you try that?<br />
Regards,<br />
Sara</p>
<span class="reply"><a rel='nofollow' class='comment-reply-link' href='#comment-883612' data-commentid="883612" data-postid="144635" data-belowelement="div-comment-883612" data-respondelement="respond" data-replyto="Reply to Sara Santos" aria-label='Reply to Sara Santos'>Reply</a></span> </div>
</article>
<ul class="children">
<li id="comment-883746" class="comment even depth-3 parent">
<article class="comment-body" id="div-comment-883746" itemtype="https://schema.org/Comment" itemscope>
<footer class="comment-meta" aria-label="Comment meta">
<img alt='' src='https://secure.gravatar.com/avatar/cb21c58a8c00a7ae00de4999c751077e?s=50&#038;d=mm&#038;r=g' srcset='https://secure.gravatar.com/avatar/cb21c58a8c00a7ae00de4999c751077e?s=100&#038;d=mm&#038;r=g 2x' class='avatar avatar-50 photo' height='50' width='50' decoding='async' loading="lazy" fetchpriority="low"/> <div class="comment-author-info">
<div class="comment-author vcard" itemprop="author" itemtype="https://schema.org/Person" itemscope>
<cite itemprop="name" class="fn">Jacques Vermaak</cite> </div>
<div class="entry-meta comment-metadata">
<a href="https://randomnerdtutorials.com/raspberry-pi-pico-web-server-micropython/#comment-883746"> <time datetime="2024-01-13T08:46:47+00:00" itemprop="datePublished">
January 13, 2024 at 8:46 am </time>
</a> </div>
</div>
</footer>
<div class="comment-content" itemprop="text">
<p>Hi.</p>
<p>Yes, I&#8217;ve tried nearly everything, BUT, it would never have worked.</p>
<p>I found this very informative YouTube channel by Bob Grant.<br />
youtube.com/@BytesNBits</p>
<p>In there, Bob has a playlist &#8220;Web Control Panel for MicroPython&#8221;<br />
youtube.com/watch?v=h18LMskRNMA&amp;list=PLvOT6zBnJyYGLmvrJeYzRYwBFa44SVnLZ</p>
<p>He describes the calling of web pages as a &#8220;Blocking Function&#8221;. There is no way on earth that any other code will run unless you either do &#8220;Asynchronous calling (task management)&#8221; or using the second core of the Pico. A combination of the two is also possible and Bob explains that quite well.</p>
<p>I will play around with Bob&#8217;s suggestions and see what I manage to get going for my application.</p>
<p>Regards.</p>
<span class="reply"><a rel='nofollow' class='comment-reply-link' href='#comment-883746' data-commentid="883746" data-postid="144635" data-belowelement="div-comment-883746" data-respondelement="respond" data-replyto="Reply to Jacques Vermaak" aria-label='Reply to Jacques Vermaak'>Reply</a></span> </div>
</article>
<ul class="children">
<li id="comment-883755" class="comment byuser comment-author-sara-santos bypostauthor odd alt depth-4">
<article class="comment-body" id="div-comment-883755" itemtype="https://schema.org/Comment" itemscope>
<footer class="comment-meta" aria-label="Comment meta">
<img alt='' src='https://secure.gravatar.com/avatar/25e3da92f25bc3fde695d9c0d92207b0?s=50&#038;d=mm&#038;r=g' srcset='https://secure.gravatar.com/avatar/25e3da92f25bc3fde695d9c0d92207b0?s=100&#038;d=mm&#038;r=g 2x' class='avatar avatar-50 photo' height='50' width='50' decoding='async' loading="lazy" fetchpriority="low"/> <div class="comment-author-info">
<div class="comment-author vcard" itemprop="author" itemtype="https://schema.org/Person" itemscope>
<cite itemprop="name" class="fn">Sara Santos</cite> </div>
<div class="entry-meta comment-metadata">
<a href="https://randomnerdtutorials.com/raspberry-pi-pico-web-server-micropython/#comment-883755"> <time datetime="2024-01-13T10:46:30+00:00" itemprop="datePublished">
January 13, 2024 at 10:46 am </time>
</a> </div>
</div>
</footer>
<div class="comment-content" itemprop="text">
<p>Hi again.<br />
You&#8217;ll probably need to use the asyncio library for that, but I haven&#8217;t taken a look into that yet.<br />
Regards,<br />
Sara</p>
<span class="reply"><a rel='nofollow' class='comment-reply-link' href='#comment-883755' data-commentid="883755" data-postid="144635" data-belowelement="div-comment-883755" data-respondelement="respond" data-replyto="Reply to Sara Santos" aria-label='Reply to Sara Santos'>Reply</a></span> </div>
</article>
</li><!-- #comment-## -->
</ul><!-- .children -->
</li><!-- #comment-## -->
</ul><!-- .children -->
</li><!-- #comment-## -->
<li id="comment-887482" class="comment even depth-2">
<article class="comment-body" id="div-comment-887482" itemtype="https://schema.org/Comment" itemscope>
<footer class="comment-meta" aria-label="Comment meta">
<img alt='' src='https://secure.gravatar.com/avatar/f7e853702dd3ce54b51073a7924ab859?s=50&#038;d=mm&#038;r=g' srcset='https://secure.gravatar.com/avatar/f7e853702dd3ce54b51073a7924ab859?s=100&#038;d=mm&#038;r=g 2x' class='avatar avatar-50 photo' height='50' width='50' decoding='async' loading="lazy" fetchpriority="low"/> <div class="comment-author-info">
<div class="comment-author vcard" itemprop="author" itemtype="https://schema.org/Person" itemscope>
<cite itemprop="name" class="fn">Emilio</cite> </div>
<div class="entry-meta comment-metadata">
<a href="https://randomnerdtutorials.com/raspberry-pi-pico-web-server-micropython/#comment-887482"> <time datetime="2024-02-01T17:29:18+00:00" itemprop="datePublished">
February 1, 2024 at 5:29 pm </time>
</a> </div>
</div>
</footer>
<div class="comment-content" itemprop="text">
<p>Option 1. Use timer(s) to run routines like read temp and store it into a variable, do your comparison to turn on/off your pump. Then use the web page to read said variables and/or to control the pump manually. This way, running/displaying the web page will not condition your code.<br />
Option 2. Use AJAX call to update the content of the page.</p>
<span class="reply"><a rel='nofollow' class='comment-reply-link' href='#comment-887482' data-commentid="887482" data-postid="144635" data-belowelement="div-comment-887482" data-respondelement="respond" data-replyto="Reply to Emilio" aria-label='Reply to Emilio'>Reply</a></span> </div>
</article>
</li><!-- #comment-## -->
</ul><!-- .children -->
</li><!-- #comment-## -->
<li id="comment-886426" class="comment odd alt thread-odd thread-alt depth-1 parent">
<article class="comment-body" id="div-comment-886426" itemtype="https://schema.org/Comment" itemscope>
<footer class="comment-meta" aria-label="Comment meta">
<img alt='' src='https://secure.gravatar.com/avatar/8f4cc9e39eb9eea7e7f55f35e94cddc4?s=50&#038;d=mm&#038;r=g' srcset='https://secure.gravatar.com/avatar/8f4cc9e39eb9eea7e7f55f35e94cddc4?s=100&#038;d=mm&#038;r=g 2x' class='avatar avatar-50 photo' height='50' width='50' decoding='async' loading="lazy" fetchpriority="low"/> <div class="comment-author-info">
<div class="comment-author vcard" itemprop="author" itemtype="https://schema.org/Person" itemscope>
<cite itemprop="name" class="fn">Matt Ganz</cite> </div>
<div class="entry-meta comment-metadata">
<a href="https://randomnerdtutorials.com/raspberry-pi-pico-web-server-micropython/#comment-886426"> <time datetime="2024-01-27T07:16:29+00:00" itemprop="datePublished">
January 27, 2024 at 7:16 am </time>
</a> </div>
</div>
</footer>
<div class="comment-content" itemprop="text">
<p>I got the program to run perfectly on the first try. I then copied it to the RP Pico as main.py . When I then plug the RP Pico into a USB power supply, the unit appears unresponsive. Ive tried several times without luck. Any suggestions? Am I missing a step? Thanks</p>
<span class="reply"><a rel='nofollow' class='comment-reply-link' href='#comment-886426' data-commentid="886426" data-postid="144635" data-belowelement="div-comment-886426" data-respondelement="respond" data-replyto="Reply to Matt Ganz" aria-label='Reply to Matt Ganz'>Reply</a></span> </div>
</article>
<ul class="children">
<li id="comment-886794" class="comment byuser comment-author-sara-santos bypostauthor even depth-2">
<article class="comment-body" id="div-comment-886794" itemtype="https://schema.org/Comment" itemscope>
<footer class="comment-meta" aria-label="Comment meta">
<img alt='' src='https://secure.gravatar.com/avatar/25e3da92f25bc3fde695d9c0d92207b0?s=50&#038;d=mm&#038;r=g' srcset='https://secure.gravatar.com/avatar/25e3da92f25bc3fde695d9c0d92207b0?s=100&#038;d=mm&#038;r=g 2x' class='avatar avatar-50 photo' height='50' width='50' decoding='async' loading="lazy" fetchpriority="low"/> <div class="comment-author-info">
<div class="comment-author vcard" itemprop="author" itemtype="https://schema.org/Person" itemscope>
<cite itemprop="name" class="fn">Sara Santos</cite> </div>
<div class="entry-meta comment-metadata">
<a href="https://randomnerdtutorials.com/raspberry-pi-pico-web-server-micropython/#comment-886794"> <time datetime="2024-01-29T10:24:15+00:00" itemprop="datePublished">
January 29, 2024 at 10:24 am </time>
</a> </div>
</div>
</footer>
<div class="comment-content" itemprop="text">
<p>Hi.<br />
Did you check that the file was actually uploaded to the Pi and that it is in the filesystem?<br />
Regards,<br />
Sara</p>
<span class="reply"><a rel='nofollow' class='comment-reply-link' href='#comment-886794' data-commentid="886794" data-postid="144635" data-belowelement="div-comment-886794" data-respondelement="respond" data-replyto="Reply to Sara Santos" aria-label='Reply to Sara Santos'>Reply</a></span> </div>
</article>
</li><!-- #comment-## -->
</ul><!-- .children -->
</li><!-- #comment-## -->
<li id="comment-886863" class="comment odd alt thread-even depth-1">
<article class="comment-body" id="div-comment-886863" itemtype="https://schema.org/Comment" itemscope>
<footer class="comment-meta" aria-label="Comment meta">
<img alt='' src='https://secure.gravatar.com/avatar/8f4cc9e39eb9eea7e7f55f35e94cddc4?s=50&#038;d=mm&#038;r=g' srcset='https://secure.gravatar.com/avatar/8f4cc9e39eb9eea7e7f55f35e94cddc4?s=100&#038;d=mm&#038;r=g 2x' class='avatar avatar-50 photo' height='50' width='50' decoding='async' loading="lazy" fetchpriority="low"/> <div class="comment-author-info">
<div class="comment-author vcard" itemprop="author" itemtype="https://schema.org/Person" itemscope>
<cite itemprop="name" class="fn">Matt Ganz</cite> </div>
<div class="entry-meta comment-metadata">
<a href="https://randomnerdtutorials.com/raspberry-pi-pico-web-server-micropython/#comment-886863"> <time datetime="2024-01-29T17:32:28+00:00" itemprop="datePublished">
January 29, 2024 at 5:32 pm </time>
</a> </div>
</div>
</footer>
<div class="comment-content" itemprop="text">
<p>Yes. A bit more info… I tried commenting out all of the print statements. Then I found that it works properly if, after I plug it into the usb power supply, I pull the run pin (Pin 30) to ground momentarily to force a reset. (However, unplugging and replugging the usb doesnt seem to work). Hmmmm.</p>
<span class="reply"><a rel='nofollow' class='comment-reply-link' href='#comment-886863' data-commentid="886863" data-postid="144635" data-belowelement="div-comment-886863" data-respondelement="respond" data-replyto="Reply to Matt Ganz" aria-label='Reply to Matt Ganz'>Reply</a></span> </div>
</article>
</li><!-- #comment-## -->
<li id="comment-887593" class="comment even thread-odd thread-alt depth-1 parent">
<article class="comment-body" id="div-comment-887593" itemtype="https://schema.org/Comment" itemscope>
<footer class="comment-meta" aria-label="Comment meta">
<img alt='' src='https://secure.gravatar.com/avatar/6d082487f9d95d90f23c2eac6579a095?s=50&#038;d=mm&#038;r=g' srcset='https://secure.gravatar.com/avatar/6d082487f9d95d90f23c2eac6579a095?s=100&#038;d=mm&#038;r=g 2x' class='avatar avatar-50 photo' height='50' width='50' decoding='async' loading="lazy" fetchpriority="low"/> <div class="comment-author-info">
<div class="comment-author vcard" itemprop="author" itemtype="https://schema.org/Person" itemscope>
<cite itemprop="name" class="fn">Michael B.</cite> </div>
<div class="entry-meta comment-metadata">
<a href="https://randomnerdtutorials.com/raspberry-pi-pico-web-server-micropython/#comment-887593"> <time datetime="2024-02-02T10:10:47+00:00" itemprop="datePublished">
February 2, 2024 at 10:10 am </time>
</a> </div>
</div>
</footer>
<div class="comment-content" itemprop="text">
<p>Hi Sara and Rui,<br />
I have read several of your tutorials on the Raspberry Pi Pico and Raspberry Pi Pico W, but have no practical experience with either of these modules.<br />
This tutorial constantly refers to the Raspberry Pi Pico, but my understanding is that none of this will work with the basic Pico. It will only work with a Pico W.<br />
Perhaps you should update the tutorial to specify that a Pico W is essential and change all references from Pico to Pico W.</p>
<span class="reply"><a rel='nofollow' class='comment-reply-link' href='#comment-887593' data-commentid="887593" data-postid="144635" data-belowelement="div-comment-887593" data-respondelement="respond" data-replyto="Reply to Michael B." aria-label='Reply to Michael B.'>Reply</a></span> </div>
</article>
<ul class="children">
<li id="comment-888024" class="comment byuser comment-author-sara-santos bypostauthor odd alt depth-2">
<article class="comment-body" id="div-comment-888024" itemtype="https://schema.org/Comment" itemscope>
<footer class="comment-meta" aria-label="Comment meta">
<img alt='' src='https://secure.gravatar.com/avatar/25e3da92f25bc3fde695d9c0d92207b0?s=50&#038;d=mm&#038;r=g' srcset='https://secure.gravatar.com/avatar/25e3da92f25bc3fde695d9c0d92207b0?s=100&#038;d=mm&#038;r=g 2x' class='avatar avatar-50 photo' height='50' width='50' decoding='async' loading="lazy" fetchpriority="low"/> <div class="comment-author-info">
<div class="comment-author vcard" itemprop="author" itemtype="https://schema.org/Person" itemscope>
<cite itemprop="name" class="fn">Sara Santos</cite> </div>
<div class="entry-meta comment-metadata">
<a href="https://randomnerdtutorials.com/raspberry-pi-pico-web-server-micropython/#comment-888024"> <time datetime="2024-02-04T12:17:41+00:00" itemprop="datePublished">
February 4, 2024 at 12:17 pm </time>
</a> </div>
</div>
</footer>
<div class="comment-content" itemprop="text">
<p>Hi.<br />
Yes. You are right. You need a Pico W.<br />
I added a note at the beginning of the tutorial mentioning that you need a Pico W, and that when we&#8217;re referring to the Raspberry Pi Pico, we mean a Raspberry Pi Pico W.</p>
<p>Thanks for pointing that out.</p>
<p>Regards,<br />
Sara</p>
<span class="reply"><a rel='nofollow' class='comment-reply-link' href='#comment-888024' data-commentid="888024" data-postid="144635" data-belowelement="div-comment-888024" data-respondelement="respond" data-replyto="Reply to Sara Santos" aria-label='Reply to Sara Santos'>Reply</a></span> </div>
</article>
</li><!-- #comment-## -->
</ul><!-- .children -->
</li><!-- #comment-## -->
<li id="comment-888316" class="comment even thread-even depth-1 parent">
<article class="comment-body" id="div-comment-888316" itemtype="https://schema.org/Comment" itemscope>
<footer class="comment-meta" aria-label="Comment meta">
<img alt='' src='https://secure.gravatar.com/avatar/fe16c70c41c50203ef994d5acc030982?s=50&#038;d=mm&#038;r=g' srcset='https://secure.gravatar.com/avatar/fe16c70c41c50203ef994d5acc030982?s=100&#038;d=mm&#038;r=g 2x' class='avatar avatar-50 photo' height='50' width='50' decoding='async' loading="lazy" fetchpriority="low"/> <div class="comment-author-info">
<div class="comment-author vcard" itemprop="author" itemtype="https://schema.org/Person" itemscope>
<cite itemprop="name" class="fn">Michele</cite> </div>
<div class="entry-meta comment-metadata">
<a href="https://randomnerdtutorials.com/raspberry-pi-pico-web-server-micropython/#comment-888316"> <time datetime="2024-02-05T18:06:34+00:00" itemprop="datePublished">
February 5, 2024 at 6:06 pm </time>
</a> </div>
</div>
</footer>
<div class="comment-content" itemprop="text">
<p>Raspberry Pico is a dual core processor. Use one for web server and the other for the logic</p>
<span class="reply"><a rel='nofollow' class='comment-reply-link' href='#comment-888316' data-commentid="888316" data-postid="144635" data-belowelement="div-comment-888316" data-respondelement="respond" data-replyto="Reply to Michele" aria-label='Reply to Michele'>Reply</a></span> </div>
</article>
<ul class="children">
<li id="comment-889516" class="comment byuser comment-author-sara-santos bypostauthor odd alt depth-2 parent">
<article class="comment-body" id="div-comment-889516" itemtype="https://schema.org/Comment" itemscope>
<footer class="comment-meta" aria-label="Comment meta">
<img alt='' src='https://secure.gravatar.com/avatar/25e3da92f25bc3fde695d9c0d92207b0?s=50&#038;d=mm&#038;r=g' srcset='https://secure.gravatar.com/avatar/25e3da92f25bc3fde695d9c0d92207b0?s=100&#038;d=mm&#038;r=g 2x' class='avatar avatar-50 photo' height='50' width='50' decoding='async' loading="lazy" fetchpriority="low"/> <div class="comment-author-info">
<div class="comment-author vcard" itemprop="author" itemtype="https://schema.org/Person" itemscope>
<cite itemprop="name" class="fn">Sara Santos</cite> </div>
<div class="entry-meta comment-metadata">
<a href="https://randomnerdtutorials.com/raspberry-pi-pico-web-server-micropython/#comment-889516"> <time datetime="2024-02-09T12:24:00+00:00" itemprop="datePublished">
February 9, 2024 at 12:24 pm </time>
</a> </div>
</div>
</footer>
<div class="comment-content" itemprop="text">
<p>Hi.<br />
Alternatively, you can use asynchronous tasks using asyncio.<br />
It works great. I&#8217;ve tried it already. Need to create a tutorial about that.<br />
Regards,<br />
Sara</p>
<span class="reply"><a rel='nofollow' class='comment-reply-link' href='#comment-889516' data-commentid="889516" data-postid="144635" data-belowelement="div-comment-889516" data-respondelement="respond" data-replyto="Reply to Sara Santos" aria-label='Reply to Sara Santos'>Reply</a></span> </div>
</article>
<ul class="children">
<li id="comment-889596" class="comment even depth-3 parent">
<article class="comment-body" id="div-comment-889596" itemtype="https://schema.org/Comment" itemscope>
<footer class="comment-meta" aria-label="Comment meta">
<img alt='' src='https://secure.gravatar.com/avatar/8f4cc9e39eb9eea7e7f55f35e94cddc4?s=50&#038;d=mm&#038;r=g' srcset='https://secure.gravatar.com/avatar/8f4cc9e39eb9eea7e7f55f35e94cddc4?s=100&#038;d=mm&#038;r=g 2x' class='avatar avatar-50 photo' height='50' width='50' decoding='async' loading="lazy" fetchpriority="low"/> <div class="comment-author-info">
<div class="comment-author vcard" itemprop="author" itemtype="https://schema.org/Person" itemscope>
<cite itemprop="name" class="fn">Matt</cite> </div>
<div class="entry-meta comment-metadata">
<a href="https://randomnerdtutorials.com/raspberry-pi-pico-web-server-micropython/#comment-889596"> <time datetime="2024-02-09T17:46:23+00:00" itemprop="datePublished">
February 9, 2024 at 5:46 pm </time>
</a> </div>
</div>
</footer>
<div class="comment-content" itemprop="text">
<p>It would be great if you could put together a little tutorial on how to do multithreading. Perhaps you could redo this same project using two threads to show us how.</p>
<span class="reply"><a rel='nofollow' class='comment-reply-link' href='#comment-889596' data-commentid="889596" data-postid="144635" data-belowelement="div-comment-889596" data-respondelement="respond" data-replyto="Reply to Matt" aria-label='Reply to Matt'>Reply</a></span> </div>
</article>
<ul class="children">
<li id="comment-892183" class="comment odd alt depth-4">
<article class="comment-body" id="div-comment-892183" itemtype="https://schema.org/Comment" itemscope>
<footer class="comment-meta" aria-label="Comment meta">
<img alt='' src='https://secure.gravatar.com/avatar/fe16c70c41c50203ef994d5acc030982?s=50&#038;d=mm&#038;r=g' srcset='https://secure.gravatar.com/avatar/fe16c70c41c50203ef994d5acc030982?s=100&#038;d=mm&#038;r=g 2x' class='avatar avatar-50 photo' height='50' width='50' decoding='async' loading="lazy" fetchpriority="low"/> <div class="comment-author-info">
<div class="comment-author vcard" itemprop="author" itemtype="https://schema.org/Person" itemscope>
<cite itemprop="name" class="fn">Michele</cite> </div>
<div class="entry-meta comment-metadata">
<a href="https://randomnerdtutorials.com/raspberry-pi-pico-web-server-micropython/#comment-892183"> <time datetime="2024-02-17T06:24:34+00:00" itemprop="datePublished">
February 17, 2024 at 6:24 am </time>
</a> </div>
</div>
</footer>
<div class="comment-content" itemprop="text">
<p>Here you are with a sample of thread in Raspberry Pico. It&#8217;s inspired by the one I took from the book issued by Raspberry Pi (free on line).<br />
It&#8217;s the simulation of a traffic light where the lights on/off are controlled by the simple delay instruction and there is a button for the pedestrians to ask their right to cross the road. If we use one single core, it cannot capture the click on the button because the delay is &#8220;killing&#8221; the CPU for some seconds. If this task is transferred to the second core, it&#8217;s completely independent and the click can be seen immediately and stored to be managed after the light is switched off. Obviously this task is still a task of the first core which also switches a buzzer on to signal the pedestrian crossing. Good work!</p>
<p>from machine import Pin, PWM<br />
import time<br />
import _thread</p>
<p>ledRed = Pin(13, Pin.OUT)<br />
ledYellow = Pin(14, Pin.OUT)<br />
ledGreen = Pin(15, Pin.OUT)<br />
button = Pin( 7, Pin.IN, Pin.PULL_DOWN)<br />
buzzer = PWM(8)</p>
<p>global buttonClick<br />
buttonClick = False</p>
<p>def thread_Readbutton():<br />
global buttonClick<br />
while True:<br />
if button.value() == 1:<br />
buttonClick = True<br />
print(&#8220;Click&#8221;)</p>
<p>_thread.start_new_thread(thread_Readbutton, ())</p>
<p>while (True):<br />
ledRed.value(1)<br />
print(&#8220;Red&#8221;)<br />
if buttonClick == True:<br />
for i in range(20):<br />
buzzer.freq(500)<br />
buzzer.duty_u16(16000)<br />
ledYellow.on()<br />
time.sleep(0.25)<br />
ledYellow.off()<br />
buzzer.freq(100)<br />
time.sleep(0.25)<br />
buttonClick = False<br />
buzzer.freq(20)<br />
buzzer.duty_u16(20)<br />
time.sleep(5)<br />
ledRed.value(0)<br />
print(&#8220;Green&#8221;)<br />
ledGreen.value(1)<br />
time.sleep(5)<br />
print(&#8220;Yellow&#8221;)<br />
ledYellow.value(1)<br />
time.sleep(2)<br />
ledGreen.value(0)<br />
ledYellow.value(0)</p>
<span class="reply"><a rel='nofollow' class='comment-reply-link' href='#comment-892183' data-commentid="892183" data-postid="144635" data-belowelement="div-comment-892183" data-respondelement="respond" data-replyto="Reply to Michele" aria-label='Reply to Michele'>Reply</a></span> </div>
</article>
</li><!-- #comment-## -->
</ul><!-- .children -->
</li><!-- #comment-## -->
</ul><!-- .children -->
</li><!-- #comment-## -->
<li id="comment-889528" class="comment even depth-2 parent">
<article class="comment-body" id="div-comment-889528" itemtype="https://schema.org/Comment" itemscope>
<footer class="comment-meta" aria-label="Comment meta">
<img alt='' src='https://secure.gravatar.com/avatar/cb21c58a8c00a7ae00de4999c751077e?s=50&#038;d=mm&#038;r=g' srcset='https://secure.gravatar.com/avatar/cb21c58a8c00a7ae00de4999c751077e?s=100&#038;d=mm&#038;r=g 2x' class='avatar avatar-50 photo' height='50' width='50' decoding='async' loading="lazy" fetchpriority="low"/> <div class="comment-author-info">
<div class="comment-author vcard" itemprop="author" itemtype="https://schema.org/Person" itemscope>
<cite itemprop="name" class="fn">Jacques Vermaak</cite> </div>
<div class="entry-meta comment-metadata">
<a href="https://randomnerdtutorials.com/raspberry-pi-pico-web-server-micropython/#comment-889528"> <time datetime="2024-02-09T13:16:27+00:00" itemprop="datePublished">
February 9, 2024 at 1:16 pm </time>
</a> </div>
</div>
</footer>
<div class="comment-content" itemprop="text">
<p>I have tried that.<br />
Using &#8216;import _thread&#8217; and adding this line to my code &#8230;.</p>
<p>run main control loop on second processor</p>
<p>second_thread = _thread.start_new_thread(main_loop, ())<br />
did work for just a few seconds and then things go south real fast.<br />
According to the &#8220;_thread&#8221; documentation it seems like development is still in Beta phase.</p>
<p>I have managed to get the &#8220;uasyncio&#8221; going very well.<br />
Need to import uasyncio</p>
<p>Have one function setup as follow<br />
#############</p>
<p>Call web server handling</p>
<p>#############<br />
async def phew_server():<br />
server.run()<br />
await uasyncio.sleep_ms(50)</p>
<p>Have a second function setup as follow<br />
#############</p>
<p>Call Control section</p>
<p>#############<br />
async def main_loop():<br />
while True:</p>
<p>And right at the end of the python file the following<br />
#############</p>
<p>MAIN</p>
<p>#############<br />
event_loop = uasyncio.get_event_loop()<br />
event_loop.create_task(phew_server())<br />
event_loop.create_task(main_loop())<br />
event_loop.run_forever()</p>
<p>Runs like a dream. No hangups or failures.</p>
<span class="reply"><a rel='nofollow' class='comment-reply-link' href='#comment-889528' data-commentid="889528" data-postid="144635" data-belowelement="div-comment-889528" data-respondelement="respond" data-replyto="Reply to Jacques Vermaak" aria-label='Reply to Jacques Vermaak'>Reply</a></span> </div>
</article>
<ul class="children">
<li id="comment-889586" class="comment odd alt depth-3">
<article class="comment-body" id="div-comment-889586" itemtype="https://schema.org/Comment" itemscope>
<footer class="comment-meta" aria-label="Comment meta">
<img alt='' src='https://secure.gravatar.com/avatar/f7e853702dd3ce54b51073a7924ab859?s=50&#038;d=mm&#038;r=g' srcset='https://secure.gravatar.com/avatar/f7e853702dd3ce54b51073a7924ab859?s=100&#038;d=mm&#038;r=g 2x' class='avatar avatar-50 photo' height='50' width='50' decoding='async' loading="lazy" fetchpriority="low"/> <div class="comment-author-info">
<div class="comment-author vcard" itemprop="author" itemtype="https://schema.org/Person" itemscope>
<cite itemprop="name" class="fn">Emilio</cite> </div>
<div class="entry-meta comment-metadata">
<a href="https://randomnerdtutorials.com/raspberry-pi-pico-web-server-micropython/#comment-889586"> <time datetime="2024-02-09T17:01:40+00:00" itemprop="datePublished">
February 9, 2024 at 5:01 pm </time>
</a> </div>
</div>
</footer>
<div class="comment-content" itemprop="text">
<p>You may want to take a peek here:<br />
<a href="https://gist.github.com/aallan/3d45a062f26bc425b22a17ec9c81e3b6" rel="nofollow ugc">https://gist.github.com/aallan/3d45a062f26bc425b22a17ec9c81e3b6</a></p>
<span class="reply"><a rel='nofollow' class='comment-reply-link' href='#comment-889586' data-commentid="889586" data-postid="144635" data-belowelement="div-comment-889586" data-respondelement="respond" data-replyto="Reply to Emilio" aria-label='Reply to Emilio'>Reply</a></span> </div>
</article>
</li><!-- #comment-## -->
</ul><!-- .children -->
</li><!-- #comment-## -->
</ul><!-- .children -->
</li><!-- #comment-## -->
<li id="comment-983159" class="comment even thread-odd thread-alt depth-1 parent">
<article class="comment-body" id="div-comment-983159" itemtype="https://schema.org/Comment" itemscope>
<footer class="comment-meta" aria-label="Comment meta">
<img alt='' src='https://secure.gravatar.com/avatar/6bab34395892ddb13e815a5f38f0311f?s=50&#038;d=mm&#038;r=g' srcset='https://secure.gravatar.com/avatar/6bab34395892ddb13e815a5f38f0311f?s=100&#038;d=mm&#038;r=g 2x' class='avatar avatar-50 photo' height='50' width='50' decoding='async' loading="lazy" fetchpriority="low"/> <div class="comment-author-info">
<div class="comment-author vcard" itemprop="author" itemtype="https://schema.org/Person" itemscope>
<cite itemprop="name" class="fn">Luis</cite> </div>
<div class="entry-meta comment-metadata">
<a href="https://randomnerdtutorials.com/raspberry-pi-pico-web-server-micropython/#comment-983159"> <time datetime="2024-11-14T10:09:35+00:00" itemprop="datePublished">
November 14, 2024 at 10:09 am </time>
</a> </div>
</div>
</footer>
<div class="comment-content" itemprop="text">
<p>Dear Sara:<br />
Recently I have bought two Raspberry pi pico (original) not Chinese, well I have tried several times to install your RPIPIW Webserver in order to see how it works, well every try has been rejected with the &#8220;import network&#8221; instrucction, I have tried to solve installing the pluggin &#8220;network&#8221; in Thonny, and the the same result (f..y..!!), always network does not work( sh..!!). Solution the version of micropython in both microcontrollers is the latest micropython 1.24 and it does not work , I have read in <a href="https://forums.raspberrypi.com/viewtopic.php?t=359263" rel="nofollow ugc">https://forums.raspberrypi.com/viewtopic.php?t=359263</a> that version 1.20 works perfectly (<a href="https://github.com/micropython/micropython/releases/tag/v1.20.0" rel="nofollow ugc">https://github.com/micropython/micropython/releases/tag/v1.20.0</a>). Well I will try to write the different steps of how to reinstall the software inside the Raspberry pi pico w, hope this lines will help ,also I have found something in order to run programs in the fake rpipw-esp8295 .<br />
I am not going to surrender if I could make work an Esp01 this means nothing i only need the help of Madonna, Tears for fears, The cure, an U2 and will work.<br />
Best regards<br />
Visca Valencia<br />
Luis</p>
<span class="reply"><a rel='nofollow' class='comment-reply-link' href='#comment-983159' data-commentid="983159" data-postid="144635" data-belowelement="div-comment-983159" data-respondelement="respond" data-replyto="Reply to Luis" aria-label='Reply to Luis'>Reply</a></span> </div>
</article>
<ul class="children">
<li id="comment-983171" class="comment byuser comment-author-sara-santos bypostauthor odd alt depth-2">
<article class="comment-body" id="div-comment-983171" itemtype="https://schema.org/Comment" itemscope>
<footer class="comment-meta" aria-label="Comment meta">
<img alt='' src='https://secure.gravatar.com/avatar/25e3da92f25bc3fde695d9c0d92207b0?s=50&#038;d=mm&#038;r=g' srcset='https://secure.gravatar.com/avatar/25e3da92f25bc3fde695d9c0d92207b0?s=100&#038;d=mm&#038;r=g 2x' class='avatar avatar-50 photo' height='50' width='50' decoding='async' loading="lazy" fetchpriority="low"/> <div class="comment-author-info">
<div class="comment-author vcard" itemprop="author" itemtype="https://schema.org/Person" itemscope>
<cite itemprop="name" class="fn">Sara Santos</cite> </div>
<div class="entry-meta comment-metadata">
<a href="https://randomnerdtutorials.com/raspberry-pi-pico-web-server-micropython/#comment-983171"> <time datetime="2024-11-14T10:44:56+00:00" itemprop="datePublished">
November 14, 2024 at 10:44 am </time>
</a> </div>
</div>
</footer>
<div class="comment-content" itemprop="text">
<p>Hi.<br />
Your problem is probably one of the following:<br />
&#8211; you don&#8217;t have a Raspberry Pi Pico W (you have the Pico version without the W—without network, so it doesn&#8217;t work). OR:<br />
&#8211; you uploaded micropython firmware for the Pico (which doesn&#8217;t have Wi-Fi support), instead of the Pico W, with Wi-Fi support.<br />
When uploading the firmware, make sure you select the right one.<br />
Regards,<br />
Sara</p>
<span class="reply"><a rel='nofollow' class='comment-reply-link' href='#comment-983171' data-commentid="983171" data-postid="144635" data-belowelement="div-comment-983171" data-respondelement="respond" data-replyto="Reply to Sara Santos" aria-label='Reply to Sara Santos'>Reply</a></span> </div>
</article>
</li><!-- #comment-## -->
</ul><!-- .children -->
</li><!-- #comment-## -->
</ol><!-- .comment-list -->
<div id="respond" class="comment-respond">
<h3 id="reply-title" class="comment-reply-title">Leave a Comment <small><a rel="nofollow" id="cancel-comment-reply-link" href="/raspberry-pi-pico-web-server-micropython/#respond" style="display:none;">Cancel reply</a></small></h3><form action="https://randomnerdtutorials.com/wp-comments-post.php" method="post" id="commentform" class="comment-form" novalidate><p class="comment-form-comment"><label for="comment" class="screen-reader-text">Comment</label><textarea id="comment" name="comment" cols="45" rows="8" required></textarea></p><label for="author" class="screen-reader-text">Name</label><input placeholder="Name *" id="author" name="author" type="text" value="" size="30" required />
<label for="email" class="screen-reader-text">Email</label><input placeholder="Email *" id="email" name="email" type="email" value="" size="30" required />
<label for="url" class="screen-reader-text">Website</label><input placeholder="Website" id="url" name="url" type="url" value="" size="30" />
<p class="comment-subscription-form"><input type="checkbox" name="subscribe_comments" id="subscribe_comments" value="subscribe" style="width: auto; -moz-appearance: checkbox; -webkit-appearance: checkbox;" /> <label class="subscribe-label" id="subscribe-label" for="subscribe_comments">Notify me of follow-up comments by email.</label></p><p class="comment-subscription-form"><input type="checkbox" name="subscribe_blog" id="subscribe_blog" value="subscribe" style="width: auto; -moz-appearance: checkbox; -webkit-appearance: checkbox;" /> <label class="subscribe-label" id="subscribe-blog-label" for="subscribe_blog">Notify me of new posts by email.</label></p><p class="form-submit"><input name="submit" type="submit" id="submit" class="submit" value="Post Comment" /> <input type='hidden' name='comment_post_ID' value='144635' id='comment_post_ID' />
<input type='hidden' name='comment_parent' id='comment_parent' value='0' />
</p><p style="display: none;"><input type="hidden" id="akismet_comment_nonce" name="akismet_comment_nonce" value="3de44e4c33" /></p><p style="display: none !important;" class="akismet-fields-container" data-prefix="ak_"><label>&#916;<textarea name="ak_hp_textarea" cols="45" rows="8" maxlength="100"></textarea></label><input type="hidden" id="ak_js_1" name="ak_js" value="131"/><script src="data:text/javascript,document.getElementById%28%20%22ak_js_1%22%20%29.setAttribute%28%20%22value%22%2C%20%28%20new%20Date%28%29%20%29.getTime%28%29%20%29%3B" defer></script></p></form> </div><!-- #respond -->
</div><!-- #comments -->
</div>
</main>
</div>
<div class="widget-area sidebar is-left-sidebar grid-15 tablet-grid-15 mobile-grid-100 grid-parent pull-60 tablet-pull-60" id="left-sidebar">
<div class="inside-left-sidebar">
<aside id="text-61" class="widget inner-padding widget_text"> <div class="textwidget"><div class="rnt-sb-m">
<p><span class="rnt-shl">Learn Raspberry Pi Pico</span></p>
<p><a href="https://randomnerdtutorials.com/raspberry-pi-pico-w-pinout-gpios/">Raspberry Pi Pico Pinout</a></p>
<div class="rnt-sb-m">
<p><strong>MicroPython</strong></p>
<p><a href="https://randomnerdtutorials.com/getting-started-raspberry-pi-pico-w/">Getting Started</a></p>
<p><a href="https://randomnerdtutorials.com/raspberry-pi-pico-vs-code-micropython/">Programming with VS Code</a></p>
<p><a href="https://randomnerdtutorials.com/raspberry-pi-pico-outputs-inputs-micropython/">Inputs and Outputs</a></p>
<p><a href="https://randomnerdtutorials.com/raspberry-pi-pico-analog-inputs-micropython/">Analog Inputs</a></p>
<p><a href="https://randomnerdtutorials.com/raspberry-pi-pico-pwm-micropython/">PWM</a></p>
<p><a href="https://randomnerdtutorials.com/raspberry-pi-pico-dht11-dht22-micropython/">DHT11/DHT22</a></p>
<p><a href="https://randomnerdtutorials.com/raspberry-pi-pico-ds18b20-micropython/">DS18B20</a></p>
<p><a href="https://randomnerdtutorials.com/raspberry-pi-pico-bme280-micropython/">BME280</a></p>
<p><a href="https://randomnerdtutorials.com/raspberry-pi-pico-internal-temperature-micropython/">Built-in Temp. Sensor</a></p>
<p><a href="https://randomnerdtutorials.com/raspberry-pi-pico-ssd1306-oled-micropython/">SSD1306 OLED</a></p>
<p><a href="https://randomnerdtutorials.com/raspberry-pi-pico-rcwl-0516-micropython/">RCWL-0516</a></p>
<p><a href="https://randomnerdtutorials.com/raspberry-pi-pico-motion-pir-micropython/">PIR Motion</a></p>
<p><a href="https://randomnerdtutorials.com/raspberry-pi-pico-i2c-lcd-display-micropython/">I2C LCD Display</a></p>
<p><a href="https://randomnerdtutorials.com/raspberry-pi-pico-i2c-scanner-micropython/">I2C Scanner</a></p>
<p><a href="https://randomnerdtutorials.com/raspberry-pi-pico-web-server-micropython/">Basic Web Server</a></p>
<p><a href="https://randomnerdtutorials.com/raspberry-pi-pico-w-asynchronous-web-server-micropython/">Async Web Server</a></p>
<p><a href="https://randomnerdtutorials.com/raspberry-pi-pico-w-mqtt-micropython/">MQTT Communication</a></p>
<p><a href="https://randomnerdtutorials.com/raspberry-pi-pico-w-send-email-micropython/">Send Emails</a></p>
<p><a href="https://randomnerdtutorials.com/raspberry-pi-pico-dc-motor-micropython/">DC Motor</a></p>
<p><a href="https://randomnerdtutorials.com/raspberry-pi-pico-stepper-motor-micropython/">Stepper Motor</a></p>
<p><a href="https://randomnerdtutorials.com/raspberry-pi-pico-servo-motor-micropython/">Servo Motor</a></p>
<p><strong>Arduino Programming</strong></p>
<p><a href="https://randomnerdtutorials.com/programming-raspberry-pi-pico-w-arduino-ide/">Getting Started</a></p>
<p><a href="https://randomnerdtutorials.com/raspberry-pi-pico-outputs-inputs-arduino/">Inputs and Outputs</a></p>
<p><a href="https://randomnerdtutorials.com/raspberry-pi-pico-analog-inputs-arduino/">Analog Inputs</a></p>
<p><a href="https://randomnerdtutorials.com/raspberry-pi-pico-pwm-analogwrite-arduino/">PWM</a></p>
<p><a href="https://randomnerdtutorials.com/raspberry-pi-pico-dht11-dht22-arduino/">DHT11/DHT22</a></p>
<p><a href="https://randomnerdtutorials.com/raspberry-pi-pico-ds18b20-arduino/">DS18B20</a></p>
<p><a href="https://randomnerdtutorials.com/raspberry-pi-pico-bme280-arduino/">BME280</a></p>
<p><a href="https://randomnerdtutorials.com/raspberry-pi-pico-internal-temperature-arduino/">Built-in Temp. Sensor</a></p>
<p><a href="https://randomnerdtutorials.com/raspberry-pi-pico-ssd1306-oled-arduino/">SSD1306 OLED</a></p>
<p><a href="https://randomnerdtutorials.com/raspberry-pi-pico-rcwl-0516-arduino/">RCWL-0516</a></p>
<p><a href="https://randomnerdtutorials.com/raspberry-pi-pico-motion-pir-arduino/">PIR Motion</a></p>
<p><a href="https://randomnerdtutorials.com/raspberry-pi-pico-i2c-scanner-arduino/">I2C Scanner</a></p>
<p><a href="https://randomnerdtutorials.com/raspberry-pi-pico-w-micropython-ebook/"><strong>Learn More »</strong></a></p>
<p><a href="https://randomnerdtutorials.com/raspberry-pi-pico-w-micropython-ebook/">Raspberry Pi Pico eBook</a></p>
</div>
</div>
</div>
</aside><aside id="search-4" class="widget inner-padding widget_search"><form method="get" class="search-form" action="https://randomnerdtutorials.com/">
<label>
<span class="screen-reader-text">Search for:</span>
<input type="search" class="search-field" placeholder="Search &hellip;" value="" name="s" title="Search for:">
</label>
<input type="submit" class="search-submit" value="Search"></form>
</aside> </div>
</div>
<div class="widget-area sidebar is-right-sidebar grid-25 tablet-grid-25 grid-parent" id="right-sidebar">
<div class="inside-right-sidebar">
<aside id="block-4" class="widget inner-padding widget_block"><p><strong>Affiliate Disclosure:</strong> <em>Random Nerd Tutorials is a participant in affiliate advertising programs designed to provide a means for us to earn fees by linking to Amazon, eBay, AliExpress, and other sites. We might be compensated for referring traffic and business to these companies.</em></p>
<hr /></aside><aside id="text-47" class="widget inner-padding widget_text"> <div class="textwidget"><p><a href="https://randomnerdtutorials.com/learn-esp32-with-arduino-ide/"><img loading="lazy" decoding="async" data-recalc-dims="1" class="aligncenter" src="https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2020/05/Learn-ESP32-with-Arduino-IDE-2nd-Edition-Rui-Santos-Sara-Santos-ebook-video-course-400.jpg?resize=356%2C200&#038;quality=100&#038;strip=all&#038;ssl=1" width="356" height="200" fetchpriority="low"/></a><br />
<strong><a href="https://randomnerdtutorials.com/learn-esp32-with-arduino-ide/">Learn ESP32 with Arduino IDE (2nd Edition) Course »</a></strong> Complete guide to program the ESP32 with Arduino IDE!</p>
<hr />
</div>
</aside><aside id="text-46" class="widget inner-padding widget_text"> <div class="textwidget"><p><a href="https://randomnerdtutorials.com/smart-home-ebook/"><img loading="lazy" decoding="async" data-recalc-dims="1" class="aligncenter" src="https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2022/09/Smart-Home-Raspberry-Pi-ESP32-ESP8266-eBook500px.jpg?resize=163%2C251&#038;quality=100&#038;strip=all&#038;ssl=1" width="163" height="251" fetchpriority="low"/></a><br />
<strong><a href="https://randomnerdtutorials.com/smart-home-ebook/">SMART HOME with Raspberry Pi, ESP32, and ESP8266 »</a></strong> learn how to build a complete home automation system.</p>
<hr />
</div>
</aside><aside id="text-62" class="widget inner-padding widget_text"> <div class="textwidget"><p><a href="https://randomnerdtutorials.com/raspberry-pi-pico-w-micropython-ebook/"><img loading="lazy" decoding="async" data-recalc-dims="1" class="aligncenter" src="https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2024/03/Learn-Raspberry-Pi-Pico-W-with-MicroPython-eBook-cover-500px-Copy.jpg?resize=175%2C252&#038;quality=100&#038;strip=all&#038;ssl=1" width="175" height="252" fetchpriority="low"/></a><br />
<strong><a href="https://randomnerdtutorials.com/raspberry-pi-pico-w-micropython-ebook/">Learn Raspberry Pi Pico/Pico W with MicroPython »</a></strong> The complete getting started guide to get the most out of the the Raspberry Pi Pico/Pico W (RP2040) microcontroller board using MicroPython programming language.</p>
<hr />
</div>
</aside><aside id="text-63" class="widget inner-padding widget_text"> <div class="textwidget"><p><a href="https://randomnerdtutorials.com/learn-lvgl-esp32-ebook/"><img loading="lazy" decoding="async" data-recalc-dims="1" class="aligncenter" src="https://i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2024/08/Learn-LVGL-Build-GUIs-for-ESP32-Projects-eBook-cover-image.jpg?resize=175%2C252&#038;quality=100&#038;strip=all&#038;ssl=1" width="175" height="252" fetchpriority="low"/></a><br />
<strong><a href="https://randomnerdtutorials.com/learn-lvgl-esp32-ebook/">🔥 Learn LVGL: Build GUIs for ESP32 Projects »</a></strong> Learn how to build Graphical User Interfaces (GUIs) for ESP32 Projects using LVGL (Light Versatile Graphics Library) with the Arduino IDE.</p>
</div>
</aside> </div>
</div>
</div>
</div>
<div class="site-footer footer-bar-active footer-bar-align-center">
<footer class="site-info" aria-label="Site" itemtype="https://schema.org/WPFooter" itemscope>
<div class="inside-site-info grid-container grid-parent">
<div class="footer-bar">
<aside id="nav_menu-10" class="widget inner-padding widget_nav_menu"><div class="menu-footer-disclaimer-container"><ul id="menu-footer-disclaimer" class="menu"><li id="menu-item-82503" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-82503"><a href="https://randomnerdtutorials.com/about/">About</a></li>
<li id="menu-item-20492" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-20492"><a href="https://randomnerdtutorials.com/support">Support</a></li>
<li id="menu-item-20493" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-20493"><a href="https://randomnerdtutorials.com/terms">Terms and Conditions</a></li>
<li id="menu-item-20495" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-20495"><a href="https://randomnerdtutorials.com/privacy-policy/">Privacy Policy</a></li>
<li id="menu-item-20494" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-20494"><a href="https://randomnerdtutorials.com/returns-and-refunds/">Refunds</a></li>
<li id="menu-item-103055" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-103055"><a target="_blank" rel="noreferrer noopener nofollow" href="https://www.livroreclamacoes.pt/inicio/">Complaints&#8217; Book</a></li>
<li id="menu-item-43625" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-43625"><a target="_blank" rel="noopener" href="https://makeradvisor.com/">MakerAdvisor.com</a></li>
<li id="menu-item-20496" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-20496"><a target="_blank" rel="noopener" href="https://rntlab.com/">Join the Lab</a></li>
</ul></div></aside> </div>
<div class="copyright-bar">
Copyright © 2013-2024 · RandomNerdTutorials.com · All Rights Reserved </div>
</div>
</footer>
</div>
<script id="generate-a11y" src="data:text/javascript,%21function%28%29%7B%22use%20strict%22%3Bif%28%22querySelector%22in%20document%26%26%22addEventListener%22in%20window%29%7Bvar%20e%3Ddocument.body%3Be.addEventListener%28%22mousedown%22%2Cfunction%28%29%7Be.classList.add%28%22using-mouse%22%29%7D%29%2Ce.addEventListener%28%22keydown%22%2Cfunction%28%29%7Be.classList.remove%28%22using-mouse%22%29%7D%29%7D%7D%28%29%3B" defer></script> <div data-elementor-type="popup" data-elementor-id="83058" class="elementor elementor-83058 elementor-location-popup" data-elementor-settings="{&quot;entrance_animation&quot;:&quot;zoomIn&quot;,&quot;entrance_animation_duration&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:1.2,&quot;sizes&quot;:[]},&quot;a11y_navigation&quot;:&quot;yes&quot;,&quot;triggers&quot;:{&quot;scrolling&quot;:&quot;yes&quot;,&quot;scrolling_offset&quot;:35,&quot;scrolling_direction&quot;:&quot;down&quot;},&quot;timing&quot;:{&quot;times&quot;:&quot;yes&quot;,&quot;times_times&quot;:3}}" data-elementor-post-type="elementor_library">
<section class="elementor-section elementor-top-section elementor-element elementor-element-544e0740 elementor-section-content-bottom elementor-reverse-mobile elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="544e0740" data-element_type="section" data-settings="{&quot;background_background&quot;:&quot;classic&quot;}">
<div class="elementor-container elementor-column-gap-default">
<div class="elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-676b082e" data-id="676b082e" data-element_type="column">
<div class="elementor-widget-wrap elementor-element-populated">
<div class="elementor-element elementor-element-5eee063c elementor-widget elementor-widget-heading" data-id="5eee063c" data-element_type="widget" data-widget_type="heading.default">
<div class="elementor-widget-container">
<h2 class="elementor-heading-title elementor-size-default">Download Our Free eBooks and Resources</h2> </div>
</div>
<div class="elementor-element elementor-element-9bd904c elementor-hidden-phone elementor-widget elementor-widget-text-editor" data-id="9bd904c" data-element_type="widget" data-widget_type="text-editor.default">
<div class="elementor-widget-container">
<p>Get instant access to our FREE eBooks, Resources, and Exclusive Electronics Projects by entering your email address below.</p> </div>
</div>
<div class="elementor-element elementor-element-2a77907 elementor-button-align-stretch elementor-widget elementor-widget-form" data-id="2a77907" data-element_type="widget" data-settings="{&quot;step_next_label&quot;:&quot;Next&quot;,&quot;step_previous_label&quot;:&quot;Previous&quot;,&quot;button_width&quot;:&quot;100&quot;,&quot;step_type&quot;:&quot;number_text&quot;,&quot;step_icon_shape&quot;:&quot;circle&quot;}" data-widget_type="form.default">
<div class="elementor-widget-container">
<form class="elementor-form" method="post" name="New Form">
<input type="hidden" name="post_id" value="83058"/>
<input type="hidden" name="form_id" value="2a77907"/>
<input type="hidden" name="referer_title" value="Raspberry Pi Pico: Web Server (MicroPython) | Random Nerd Tutorials" />
<input type="hidden" name="queried_id" value="144635"/>
<div class="elementor-form-fields-wrapper elementor-labels-">
<div class="elementor-field-type-email elementor-field-group elementor-column elementor-field-group-email elementor-col-100 elementor-field-required">
<label for="form-field-email" class="elementor-field-label elementor-screen-only">
Email </label>
<input size="1" type="email" name="form_fields[email]" id="form-field-email" class="elementor-field elementor-size-sm elementor-field-textual" placeholder="Your Email Address" required="required" aria-required="true">
</div>
<div class="elementor-field-group elementor-column elementor-field-type-submit elementor-col-100 e-form__buttons">
<button class="elementor-button elementor-size-md" type="submit">
<span class="elementor-button-content-wrapper">
<span class="elementor-button-icon">
</span>
<span class="elementor-button-text">FREE DOWNLOAD</span>
</span>
</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
<script type='text/javascript' src="data:text/javascript,const%20lazyloadRunObserver%20%3D%20%28%29%20%3D%3E%20%7B%0A%09%09%09%09%09const%20lazyloadBackgrounds%20%3D%20document.querySelectorAll%28%20%60.e-con.e-parent%3Anot%28.e-lazyloaded%29%60%20%29%3B%0A%09%09%09%09%09const%20lazyloadBackgroundObserver%20%3D%20new%20IntersectionObserver%28%20%28%20entries%20%29%20%3D%3E%20%7B%0A%09%09%09%09%09%09entries.forEach%28%20%28%20entry%20%29%20%3D%3E%20%7B%0A%09%09%09%09%09%09%09if%20%28%20entry.isIntersecting%20%29%20%7B%0A%09%09%09%09%09%09%09%09let%20lazyloadBackground%20%3D%20entry.target%3B%0A%09%09%09%09%09%09%09%09if%28%20lazyloadBackground%20%29%20%7B%0A%09%09%09%09%09%09%09%09%09lazyloadBackground.classList.add%28%20%27e-lazyloaded%27%20%29%3B%0A%09%09%09%09%09%09%09%09%7D%0A%09%09%09%09%09%09%09%09lazyloadBackgroundObserver.unobserve%28%20entry.target%20%29%3B%0A%09%09%09%09%09%09%09%7D%0A%09%09%09%09%09%09%7D%29%3B%0A%09%09%09%09%09%7D%2C%20%7B%20rootMargin%3A%20%27200px%200px%20200px%200px%27%20%7D%20%29%3B%0A%09%09%09%09%09lazyloadBackgrounds.forEach%28%20%28%20lazyloadBackground%20%29%20%3D%3E%20%7B%0A%09%09%09%09%09%09lazyloadBackgroundObserver.observe%28%20lazyloadBackground%20%29%3B%0A%09%09%09%09%09%7D%20%29%3B%0A%09%09%09%09%7D%3B%0A%09%09%09%09const%20events%20%3D%20%5B%0A%09%09%09%09%09%27DOMContentLoaded%27%2C%0A%09%09%09%09%09%27elementor%2Flazyload%2Fobserve%27%2C%0A%09%09%09%09%5D%3B%0A%09%09%09%09events.forEach%28%20%28%20event%20%29%20%3D%3E%20%7B%0A%09%09%09%09%09document.addEventListener%28%20event%2C%20lazyloadRunObserver%20%29%3B%0A%09%09%09%09%7D%20%29%3B" defer></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.23.0/themes/prism.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.23.0/prism.min.js" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.23.0/components/prism-c.min.js" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.23.0/components/prism-python.min.js" defer></script>
<style id='jetpack-block-tiled-gallery-inline-css'>.wp-block-jetpack-tiled-gallery .is-style-circle .tiled-gallery__item img,.wp-block-jetpack-tiled-gallery.is-style-circle .tiled-gallery__item img{border-radius:50%}.wp-block-jetpack-tiled-gallery .is-style-circle .tiled-gallery__row,.wp-block-jetpack-tiled-gallery .is-style-square .tiled-gallery__row,.wp-block-jetpack-tiled-gallery.is-style-circle .tiled-gallery__row,.wp-block-jetpack-tiled-gallery.is-style-square .tiled-gallery__row{flex-grow:1;width:100%}.wp-block-jetpack-tiled-gallery .is-style-circle .tiled-gallery__row.columns-1 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery .is-style-square .tiled-gallery__row.columns-1 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery.is-style-circle .tiled-gallery__row.columns-1 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery.is-style-square .tiled-gallery__row.columns-1 .tiled-gallery__col{width:100%}.wp-block-jetpack-tiled-gallery .is-style-circle .tiled-gallery__row.columns-2 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery .is-style-square .tiled-gallery__row.columns-2 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery.is-style-circle .tiled-gallery__row.columns-2 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery.is-style-square .tiled-gallery__row.columns-2 .tiled-gallery__col{width:calc(50% - 2px)}.wp-block-jetpack-tiled-gallery .is-style-circle .tiled-gallery__row.columns-3 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery .is-style-square .tiled-gallery__row.columns-3 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery.is-style-circle .tiled-gallery__row.columns-3 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery.is-style-square .tiled-gallery__row.columns-3 .tiled-gallery__col{width:calc(33.33333% - 2.66667px)}.wp-block-jetpack-tiled-gallery .is-style-circle .tiled-gallery__row.columns-4 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery .is-style-square .tiled-gallery__row.columns-4 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery.is-style-circle .tiled-gallery__row.columns-4 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery.is-style-square .tiled-gallery__row.columns-4 .tiled-gallery__col{width:calc(25% - 3px)}.wp-block-jetpack-tiled-gallery .is-style-circle .tiled-gallery__row.columns-5 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery .is-style-square .tiled-gallery__row.columns-5 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery.is-style-circle .tiled-gallery__row.columns-5 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery.is-style-square .tiled-gallery__row.columns-5 .tiled-gallery__col{width:calc(20% - 3.2px)}.wp-block-jetpack-tiled-gallery .is-style-circle .tiled-gallery__row.columns-6 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery .is-style-square .tiled-gallery__row.columns-6 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery.is-style-circle .tiled-gallery__row.columns-6 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery.is-style-square .tiled-gallery__row.columns-6 .tiled-gallery__col{width:calc(16.66667% - 3.33333px)}.wp-block-jetpack-tiled-gallery .is-style-circle .tiled-gallery__row.columns-7 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery .is-style-square .tiled-gallery__row.columns-7 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery.is-style-circle .tiled-gallery__row.columns-7 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery.is-style-square .tiled-gallery__row.columns-7 .tiled-gallery__col{width:calc(14.28571% - 3.42857px)}.wp-block-jetpack-tiled-gallery .is-style-circle .tiled-gallery__row.columns-8 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery .is-style-square .tiled-gallery__row.columns-8 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery.is-style-circle .tiled-gallery__row.columns-8 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery.is-style-square .tiled-gallery__row.columns-8 .tiled-gallery__col{width:calc(12.5% - 3.5px)}.wp-block-jetpack-tiled-gallery .is-style-circle .tiled-gallery__row.columns-9 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery .is-style-square .tiled-gallery__row.columns-9 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery.is-style-circle .tiled-gallery__row.columns-9 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery.is-style-square .tiled-gallery__row.columns-9 .tiled-gallery__col{width:calc(11.11111% - 3.55556px)}.wp-block-jetpack-tiled-gallery .is-style-circle .tiled-gallery__row.columns-10 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery .is-style-square .tiled-gallery__row.columns-10 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery.is-style-circle .tiled-gallery__row.columns-10 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery.is-style-square .tiled-gallery__row.columns-10 .tiled-gallery__col{width:calc(10% - 3.6px)}.wp-block-jetpack-tiled-gallery .is-style-circle .tiled-gallery__row.columns-11 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery .is-style-square .tiled-gallery__row.columns-11 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery.is-style-circle .tiled-gallery__row.columns-11 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery.is-style-square .tiled-gallery__row.columns-11 .tiled-gallery__col{width:calc(9.09091% - 3.63636px)}.wp-block-jetpack-tiled-gallery .is-style-circle .tiled-gallery__row.columns-12 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery .is-style-square .tiled-gallery__row.columns-12 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery.is-style-circle .tiled-gallery__row.columns-12 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery.is-style-square .tiled-gallery__row.columns-12 .tiled-gallery__col{width:calc(8.33333% - 3.66667px)}.wp-block-jetpack-tiled-gallery .is-style-circle .tiled-gallery__row.columns-13 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery .is-style-square .tiled-gallery__row.columns-13 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery.is-style-circle .tiled-gallery__row.columns-13 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery.is-style-square .tiled-gallery__row.columns-13 .tiled-gallery__col{width:calc(7.69231% - 3.69231px)}.wp-block-jetpack-tiled-gallery .is-style-circle .tiled-gallery__row.columns-14 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery .is-style-square .tiled-gallery__row.columns-14 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery.is-style-circle .tiled-gallery__row.columns-14 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery.is-style-square .tiled-gallery__row.columns-14 .tiled-gallery__col{width:calc(7.14286% - 3.71429px)}.wp-block-jetpack-tiled-gallery .is-style-circle .tiled-gallery__row.columns-15 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery .is-style-square .tiled-gallery__row.columns-15 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery.is-style-circle .tiled-gallery__row.columns-15 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery.is-style-square .tiled-gallery__row.columns-15 .tiled-gallery__col{width:calc(6.66667% - 3.73333px)}.wp-block-jetpack-tiled-gallery .is-style-circle .tiled-gallery__row.columns-16 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery .is-style-square .tiled-gallery__row.columns-16 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery.is-style-circle .tiled-gallery__row.columns-16 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery.is-style-square .tiled-gallery__row.columns-16 .tiled-gallery__col{width:calc(6.25% - 3.75px)}.wp-block-jetpack-tiled-gallery .is-style-circle .tiled-gallery__row.columns-17 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery .is-style-square .tiled-gallery__row.columns-17 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery.is-style-circle .tiled-gallery__row.columns-17 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery.is-style-square .tiled-gallery__row.columns-17 .tiled-gallery__col{width:calc(5.88235% - 3.76471px)}.wp-block-jetpack-tiled-gallery .is-style-circle .tiled-gallery__row.columns-18 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery .is-style-square .tiled-gallery__row.columns-18 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery.is-style-circle .tiled-gallery__row.columns-18 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery.is-style-square .tiled-gallery__row.columns-18 .tiled-gallery__col{width:calc(5.55556% - 3.77778px)}.wp-block-jetpack-tiled-gallery .is-style-circle .tiled-gallery__row.columns-19 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery .is-style-square .tiled-gallery__row.columns-19 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery.is-style-circle .tiled-gallery__row.columns-19 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery.is-style-square .tiled-gallery__row.columns-19 .tiled-gallery__col{width:calc(5.26316% - 3.78947px)}.wp-block-jetpack-tiled-gallery .is-style-circle .tiled-gallery__row.columns-20 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery .is-style-square .tiled-gallery__row.columns-20 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery.is-style-circle .tiled-gallery__row.columns-20 .tiled-gallery__col,.wp-block-jetpack-tiled-gallery.is-style-square .tiled-gallery__row.columns-20 .tiled-gallery__col{width:calc(5% - 3.8px)}.wp-block-jetpack-tiled-gallery .is-style-circle .tiled-gallery__item img,.wp-block-jetpack-tiled-gallery .is-style-square .tiled-gallery__item img,.wp-block-jetpack-tiled-gallery.is-style-circle .tiled-gallery__item img,.wp-block-jetpack-tiled-gallery.is-style-square .tiled-gallery__item img{aspect-ratio:1}.wp-block-jetpack-tiled-gallery .is-style-columns .tiled-gallery__item,.wp-block-jetpack-tiled-gallery .is-style-rectangular .tiled-gallery__item,.wp-block-jetpack-tiled-gallery.is-style-columns .tiled-gallery__item,.wp-block-jetpack-tiled-gallery.is-style-rectangular .tiled-gallery__item{display:flex}.wp-block-jetpack-tiled-gallery .has-rounded-corners-1 .tiled-gallery__item img{border-radius:1px}.wp-block-jetpack-tiled-gallery .has-rounded-corners-2 .tiled-gallery__item img{border-radius:2px}.wp-block-jetpack-tiled-gallery .has-rounded-corners-3 .tiled-gallery__item img{border-radius:3px}.wp-block-jetpack-tiled-gallery .has-rounded-corners-4 .tiled-gallery__item img{border-radius:4px}.wp-block-jetpack-tiled-gallery .has-rounded-corners-5 .tiled-gallery__item img{border-radius:5px}.wp-block-jetpack-tiled-gallery .has-rounded-corners-6 .tiled-gallery__item img{border-radius:6px}.wp-block-jetpack-tiled-gallery .has-rounded-corners-7 .tiled-gallery__item img{border-radius:7px}.wp-block-jetpack-tiled-gallery .has-rounded-corners-8 .tiled-gallery__item img{border-radius:8px}.wp-block-jetpack-tiled-gallery .has-rounded-corners-9 .tiled-gallery__item img{border-radius:9px}.wp-block-jetpack-tiled-gallery .has-rounded-corners-10 .tiled-gallery__item img{border-radius:10px}.wp-block-jetpack-tiled-gallery .has-rounded-corners-11 .tiled-gallery__item img{border-radius:11px}.wp-block-jetpack-tiled-gallery .has-rounded-corners-12 .tiled-gallery__item img{border-radius:12px}.wp-block-jetpack-tiled-gallery .has-rounded-corners-13 .tiled-gallery__item img{border-radius:13px}.wp-block-jetpack-tiled-gallery .has-rounded-corners-14 .tiled-gallery__item img{border-radius:14px}.wp-block-jetpack-tiled-gallery .has-rounded-corners-15 .tiled-gallery__item img{border-radius:15px}.wp-block-jetpack-tiled-gallery .has-rounded-corners-16 .tiled-gallery__item img{border-radius:16px}.wp-block-jetpack-tiled-gallery .has-rounded-corners-17 .tiled-gallery__item img{border-radius:17px}.wp-block-jetpack-tiled-gallery .has-rounded-corners-18 .tiled-gallery__item img{border-radius:18px}.wp-block-jetpack-tiled-gallery .has-rounded-corners-19 .tiled-gallery__item img{border-radius:19px}.wp-block-jetpack-tiled-gallery .has-rounded-corners-20 .tiled-gallery__item img{border-radius:20px}.tiled-gallery__gallery{display:flex;flex-wrap:wrap;padding:0;width:100%}.tiled-gallery__row{display:flex;flex-direction:row;justify-content:center;margin:0;width:100%}.tiled-gallery__row+.tiled-gallery__row{margin-top:4px}.tiled-gallery__col{display:flex;flex-direction:column;justify-content:center;margin:0}.tiled-gallery__col+.tiled-gallery__col{margin-inline-start:4px}.tiled-gallery__item{flex-grow:1;justify-content:center;margin:0;overflow:hidden;padding:0;position:relative}.tiled-gallery__item.filter__black-and-white{filter:grayscale(100%)}.tiled-gallery__item.filter__sepia{filter:sepia(100%)}.tiled-gallery__item.filter__1977{filter:contrast(1.1) brightness(1.1) saturate(1.3);position:relative}.tiled-gallery__item.filter__1977 img{width:100%;z-index:1}.tiled-gallery__item.filter__1977:before{z-index:2}.tiled-gallery__item.filter__1977:after,.tiled-gallery__item.filter__1977:before{content:"";display:block;height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%}.tiled-gallery__item.filter__1977:after{background:#f36abc4d;mix-blend-mode:screen;z-index:3}.tiled-gallery__item.filter__clarendon{filter:contrast(1.2) saturate(1.35);position:relative}.tiled-gallery__item.filter__clarendon img{width:100%;z-index:1}.tiled-gallery__item.filter__clarendon:before{z-index:2}.tiled-gallery__item.filter__clarendon:after,.tiled-gallery__item.filter__clarendon:before{content:"";display:block;height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%}.tiled-gallery__item.filter__clarendon:after{z-index:3}.tiled-gallery__item.filter__clarendon:before{background:#7fbbe333;mix-blend-mode:overlay}.tiled-gallery__item.filter__gingham{filter:brightness(1.05) hue-rotate(-10deg);position:relative}.tiled-gallery__item.filter__gingham img{width:100%;z-index:1}.tiled-gallery__item.filter__gingham:before{z-index:2}.tiled-gallery__item.filter__gingham:after,.tiled-gallery__item.filter__gingham:before{content:"";display:block;height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%}.tiled-gallery__item.filter__gingham:after{background:#e6e6fa;mix-blend-mode:soft-light;z-index:3}.tiled-gallery__item+.tiled-gallery__item{margin-top:4px}.tiled-gallery__item:focus-within{box-shadow:0 0 0 2px var(--wp-admin-theme-color);overflow:visible}.tiled-gallery__item>img{background-color:#0000001a}.tiled-gallery__item>a,.tiled-gallery__item>a>img,.tiled-gallery__item>img{display:block;height:auto;margin:0;max-width:100%;object-fit:cover;object-position:center;padding:0;width:100%}.is-email .tiled-gallery__gallery{display:block}</style>
<link rel='stylesheet' id='elementor-post-83032-css' href='https://randomnerdtutorials.com/wp-content/cache/flying-press/d86f7da716a1.post-83032.css' media='all' />
<link rel='stylesheet' id='widget-image-css' href='https://randomnerdtutorials.com/wp-content/cache/flying-press/3fa3ed7783ef.widget-image.min.css' media='all' />
<link rel='stylesheet' id='elementor-post-82533-css' href='https://randomnerdtutorials.com/wp-content/cache/flying-press/ecd1542e239f.post-82533.css' media='all' />
<link rel='stylesheet' id='widget-posts-css' href='https://randomnerdtutorials.com/wp-content/cache/flying-press/2ee140ded9e1.widget-posts.min.css' media='all' />
<link rel='stylesheet' id='elementor-post-82829-css' href='https://randomnerdtutorials.com/wp-content/cache/flying-press/b27dec94ba0f.post-82829.css' media='all' />
<link rel='stylesheet' id='elementor-icons-shared-0-css' href='https://randomnerdtutorials.com/wp-content/cache/flying-press/f4af7e5ec05e.fontawesome.min.css' media='all' />
<link rel='stylesheet' id='elementor-icons-fa-regular-css' href='https://randomnerdtutorials.com/wp-content/cache/flying-press/3eef8c9e589a.regular.min.css' media='all' />
<script src="https://randomnerdtutorials.com/wp-content/plugins/gp-premium/menu-plus/functions/js/sticky.min.js?ver=b4054cf70214" id="generate-sticky-js" defer></script>
<script src="https://randomnerdtutorials.com/wp-content/plugins/flying-press/assets/preload.min.js?ver=9bf0524724fd" id="flying_press_preload-js" defer data-wp-strategy="defer"></script>
<!--[if lte IE 11]>
<script src="https://randomnerdtutorials.com/wp-content/themes/generatepress/assets/js/classList.min.js?ver=79fa3301bde3" id="generate-classlist-js" defer></script>
<![endif]-->
<script id="generate-menu-js-extra" src="data:text/javascript,var%20generatepressMenu%20%3D%20%7B%22toggleOpenedSubMenus%22%3A%221%22%2C%22openSubMenuLabel%22%3A%22Open%20Sub-Menu%22%2C%22closeSubMenuLabel%22%3A%22Close%20Sub-Menu%22%7D%3B" defer></script>
<script src="https://randomnerdtutorials.com/wp-content/themes/generatepress/assets/js/menu.min.js?ver=67148b2ff820" id="generate-menu-js" defer></script>
<script id="generate-navigation-search-js-extra" src="data:text/javascript,var%20generatepressNavSearch%20%3D%20%7B%22open%22%3A%22Open%20Search%20Bar%22%2C%22close%22%3A%22Close%20Search%20Bar%22%7D%3B" defer></script>
<script src="https://randomnerdtutorials.com/wp-content/themes/generatepress/assets/js/navigation-search.min.js?ver=0aa766e9c68f" id="generate-navigation-search-js" defer></script>
<script src="https://randomnerdtutorials.com/wp-includes/js/comment-reply.min.js?ver=492f2c1a7ea7" id="comment-reply-js" async data-wp-strategy="async"></script>
<script id="jetpack-blocks-assets-base-url-js-before" src="data:text/javascript,var%20Jetpack_Block_Assets_Base_Url%3D%22https%3A%2F%2Frandomnerdtutorials.com%2Fwp-content%2Fplugins%2Fjetpack%2F_inc%2Fblocks%2F%22%3B" defer></script>
<script src="https://randomnerdtutorials.com/wp-includes/js/dist/dom-ready.min.js?ver=e4bc17cc45ca" id="wp-dom-ready-js"></script>
<script src="https://randomnerdtutorials.com/wp-content/plugins/jetpack/_inc/blocks/tiled-gallery/view.js?ver=06ee35fd63c9" id="jetpack-block-tiled-gallery-js" defer></script>
<script src="https://randomnerdtutorials.com/wp-includes/js/imagesloaded.min.js?ver=6823120876c9" id="imagesloaded-js"></script>
<script defer src="https://randomnerdtutorials.com/wp-content/cache/flying-press/91954b488a9b.akismet-frontend.js" id="akismet-frontend-js"></script>
<script src="https://randomnerdtutorials.com/wp-content/plugins/elementor-pro/assets/js/webpack-pro.runtime.min.js?ver=38a2efea120e" id="elementor-pro-webpack-runtime-js" defer></script>
<script src="https://randomnerdtutorials.com/wp-content/plugins/elementor/assets/js/webpack.runtime.min.js?ver=b5062df9d677" id="elementor-webpack-runtime-js" defer></script>
<script src="https://randomnerdtutorials.com/wp-includes/js/jquery/jquery-migrate.min.js?ver=9ffeb32e2d9e" id="jquery-migrate-js"></script>
<script src="https://randomnerdtutorials.com/wp-content/plugins/elementor/assets/js/frontend-modules.min.js?ver=a9ff84a79e45" id="elementor-frontend-modules-js" defer></script>
<script src="https://randomnerdtutorials.com/wp-includes/js/dist/hooks.min.js?ver=072d3f6e5c44" id="wp-hooks-js"></script>
<script src="https://randomnerdtutorials.com/wp-includes/js/dist/i18n.min.js?ver=a8127c1a87bb" id="wp-i18n-js"></script>
<script id="wp-i18n-js-after" src="data:text/javascript,wp.i18n.setLocaleData%28%20%7B%20%27text%20direction%5Cu0004ltr%27%3A%20%5B%20%27ltr%27%20%5D%20%7D%20%29%3B" defer></script>
<script id="elementor-pro-frontend-js-before" src="data:text/javascript,var%20ElementorProFrontendConfig%20%3D%20%7B%22ajaxurl%22%3A%22https%3A%5C%2F%5C%2Frandomnerdtutorials.com%5C%2Fwp-admin%5C%2Fadmin-ajax.php%22%2C%22nonce%22%3A%22ad7974ea74%22%2C%22urls%22%3A%7B%22assets%22%3A%22https%3A%5C%2F%5C%2Frandomnerdtutorials.com%5C%2Fwp-content%5C%2Fplugins%5C%2Felementor-pro%5C%2Fassets%5C%2F%22%2C%22rest%22%3A%22https%3A%5C%2F%5C%2Frandomnerdtutorials.com%5C%2Fwp-json%5C%2F%22%7D%2C%22settings%22%3A%7B%22lazy_load_background_images%22%3Atrue%7D%2C%22popup%22%3A%7B%22hasPopUps%22%3Atrue%7D%2C%22shareButtonsNetworks%22%3A%7B%22facebook%22%3A%7B%22title%22%3A%22Facebook%22%2C%22has_counter%22%3Atrue%7D%2C%22twitter%22%3A%7B%22title%22%3A%22Twitter%22%7D%2C%22linkedin%22%3A%7B%22title%22%3A%22LinkedIn%22%2C%22has_counter%22%3Atrue%7D%2C%22pinterest%22%3A%7B%22title%22%3A%22Pinterest%22%2C%22has_counter%22%3Atrue%7D%2C%22reddit%22%3A%7B%22title%22%3A%22Reddit%22%2C%22has_counter%22%3Atrue%7D%2C%22vk%22%3A%7B%22title%22%3A%22VK%22%2C%22has_counter%22%3Atrue%7D%2C%22odnoklassniki%22%3A%7B%22title%22%3A%22OK%22%2C%22has_counter%22%3Atrue%7D%2C%22tumblr%22%3A%7B%22title%22%3A%22Tumblr%22%7D%2C%22digg%22%3A%7B%22title%22%3A%22Digg%22%7D%2C%22skype%22%3A%7B%22title%22%3A%22Skype%22%7D%2C%22stumbleupon%22%3A%7B%22title%22%3A%22StumbleUpon%22%2C%22has_counter%22%3Atrue%7D%2C%22mix%22%3A%7B%22title%22%3A%22Mix%22%7D%2C%22telegram%22%3A%7B%22title%22%3A%22Telegram%22%7D%2C%22pocket%22%3A%7B%22title%22%3A%22Pocket%22%2C%22has_counter%22%3Atrue%7D%2C%22xing%22%3A%7B%22title%22%3A%22XING%22%2C%22has_counter%22%3Atrue%7D%2C%22whatsapp%22%3A%7B%22title%22%3A%22WhatsApp%22%7D%2C%22email%22%3A%7B%22title%22%3A%22Email%22%7D%2C%22print%22%3A%7B%22title%22%3A%22Print%22%7D%2C%22x-twitter%22%3A%7B%22title%22%3A%22X%22%7D%2C%22threads%22%3A%7B%22title%22%3A%22Threads%22%7D%7D%2C%22facebook_sdk%22%3A%7B%22lang%22%3A%22en_US%22%2C%22app_id%22%3A%22%22%7D%2C%22lottie%22%3A%7B%22defaultAnimationUrl%22%3A%22https%3A%5C%2F%5C%2Frandomnerdtutorials.com%5C%2Fwp-content%5C%2Fplugins%5C%2Felementor-pro%5C%2Fmodules%5C%2Flottie%5C%2Fassets%5C%2Fanimations%5C%2Fdefault.json%22%7D%7D%3B" defer></script>
<script src="https://randomnerdtutorials.com/wp-content/plugins/elementor-pro/assets/js/frontend.min.js?ver=d5917892e6fb" id="elementor-pro-frontend-js" defer></script>
<script src="https://randomnerdtutorials.com/wp-includes/js/jquery/ui/core.min.js?ver=8fbc22c79d40" id="jquery-ui-core-js"></script>
<script id="elementor-frontend-js-before" src="data:text/javascript,var%20elementorFrontendConfig%20%3D%20%7B%22environmentMode%22%3A%7B%22edit%22%3Afalse%2C%22wpPreview%22%3Afalse%2C%22isScriptDebug%22%3Afalse%7D%2C%22i18n%22%3A%7B%22shareOnFacebook%22%3A%22Share%20on%20Facebook%22%2C%22shareOnTwitter%22%3A%22Share%20on%20Twitter%22%2C%22pinIt%22%3A%22Pin%20it%22%2C%22download%22%3A%22Download%22%2C%22downloadImage%22%3A%22Download%20image%22%2C%22fullscreen%22%3A%22Fullscreen%22%2C%22zoom%22%3A%22Zoom%22%2C%22share%22%3A%22Share%22%2C%22playVideo%22%3A%22Play%20Video%22%2C%22previous%22%3A%22Previous%22%2C%22next%22%3A%22Next%22%2C%22close%22%3A%22Close%22%2C%22a11yCarouselWrapperAriaLabel%22%3A%22Carousel%20%7C%20Horizontal%20scrolling%3A%20Arrow%20Left%20%26%20Right%22%2C%22a11yCarouselPrevSlideMessage%22%3A%22Previous%20slide%22%2C%22a11yCarouselNextSlideMessage%22%3A%22Next%20slide%22%2C%22a11yCarouselFirstSlideMessage%22%3A%22This%20is%20the%20first%20slide%22%2C%22a11yCarouselLastSlideMessage%22%3A%22This%20is%20the%20last%20slide%22%2C%22a11yCarouselPaginationBulletMessage%22%3A%22Go%20to%20slide%22%7D%2C%22is_rtl%22%3Afalse%2C%22breakpoints%22%3A%7B%22xs%22%3A0%2C%22sm%22%3A480%2C%22md%22%3A768%2C%22lg%22%3A1025%2C%22xl%22%3A1440%2C%22xxl%22%3A1600%7D%2C%22responsive%22%3A%7B%22breakpoints%22%3A%7B%22mobile%22%3A%7B%22label%22%3A%22Mobile%20Portrait%22%2C%22value%22%3A767%2C%22default_value%22%3A767%2C%22direction%22%3A%22max%22%2C%22is_enabled%22%3Atrue%7D%2C%22mobile_extra%22%3A%7B%22label%22%3A%22Mobile%20Landscape%22%2C%22value%22%3A880%2C%22default_value%22%3A880%2C%22direction%22%3A%22max%22%2C%22is_enabled%22%3Afalse%7D%2C%22tablet%22%3A%7B%22label%22%3A%22Tablet%20Portrait%22%2C%22value%22%3A1024%2C%22default_value%22%3A1024%2C%22direction%22%3A%22max%22%2C%22is_enabled%22%3Atrue%7D%2C%22tablet_extra%22%3A%7B%22label%22%3A%22Tablet%20Landscape%22%2C%22value%22%3A1200%2C%22default_value%22%3A1200%2C%22direction%22%3A%22max%22%2C%22is_enabled%22%3Afalse%7D%2C%22laptop%22%3A%7B%22label%22%3A%22Laptop%22%2C%22value%22%3A1366%2C%22default_value%22%3A1366%2C%22direction%22%3A%22max%22%2C%22is_enabled%22%3Afalse%7D%2C%22widescreen%22%3A%7B%22label%22%3A%22Widescreen%22%2C%22value%22%3A2400%2C%22default_value%22%3A2400%2C%22direction%22%3A%22min%22%2C%22is_enabled%22%3Afalse%7D%7D%2C%22hasCustomBreakpoints%22%3Afalse%7D%2C%22version%22%3A%223.25.6%22%2C%22is_static%22%3Afalse%2C%22experimentalFeatures%22%3A%7B%22additional_custom_breakpoints%22%3Atrue%2C%22e_swiper_latest%22%3Atrue%2C%22e_nested_atomic_repeaters%22%3Atrue%2C%22e_optimized_control_loading%22%3Atrue%2C%22e_onboarding%22%3Atrue%2C%22e_css_smooth_scroll%22%3Atrue%2C%22theme_builder_v2%22%3Atrue%2C%22home_screen%22%3Atrue%2C%22landing-pages%22%3Atrue%2C%22nested-elements%22%3Atrue%2C%22editor_v2%22%3Atrue%2C%22link-in-bio%22%3Atrue%2C%22floating-buttons%22%3Atrue%7D%2C%22urls%22%3A%7B%22assets%22%3A%22https%3A%5C%2F%5C%2Frandomnerdtutorials.com%5C%2Fwp-content%5C%2Fplugins%5C%2Felementor%5C%2Fassets%5C%2F%22%2C%22ajaxurl%22%3A%22https%3A%5C%2F%5C%2Frandomnerdtutorials.com%5C%2Fwp-admin%5C%2Fadmin-ajax.php%22%2C%22uploadUrl%22%3A%22https%3A%5C%2F%5C%2Frandomnerdtutorials.com%5C%2Fwp-content%5C%2Fuploads%22%7D%2C%22nonces%22%3A%7B%22floatingButtonsClickTracking%22%3A%2219952db31f%22%7D%2C%22swiperClass%22%3A%22swiper%22%2C%22settings%22%3A%7B%22page%22%3A%5B%5D%2C%22editorPreferences%22%3A%5B%5D%7D%2C%22kit%22%3A%7B%22active_breakpoints%22%3A%5B%22viewport_mobile%22%2C%22viewport_tablet%22%5D%2C%22lightbox_enable_counter%22%3A%22yes%22%2C%22lightbox_enable_fullscreen%22%3A%22yes%22%2C%22lightbox_enable_zoom%22%3A%22yes%22%2C%22lightbox_enable_share%22%3A%22yes%22%2C%22lightbox_title_src%22%3A%22title%22%2C%22lightbox_description_src%22%3A%22description%22%7D%2C%22post%22%3A%7B%22id%22%3A144635%2C%22title%22%3A%22Raspberry%2520Pi%2520Pico%253A%2520Web%2520Server%2520%2528MicroPython%2529%2520%257C%2520Random%2520Nerd%2520Tutorials%22%2C%22excerpt%22%3A%22%22%2C%22featuredImage%22%3A%22https%3A%5C%2F%5C%2Fi0.wp.com%5C%2Frandomnerdtutorials.com%5C%2Fwp-content%5C%2Fuploads%5C%2F2023%5C%2F12%5C%2FRaspberry-Pi-Pico-Web-Server-Micropython.jpg%3Ffit%3D828%252C466%26quality%3D100%26strip%3Dall%26ssl%3D1%22%7D%7D%3B" defer></script>
<script src="https://randomnerdtutorials.com/wp-content/plugins/elementor/assets/js/frontend.min.js?ver=45f0e28f9a7c" id="elementor-frontend-js" defer></script>
<script src="https://randomnerdtutorials.com/wp-content/plugins/elementor-pro/assets/js/elements-handlers.min.js?ver=ca213597a543" id="pro-elements-handlers-js" defer></script>
<script>!function(t){"function"==typeof define&&define.amd?define(t):t()}(function(){var t,e;!function(){var t=[],e=["click","mouseover","keydown","touchstart","touchmove","wheel"],n=document.querySelectorAll("script[data-src]"),r=document.querySelectorAll("link[data-href]");if(n.length||r.length){var i=function(e){return t.push(e)};document.addEventListener("click",i,{passive:!0});var a=setTimeout(c,10000);e.forEach(function(t){window.addEventListener(t,c,{passive:!0})})}function o(e){var r=n[e];r.onload=function(){if(e>=n.length-1)return window.dispatchEvent(new Event("DOMContentLoaded")),window.dispatchEvent(new Event("load")),document.removeEventListener("click",i),void t.forEach(function(t){var e=new MouseEvent("click",{view:t.view,bubbles:!0,cancelable:!0});t.target.dispatchEvent(e)});o(e+1)},r.src=r.getAttribute("data-src")}function c(){clearTimeout(a),e.forEach(function(t){window.removeEventListener(t,c,{passive:!0})}),n.forEach(function(t){var e=t.getAttribute("data-src");if(!e.startsWith("data:")){var n=document.createElement("link");n.rel="preload",n.as="script",n.href=e,document.head.appendChild(n)}}),n.length&&o(0),r.forEach(function(t){t.href=t.getAttribute("data-href")})}}(),t=window.devicePixelRatio>1?2:1,document.querySelectorAll("img[data-origin-src]").forEach(function(e){var n=100*Math.ceil(e.offsetWidth*t/100),r=e.getAttribute("data-origin-src");e.src=r+"?width="+n}),e=new IntersectionObserver(function(t){t.forEach(function(t){t.isIntersecting&&(e.unobserve(t.target),t.target.getAttribute("data-lazy-attributes").split(",").forEach(function(e){var n=t.target.getAttribute("data-lazy-".concat(e));t.target.setAttribute(e,n)}))})},{rootMargin:"300px"}),document.querySelectorAll("[data-lazy-method='viewport']").forEach(function(t){e.observe(t)})});
</script>
</body>
</html>
<!-- Powered by FlyingPress for lightning-fast performance. Learn more: https://flyingpress.com. Cached at 1734009103 -->