{"id":2777,"date":"2022-07-17T09:53:06","date_gmt":"2022-07-17T09:53:06","guid":{"rendered":"https:\/\/picockpit.com\/raspberry-pi\/?p=2777"},"modified":"2023-08-23T10:37:17","modified_gmt":"2023-08-23T10:37:17","slug":"raspberry-pi-pico-w-remote-weather-station","status":"publish","type":"post","link":"https:\/\/picockpit.com\/raspberry-pi\/pl\/raspberry-pi-pico-w-remote-weather-station-solar-powered-and-softap\/","title":{"rendered":"Zdalna stacja pogodowa Raspberry Pi Pico W (zasilana energi\u0105 s\u0142oneczn\u0105)"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/featured-image-1024x576.png\" alt=\"Raspberry Pi Pico W softap weather station\" class=\"wp-image-2820\" srcset=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/featured-image-1024x576.png 1024w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/featured-image-300x169.png 300w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/featured-image-768x432.png 768w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/featured-image-1536x864.png 1536w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/featured-image-2048x1152.png 2048w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/featured-image-18x10.png 18w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>One very special feature in the Raspberry Pi Pico W is the SoftAP feature.<\/p>\n\n\n\n<p>SoftAP stands for software-enabled access point, which allows you to broadcast a WiFi network right from the Raspberry Pi Pico W.<\/p>\n\n\n\n<p>This is why we&#8217;ve chosen to do this solar-powered project. <\/p>\n\n\n\n\n\n<iframe loading=\"lazy\" width=\"893\" height=\"502\" src=\"https:\/\/www.youtube.com\/embed\/Tr_Pq89-BgA\" title=\"Remote Weather Station - Solar powered Pico W SoftAP\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen=\"\"><\/iframe>\n\n\n\n<h2 class=\"wp-block-heading\">How a solar-powered project intersects with SoftAP<\/h2>\n\n\n\n<p>Here&#8217;s the issue.<\/p>\n\n\n\n<p>If you wanted to create a project that measured data away from your home, you&#8217;d find that you won&#8217;t be able to get that data wirelessly.<\/p>\n\n\n\n<p>You might as well use the regular Pico in this scenario, since you won&#8217;t be able to use its wireless ability.<\/p>\n\n\n\n<p>A solar-powered project is probably one of them, given that you need to put it in a sunbathed area, which is usually outdoors.<\/p>\n\n\n\n<p>This is where SoftAP comes in. Let&#8217;s say you want to know what the weather is like outside. You then connect to the SoftAP that the Raspberry Pi Pico W is broadcasting, and then log into the IP address which displays the data.<\/p>\n\n\n\n<p>This is pretty much the best-case scenario of how we can exploit the Raspberry Pi Pico W&#8217;s advantages.<\/p>\n\n\n\n<p>I mean, it&#8217;s possible to buy an LTE add-on or a long-range wireless add-on, but then it wouldn&#8217;t really be a Pico W tutorial, since you could just use those components on the regular Pico.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What about Bluetooth on the Raspberry Pi Pico W?<\/h2>\n\n\n\n<p>It would be great if you could use Bluetooth, but as of this tutorial&#8217;s publication date, Bluetooth isn&#8217;t enabled on the Raspberry Pi Pico W.<\/p>\n\n\n\n<p>On July 1, 2022, Raspberry Pi Engineer &amp; Forum Moderator jamesh said that, &#8220;We have already started work on the software for BT, no schedule I can offer as yet. Software need to be written tested, and tutorials written.&#8221;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Parts<\/h2>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-46.png\" alt=\"\" class=\"wp-image-2798\" style=\"width:611px;height:401px\" width=\"611\" height=\"401\"\/><figcaption class=\"wp-element-caption\">The complete project with the solar panel on the bottom of the breadboard<\/figcaption><\/figure>\n<\/div>\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/buyzero.de\/products\/raspberry-pi-pico-w-h-konfigurator-pico-pico-w-pico-h-pico-wh\">Raspberry Pi Pico W<\/a><\/li>\n\n\n\n<li>Solar panel 6V<\/li>\n\n\n\n<li>TP4056 USB-C charging module<\/li>\n\n\n\n<li>NR18650 Li-Ion battery 3.6V<\/li>\n\n\n\n<li><a href=\"https:\/\/buyzero.de\/en\/products\/luftqualitatssensor-bosch-bme688-breakout-board?_pos=13&amp;_sid=fe0534153&amp;_ss=r\">BME688 Breakout Board<\/a><\/li>\n\n\n\n<li>Battery holder for type 18650<\/li>\n\n\n\n<li><a href=\"https:\/\/buyzero.de\/products\/diode-20v-1n5817-dc-components?_pos=1&amp;_sid=56175bb2b&amp;_ss=r\">Schottky diode<\/a><\/li>\n\n\n\n<li>Headers for the Pico W and BME688<\/li>\n\n\n\n<li>Breadboard<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Update your Raspberry Pi Pico W&#8217;s firmware<\/h2>\n\n\n\n<p>The Raspberry Pi Pico W&#8217;s firmware is still constantly evolving so it would be best to use the latest firmware. For example, the first public MicroPython UF2 for the Pico W has some issues with security as networks are always open.<\/p>\n\n\n\n<p><a href=\"https:\/\/picockpit.com\/raspberry-pi\/everything-about-the-raspberry-pi-pico-w\/#Broadcasting_a_WiFi_network_SoftAP_access_point\">Follow this link to learn how to update it.<\/a> The link will also show you a quick-start method to broadcasting your own WiFi network.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Solar set up<\/h2>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-41-1024x579.png\" alt=\"\" class=\"wp-image-2791\" style=\"width:604px;height:341px\" width=\"604\" height=\"341\" srcset=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-41-1024x579.png 1024w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-41-300x170.png 300w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-41-768x434.png 768w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-41-18x10.png 18w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-41.png 1275w\" sizes=\"auto, (max-width: 604px) 100vw, 604px\" \/><figcaption class=\"wp-element-caption\">A solar panel that powers the Pico W should output 6V and 150mA, at least.<\/figcaption><\/figure>\n<\/div>\n\n\n<p>The solar panel should output at least 6 volts and 150mA.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-42-1024x598.png\" alt=\"\" class=\"wp-image-2793\" style=\"width:605px;height:353px\" width=\"605\" height=\"353\" srcset=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-42-1024x598.png 1024w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-42-300x175.png 300w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-42-768x449.png 768w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-42-18x12.png 18w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-42.png 1104w\" sizes=\"auto, (max-width: 605px) 100vw, 605px\" \/><\/figure>\n<\/div>\n\n\n<p>The battery should be a 18650-series lithium battery with a nominal voltage of 3.7V.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-44-1024x646.png\" alt=\"\" class=\"wp-image-2795\" style=\"width:602px;height:379px\" width=\"602\" height=\"379\" srcset=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-44-1024x646.png 1024w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-44-300x189.png 300w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-44-768x485.png 768w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-44-18x12.png 18w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-44.png 1339w\" sizes=\"auto, (max-width: 602px) 100vw, 602px\" \/><figcaption class=\"wp-element-caption\">TP4056 USB-C charging module<\/figcaption><\/figure>\n<\/div>\n\n\n<p>The TP4056 module will protect the battery and power the Pico W.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Weather tracking device<\/h2>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-45-1024x578.png\" alt=\"\" class=\"wp-image-2796\" style=\"width:634px;height:358px\" width=\"634\" height=\"358\" srcset=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-45-1024x578.png 1024w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-45-300x169.png 300w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-45-768x433.png 768w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-45-18x10.png 18w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-45.png 1258w\" sizes=\"auto, (max-width: 634px) 100vw, 634px\" \/><figcaption class=\"wp-element-caption\">BME688 breakout board by pi3g.<\/figcaption><\/figure>\n<\/div>\n\n\n<p>For this project, we are using our <a href=\"https:\/\/buyzero.de\/products\/luftqualitatssensor-bosch-bme688-breakout-board\">BME688 breakout board designed in house.<\/a><\/p>\n\n\n\n<p>You can use any weather sensor such as a DHT11 or DHT22, but this article&#8217;s code and wiring is really meant for a BME688.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Wiring<\/h2>\n\n\n\n<p>Place your Pico W and BME688 onto a breadboard.<\/p>\n\n\n\n<p>There are four pins you need to connect: 3.3V, GND, SCL and SDA on the BME688.<\/p>\n\n\n\n<p>Here&#8217;s what we used:<\/p>\n\n\n\n<p>Pico W&#8217;s <strong>GP1<\/strong> connects to <strong>SCL<\/strong>;<\/p>\n\n\n\n<p><strong>GP0 <\/strong>connects to <strong>SDA<\/strong>;<\/p>\n\n\n\n<p><strong>GND <\/strong>connects to <strong>GND<\/strong>;<\/p>\n\n\n\n<p>These three pins should be in-line, next to the micro-USB slot.<\/p>\n\n\n\n<p><strong>3V3 <\/strong>connects to <strong>3V3<\/strong>, which is located on the other side of the board.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">TP4056 USB-C charging module<\/h3>\n\n\n\n<p>You will need to solder wires onto the TP4056.<\/p>\n\n\n\n<p>It&#8217;s a good practice to solder red-coloured wires to positive connections and black ones to negative.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-46.png\" alt=\"Raspberry Pi Pico W solar panel project\" class=\"wp-image-2798\" style=\"width:622px;height:428px\" width=\"622\" height=\"428\" srcset=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-46.png 948w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-46-300x207.png 300w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-46-768x529.png 768w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-46-18x12.png 18w\" sizes=\"auto, (max-width: 622px) 100vw, 622px\" \/><\/figure>\n<\/div>\n\n\n<p>The pins to the next to the USB-C connector are for an external power connection, like our solar module. <\/p>\n\n\n\n<p>Connect these pins to your solar panel.<\/p>\n\n\n\n<p>On the other side, there are pins that are meant for the power output. The pins labelled B+ and B- need to be hooked up to the battery.<\/p>\n\n\n\n<p>We decided to use clamps to connect our battery holder to the TP4056 in case we need to change the circuit, but you can solder the battery holder directly to the TP4056 if you&#8217;d like.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Schottky diode<\/h3>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-48.png\" alt=\"\" class=\"wp-image-2806\" style=\"width:620px;height:402px\" width=\"620\" height=\"402\" srcset=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-48.png 847w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-48-300x195.png 300w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-48-768x499.png 768w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-48-18x12.png 18w\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" \/><\/figure>\n<\/div>\n\n\n<p>Connect a Schottky diode to the VSYS pin of the Pico W. <\/p>\n\n\n\n<p>Make sure the grey ring is on the diode is facing the Pico W, and the other end is connected to the positive rail on the breadboard.<\/p>\n\n\n\n<p>Since we are powering the Pico with two power inputs, USB and the solar system, we need to use a Schottky diode.<\/p>\n\n\n\n<p>A Schottky diode <a href=\"https:\/\/picockpit.com\/raspberry-pi\/everything-about-the-raspberry-pi-pico\/#Getting_started_with_the_Raspberry_Pi_Pico\">prevents back-powering and allows you to run two voltages. Learn more here.<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Connect TP4056 to breadboard<\/h3>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-49.png\" alt=\"Solar-powered Raspberry Pi Pico W complete!\" class=\"wp-image-2810\" style=\"width:617px;height:345px\" width=\"617\" height=\"345\" srcset=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-49.png 956w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-49-300x168.png 300w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-49-768x431.png 768w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-49-18x10.png 18w\" sizes=\"auto, (max-width: 617px) 100vw, 617px\" \/><figcaption class=\"wp-element-caption\">Solar-powered Raspberry Pi Pico W complete!<\/figcaption><\/figure>\n<\/div>\n\n\n<p>Connect the positive output from the TP4056 to the positive rail of the breadboard, where the Schottky diode is located.<\/p>\n\n\n\n<p>Then, connect the negative output from the TP4056 to a negative pin of the Raspberry Pi Pico W.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Code to run Raspberry Pi Pico W weather station<\/h2>\n\n\n\n<p>We have uploaded all our code to our <a href=\"https:\/\/github.com\/pi3g\/pico-w\/tree\/main\/MicroPython\/IV%20Pico%20W%20Weather%20Station\">Github repo here.<\/a><\/p>\n\n\n\n<p>Here&#8217;s <a href=\"https:\/\/picockpit.com\/raspberry-pi\/everything-about-the-raspberry-pi-pico-w\/#Uploading_files_to_your_Raspberry_Pi_Pico_W\">a guide on how to upload files to your Pico W.<\/a><\/p>\n\n\n\n<p>If you have connected the components as written above, you will be able to run the code without any changes.<\/p>\n\n\n\n<p>That said, here are some things you might want to change.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">bme68x.py<\/h2>\n\n\n\n<p>This script modifies the BME688&#8217;s output.<\/p>\n\n\n\n<p>To get accurate temperature and altitude readings, you will need to modify these lines, highlighted in bold:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\" # change this to match the location's pressure (hPa) at sea level\n        # bme68x.sea_level_pressure = 1013.25\n       <strong&gt; self.bme68x.sea_level_pressure = 1013<\/strong&gt;\n\n        # You will usually have to add an offset to account for the temperature of\n        # the sensor. This is usually around 5 degrees but varies by use. Use a\n        # separate temperature sensor to calibrate this one.\n        <strong&gt;self.temperature_offset = -9<\/strong&gt;\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9FF\"> # <\/span><span style=\"color: #D8DEE9\">change<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">this<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">to<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">match<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">the<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">location<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">s pressure (hPa) at sea leve<\/span><span style=\"color: #D8DEE9\">l<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        # <\/span><span style=\"color: #D8DEE9\">bme68x<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #D8DEE9\">sea_level_pressure<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #B48EAD\">1013.25<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">       <\/span><span style=\"color: #81A1C1\">&lt;strong&gt;<\/span><span style=\"color: #D8DEE9FF\"> self.bme68x.sea_level_pressure = 1013<\/span><span style=\"color: #81A1C1\">&lt;\/strong&gt;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        # <\/span><span style=\"color: #D8DEE9\">You<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">will<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">usually<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">have<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">to<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">add<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">an<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">offset<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">to<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">account<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">for<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">the<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">temperature<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">of<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        # <\/span><span style=\"color: #D8DEE9\">the<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">sensor<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">This<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">is<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">usually<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">around<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #B48EAD\">5<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">degrees<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">but<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">varies<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">by<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">use<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">Use<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">a<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        # <\/span><span style=\"color: #D8DEE9\">separate<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">temperature<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">sensor<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">to<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">calibrate<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">this<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">one<\/span><span style=\"color: #ECEFF4\">.<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        <\/span><span style=\"color: #81A1C1\">&lt;strong&gt;<\/span><span style=\"color: #D8DEE9FF\">self.temperature_offset = -9<\/span><span style=\"color: #81A1C1\">&lt;\/strong&gt;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">main.py<\/h2>\n\n\n\n<p>The main.py file launches an access point and also runs a server that delivers a HTML file to anyone who connects.<\/p>\n\n\n\n<p>The HTML file is where you can see the readings from the BME688. <\/p>\n\n\n\n<p>Upon receiving a connection (via sockets), the Pico W will send the index.html file, but before sending it, it will replace some strings with the data taken from the BME688, via this block of code:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"data = {\n    'T': 0,\n    'P': 0,\n    'A': 0,\n    'H': 0,\n    'G': 0,\n    }\n...\ndef get_html(html_name):\n    with open(html_name, 'r') as file:\n        html = file.read()\n        \n    return html\n...\nsensor = bme68x.BME68X()\n... \nresponse = get_html('index.html')\n    data = sensor.save_data('data.json')\n    blink_onboard_led(1, 0.2)\n    response = response.replace('id_temp', str(data['T']))\n    response = response.replace('id_pres', str(data['P']))\n    response = response.replace('id_alti', str(data['A']))\n    response = response.replace('id_humi', str(data['H']))\n    response = response.replace('id_gas', str(data['G']))\n    print_data(data)\n    conn.send(response)\n    conn.close()\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9\">data<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">T<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #B48EAD\">0<\/span><span style=\"color: #ECEFF4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">P<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #B48EAD\">0<\/span><span style=\"color: #ECEFF4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">A<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #B48EAD\">0<\/span><span style=\"color: #ECEFF4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">H<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #B48EAD\">0<\/span><span style=\"color: #ECEFF4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">G<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #B48EAD\">0<\/span><span style=\"color: #ECEFF4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #ECEFF4\">}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">...<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">def<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">get_html<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #D8DEE9\">html_name<\/span><span style=\"color: #D8DEE9FF\">):<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">with<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">open<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #D8DEE9\">html_name<\/span><span style=\"color: #ECEFF4\">,<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">r<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #D8DEE9FF\">) <\/span><span style=\"color: #81A1C1\">as<\/span><span style=\"color: #D8DEE9FF\"> file:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        <\/span><span style=\"color: #D8DEE9\">html<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">file<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #88C0D0\">read<\/span><span style=\"color: #D8DEE9FF\">()<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">return<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">html<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">...<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">sensor<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">bme68x<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #88C0D0\">BME68X<\/span><span style=\"color: #D8DEE9FF\">()<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">...<\/span><span style=\"color: #D8DEE9FF\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">response<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">get_html<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">index.html<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #D8DEE9FF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #D8DEE9\">data<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">sensor<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #88C0D0\">save_data<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">data.json<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #D8DEE9FF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #88C0D0\">blink_onboard_led<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #B48EAD\">1<\/span><span style=\"color: #ECEFF4\">,<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #B48EAD\">0.2<\/span><span style=\"color: #D8DEE9FF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #D8DEE9\">response<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">response<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #88C0D0\">replace<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">id_temp<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #ECEFF4\">,<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">str<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #D8DEE9\">data<\/span><span style=\"color: #D8DEE9FF\">[<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">T<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #D8DEE9FF\">]))<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #D8DEE9\">response<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">response<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #88C0D0\">replace<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">id_pres<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #ECEFF4\">,<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">str<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #D8DEE9\">data<\/span><span style=\"color: #D8DEE9FF\">[<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">P<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #D8DEE9FF\">]))<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #D8DEE9\">response<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">response<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #88C0D0\">replace<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">id_alti<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #ECEFF4\">,<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">str<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #D8DEE9\">data<\/span><span style=\"color: #D8DEE9FF\">[<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">A<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #D8DEE9FF\">]))<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #D8DEE9\">response<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">response<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #88C0D0\">replace<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">id_humi<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #ECEFF4\">,<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">str<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #D8DEE9\">data<\/span><span style=\"color: #D8DEE9FF\">[<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">H<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #D8DEE9FF\">]))<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #D8DEE9\">response<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">response<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #88C0D0\">replace<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">id_gas<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #ECEFF4\">,<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">str<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #D8DEE9\">data<\/span><span style=\"color: #D8DEE9FF\">[<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">G<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #D8DEE9FF\">]))<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #88C0D0\">print_data<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #D8DEE9\">data<\/span><span style=\"color: #D8DEE9FF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #D8DEE9\">conn<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #88C0D0\">send<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #D8DEE9\">response<\/span><span style=\"color: #D8DEE9FF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #D8DEE9\">conn<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #88C0D0\">close<\/span><span style=\"color: #D8DEE9FF\">()<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>As you can see, the line where it says <strong>data = sensor.save_data(&#8216;data.json&#8217;) <\/strong>is where we get the sensor&#8217;s data, and then the code modifies the HTML file with the correct readings for temperature, pressure, altitude, humidity and gas conductivity.<\/p>\n\n\n\n<p>There is an automatic refresh every three seconds.<\/p>\n\n\n\n<p>The following is the block of code required to broadcast the access point on the Raspberry Pi Pico W:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"\nessid = 'Pico-W-Weather-Station'\npassword = '#FreeThePicoW'\n\nap = network.WLAN(network.AP_IF)\nap.active(True)\nap.config(essid=essid, password=password)\n\nwhile ap.active() == False:\n    pass\n\nprint('Connection successfull')\nprint(ap.ifconfig())\n\n# Create sensor object\nsensor = bme68x.BME68X()\n\ns = socket.socket(socket.AF_INET, socket.SOCK_STREAM)\ns.bind(('', 80))\ns.listen(3)\nblink_onboard_led(3, 0.2)\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">essid<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">Pico-W-Weather-Station<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">password<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">#FreeThePicoW<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">ap<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">network<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #88C0D0\">WLAN<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #D8DEE9\">network<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #D8DEE9\">AP_IF<\/span><span style=\"color: #D8DEE9FF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">ap<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #88C0D0\">active<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #D8DEE9\">True<\/span><span style=\"color: #D8DEE9FF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">ap<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #88C0D0\">config<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #D8DEE9\">essid<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9\">essid<\/span><span style=\"color: #ECEFF4\">,<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">password<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9\">password<\/span><span style=\"color: #D8DEE9FF\">)<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">while<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">ap<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #88C0D0\">active<\/span><span style=\"color: #D8DEE9FF\">() <\/span><span style=\"color: #81A1C1\">==<\/span><span style=\"color: #D8DEE9FF\"> False<\/span><span style=\"color: #ECEFF4\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #D8DEE9\">pass<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">print<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">Connection successfull<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #D8DEE9FF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">print<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #D8DEE9\">ap<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #88C0D0\">ifconfig<\/span><span style=\"color: #D8DEE9FF\">())<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\"># <\/span><span style=\"color: #D8DEE9\">Create<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">sensor<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">object<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">sensor<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">bme68x<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #88C0D0\">BME68X<\/span><span style=\"color: #D8DEE9FF\">()<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">s<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">socket<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #88C0D0\">socket<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #D8DEE9\">socket<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #D8DEE9\">AF_INET<\/span><span style=\"color: #ECEFF4\">,<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">socket<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #D8DEE9\">SOCK_STREAM<\/span><span style=\"color: #D8DEE9FF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">s<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #88C0D0\">bind<\/span><span style=\"color: #D8DEE9FF\">((<\/span><span style=\"color: #ECEFF4\">&#39;&#39;<\/span><span style=\"color: #ECEFF4\">,<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #B48EAD\">80<\/span><span style=\"color: #D8DEE9FF\">))<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">s<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #88C0D0\">listen<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #B48EAD\">3<\/span><span style=\"color: #D8DEE9FF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">blink_onboard_led<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #B48EAD\">3<\/span><span style=\"color: #ECEFF4\">,<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #B48EAD\">0.2<\/span><span style=\"color: #D8DEE9FF\">)<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Note: if you are using the original firmware, you should update it or else you won&#8217;t be able to rename the SSID or have wireless security. We tested it on the July 15, 2022 nightly build and it finally worked. <a href=\"https:\/\/picockpit.com\/raspberry-pi\/everything-about-the-raspberry-pi-pico-w\/#Broadcasting_a_WiFi_network_SoftAP_access_point\">There are some more quirks and bugs so be sure to read our walkthrough here.<\/a><\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>CLICK HERE: <a href=\"https:\/\/picockpit.com\/raspberry-pi\/picockpit-help\/#Installationhttps:\/\/picockpit.com\/raspberry-pi\/everything-about-the-raspberry-pi-pico-w\/#Broadcasting_a_WiFi_network_SoftAP_access_point\">Broadcasting a WiFi network (SoftAP access point)<\/a><\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\">Connecting to your Pico W access point<\/h2>\n\n\n\n<p>Upon successful broadcasting of the AP, your Pico W will blink three times with the code provided. <\/p>\n\n\n\n<p>Connect to your AP, which should be named <strong>Pico-W-Weather-Station.<\/strong><\/p>\n\n\n\n<p>Type in the password <strong>#FreeThePicoW<\/strong><\/p>\n\n\n\n<p>Connect to your Pico by using the IP address. If you ran it from Thonny, you will see the IP address in the shell.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-50-1024x525.png\" alt=\"\" class=\"wp-image-2816\" style=\"width:774px;height:397px\" width=\"774\" height=\"397\" srcset=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-50-1024x525.png 1024w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-50-300x154.png 300w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-50-768x394.png 768w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-50-1536x788.png 1536w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-50-18x9.png 18w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-50.png 1691w\" sizes=\"auto, (max-width: 774px) 100vw, 774px\" \/><\/figure>\n<\/div>\n\n\n<p>Otherwise, you might try <strong>192.168.4.1<\/strong> as this is most commonly the IP address of the Pico W and you should see the screenshot on the right:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-51-1024x566.png\" alt=\"\" class=\"wp-image-2817\" style=\"width:606px;height:335px\" width=\"606\" height=\"335\" srcset=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-51-1024x566.png 1024w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-51-300x166.png 300w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-51-768x424.png 768w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-51-18x10.png 18w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/image-51.png 1289w\" sizes=\"auto, (max-width: 606px) 100vw, 606px\" \/><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\">You&#8217;re done<\/h2>\n\n\n\n<p>In this project, you learned how to broadcast a network from the Raspberry Pi Pico W&#8217;s SoftAP feature. You also learned how to connect a solar panel and battery to the Pico W.<\/p>\n\n\n\n<p>If you want to learn more about the Pico W, <a href=\"https:\/\/picockpit.com\/raspberry-pi\/everything-about-the-raspberry-pi-pico-w\/\">why not read our mega article here?<\/a><\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>CLICK HERE: <a href=\"https:\/\/picockpit.com\/raspberry-pi\/everything-about-the-raspberry-pi-pico-w\/\">Everything you need to know about the Raspberry Pi Pico W<\/a><\/p>\n<\/blockquote>\n<div class=\"shariff shariff-align-center shariff-widget-align-left shariff-buttonstretch\"><ul class=\"shariff-buttons theme-white orientation-horizontal buttonsize-medium\"><li class=\"shariff-button twitter shariff-nocustomcolor\" style=\"background-color:#595959\"><a href=\"https:\/\/twitter.com\/share?url=https%3A%2F%2Fpicockpit.com%2Fraspberry-pi%2Fpl%2Fraspberry-pi-pico-w-remote-weather-station-solar-powered-and-softap%2F&text=Raspberry%20Pi%20Pico%20W%20%28Solar-Powered%29%20Remote%20Weather%20Station\" title=\"Udost\u0119pnij na X\" aria-label=\"Udost\u0119pnij na X\" role=\"button\" rel=\"noopener nofollow\" class=\"shariff-link\" style=\"; background-color:#000; color:#000\" target=\"_blank\"><span class=\"shariff-icon\" style=\"fill:#000\"><svg width=\"32px\" height=\"20px\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 24 24\"><path fill=\"#000\" d=\"M14.258 10.152L23.176 0h-2.113l-7.747 8.813L7.133 0H0l9.352 13.328L0 23.973h2.113l8.176-9.309 6.531 9.309h7.133zm-2.895 3.293l-.949-1.328L2.875 1.56h3.246l6.086 8.523.945 1.328 7.91 11.078h-3.246zm0 0\"\/><\/svg><\/span><span class=\"shariff-text\" style=\"color:#000\">udost\u0119pnij<\/span>&nbsp;<\/a><\/li><li class=\"shariff-button facebook shariff-nocustomcolor\" style=\"background-color:#4273c8\"><a href=\"https:\/\/www.facebook.com\/sharer\/sharer.php?u=https%3A%2F%2Fpicockpit.com%2Fraspberry-pi%2Fpl%2Fraspberry-pi-pico-w-remote-weather-station-solar-powered-and-softap%2F\" title=\"Udost\u0119pnij na Facebooku\" aria-label=\"Udost\u0119pnij na Facebooku\" role=\"button\" rel=\"nofollow\" class=\"shariff-link\" style=\"; background-color:#3b5998; color:#3b5998\" target=\"_blank\"><span class=\"shariff-icon\" style=\"fill:#3b5998\"><svg width=\"32px\" height=\"20px\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 18 32\"><path fill=\"#3b5998\" d=\"M17.1 0.2v4.7h-2.8q-1.5 0-2.1 0.6t-0.5 1.9v3.4h5.2l-0.7 5.3h-4.5v13.6h-5.5v-13.6h-4.5v-5.3h4.5v-3.9q0-3.3 1.9-5.2t5-1.8q2.6 0 4.1 0.2z\"\/><\/svg><\/span><span class=\"shariff-text\" style=\"color:#3b5998\">udost\u0119pnij<\/span>&nbsp;<\/a><\/li><li class=\"shariff-button telegram shariff-nocustomcolor\" style=\"background-color:#4084A6\"><a href=\"https:\/\/telegram.me\/share\/url?url=https%3A%2F%2Fpicockpit.com%2Fraspberry-pi%2Fpl%2Fraspberry-pi-pico-w-remote-weather-station-solar-powered-and-softap%2F&text=Raspberry%20Pi%20Pico%20W%20%28Solar-Powered%29%20Remote%20Weather%20Station\" title=\"Udost\u0119pnij przez Telegram\" aria-label=\"Udost\u0119pnij przez Telegram\" role=\"button\" rel=\"noopener nofollow\" class=\"shariff-link\" style=\"; background-color:#0088cc; color:#0088cc\" target=\"_blank\"><span class=\"shariff-icon\" style=\"fill:#0088cc\"><svg width=\"32px\" height=\"20px\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 32 32\"><path fill=\"#0088cc\" d=\"M30.8 6.5l-4.5 21.4c-.3 1.5-1.2 1.9-2.5 1.2L16.9 24l-3.3 3.2c-.4.4-.7.7-1.4.7l.5-7L25.5 9.2c.6-.5-.1-.8-.9-.3l-15.8 10L2 16.7c-1.5-.5-1.5-1.5.3-2.2L28.9 4.3c1.3-.5 2.3.3 1.9 2.2z\"\/><\/svg><\/span><span class=\"shariff-text\" style=\"color:#0088cc\">udost\u0119pnij<\/span>&nbsp;<\/a><\/li><li class=\"shariff-button reddit shariff-nocustomcolor\" style=\"background-color:#ff5700\"><a href=\"https:\/\/www.reddit.com\/submit?url=https%3A%2F%2Fpicockpit.com%2Fraspberry-pi%2Fpl%2Fraspberry-pi-pico-w-remote-weather-station-solar-powered-and-softap%2F\" title=\"Udost\u0119pnij przez Reddit\" aria-label=\"Udost\u0119pnij przez Reddit\" role=\"button\" rel=\"noopener nofollow\" class=\"shariff-link\" style=\"; background-color:#ff4500; color:#ff4500\" target=\"_blank\"><span class=\"shariff-icon\" style=\"fill:#ff4500\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\"><path fill=\"#ff4500\" d=\"M440.3 203.5c-15 0-28.2 6.2-37.9 15.9-35.7-24.7-83.8-40.6-137.1-42.3L293 52.3l88.2 19.8c0 21.6 17.6 39.2 39.2 39.2 22 0 39.7-18.1 39.7-39.7s-17.6-39.7-39.7-39.7c-15.4 0-28.7 9.3-35.3 22l-97.4-21.6c-4.9-1.3-9.7 2.2-11 7.1L246.3 177c-52.9 2.2-100.5 18.1-136.3 42.8-9.7-10.1-23.4-16.3-38.4-16.3-55.6 0-73.8 74.6-22.9 100.1-1.8 7.9-2.6 16.3-2.6 24.7 0 83.8 94.4 151.7 210.3 151.7 116.4 0 210.8-67.9 210.8-151.7 0-8.4-.9-17.2-3.1-25.1 49.9-25.6 31.5-99.7-23.8-99.7zM129.4 308.9c0-22 17.6-39.7 39.7-39.7 21.6 0 39.2 17.6 39.2 39.7 0 21.6-17.6 39.2-39.2 39.2-22 .1-39.7-17.6-39.7-39.2zm214.3 93.5c-36.4 36.4-139.1 36.4-175.5 0-4-3.5-4-9.7 0-13.7 3.5-3.5 9.7-3.5 13.2 0 27.8 28.5 120 29 149 0 3.5-3.5 9.7-3.5 13.2 0 4.1 4 4.1 10.2.1 13.7zm-.8-54.2c-21.6 0-39.2-17.6-39.2-39.2 0-22 17.6-39.7 39.2-39.7 22 0 39.7 17.6 39.7 39.7-.1 21.5-17.7 39.2-39.7 39.2z\"\/><\/svg><\/span><span class=\"shariff-text\" style=\"color:#ff4500\">udost\u0119pnij<\/span>&nbsp;<\/a><\/li><\/ul><\/div>","protected":false},"excerpt":{"rendered":"<p>Jedn\u0105 z bardzo szczeg\u00f3lnych cech Raspberry Pi Pico W jest funkcja SoftAP. SoftAP to skr\u00f3t od Software-enabled Access Point, kt\u00f3ry pozwala na rozg\u0142aszanie sieci WiFi bezpo\u015brednio z Raspberry Pi Pico W. To w\u0142a\u015bnie dlatego zdecydowali\u015bmy si\u0119 na ten projekt zasilany energi\u0105 s\u0142oneczn\u0105. Jak projekt zasilany energi\u0105 s\u0142oneczn\u0105 \u0142\u0105czy si\u0119 z SoftAP Oto zagadnienie....<\/p>","protected":false},"author":2,"featured_media":2820,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,3],"tags":[556,221,552,486,447,187,555,554,553],"class_list":["post-2777","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-raspberry-pi-pico","category-raspberry-pi-how-to","tag-bme68x-py","tag-pico-w","tag-pico-w-projects","tag-project","tag-projects","tag-raspberry-pi","tag-schottky-diode","tag-tp4056-usb-c","tag-weather-tracking"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Raspberry Pi Pico W (Solar-Powered) Remote Weather Station | PiCockpit<\/title>\n<meta name=\"description\" content=\"In this tutorial, learn to broadcast an access point that transmit weather station data wirelessly with your Raspberry Pi!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/picockpit.com\/raspberry-pi\/pl\/raspberry-pi-pico-w-remote-weather-station-solar-powered-and-softap\/\" \/>\n<meta property=\"og:locale\" content=\"pl_PL\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Raspberry Pi Pico W (Solar-Powered) Remote Weather Station | PiCockpit\" \/>\n<meta property=\"og:description\" content=\"In this tutorial, learn to broadcast an access point that transmit weather station data wirelessly with your Raspberry Pi!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/picockpit.com\/raspberry-pi\/pl\/raspberry-pi-pico-w-remote-weather-station-solar-powered-and-softap\/\" \/>\n<meta property=\"og:site_name\" content=\"PiCockpit\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/pi3gshop\" \/>\n<meta property=\"article:published_time\" content=\"2022-07-17T09:53:06+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-08-23T10:37:17+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/featured-image.png\" \/>\n\t<meta property=\"og:image:width\" content=\"4779\" \/>\n\t<meta property=\"og:image:height\" content=\"2688\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"raspi berry\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@pi3g\" \/>\n<meta name=\"twitter:site\" content=\"@pi3g\" \/>\n<meta name=\"twitter:label1\" content=\"Napisane przez\" \/>\n\t<meta name=\"twitter:data1\" content=\"raspi berry\" \/>\n\t<meta name=\"twitter:label2\" content=\"Szacowany czas czytania\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minut\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/raspberry-pi-pico-w-remote-weather-station\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/raspberry-pi-pico-w-remote-weather-station\\\/\"},\"author\":{\"name\":\"raspi berry\",\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/#\\\/schema\\\/person\\\/7af3a7a8c999bc722029ef9ca9d78eee\"},\"headline\":\"Raspberry Pi Pico W (Solar-Powered) Remote Weather Station\",\"datePublished\":\"2022-07-17T09:53:06+00:00\",\"dateModified\":\"2023-08-23T10:37:17+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/raspberry-pi-pico-w-remote-weather-station\\\/\"},\"wordCount\":1304,\"commentCount\":7,\"publisher\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/raspberry-pi-pico-w-remote-weather-station\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/featured-image.png\",\"keywords\":[\"bme68x.py\",\"Pico W\",\"Pico W projects\",\"project\",\"Projects\",\"Raspberry Pi\",\"Schottky diode\",\"TP4056 USB-C\",\"weather tracking\"],\"articleSection\":[\"Raspberry Pi Pico\",\"Tutorials\"],\"inLanguage\":\"pl-PL\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/raspberry-pi-pico-w-remote-weather-station\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/raspberry-pi-pico-w-remote-weather-station\\\/\",\"url\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/raspberry-pi-pico-w-remote-weather-station\\\/\",\"name\":\"Raspberry Pi Pico W (Solar-Powered) Remote Weather Station | PiCockpit\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/raspberry-pi-pico-w-remote-weather-station\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/raspberry-pi-pico-w-remote-weather-station\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/featured-image.png\",\"datePublished\":\"2022-07-17T09:53:06+00:00\",\"dateModified\":\"2023-08-23T10:37:17+00:00\",\"description\":\"In this tutorial, learn to broadcast an access point that transmit weather station data wirelessly with your Raspberry Pi!\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/raspberry-pi-pico-w-remote-weather-station\\\/#breadcrumb\"},\"inLanguage\":\"pl-PL\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/raspberry-pi-pico-w-remote-weather-station\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"pl-PL\",\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/raspberry-pi-pico-w-remote-weather-station\\\/#primaryimage\",\"url\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/featured-image.png\",\"contentUrl\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/featured-image.png\",\"width\":4779,\"height\":2688,\"caption\":\"Raspberry Pi Pico W softap weather station\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/raspberry-pi-pico-w-remote-weather-station\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Raspberry Pi Pico\",\"item\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/category\\\/raspberry-pi-pico\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Raspberry Pi Pico W (Solar-Powered) Remote Weather Station\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/#website\",\"url\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/\",\"name\":\"PiCockpit\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"pl-PL\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/#organization\",\"name\":\"PiCockpit.com\",\"url\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pl-PL\",\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/Screenshot-from-2023-07-24-15-01-24.png\",\"contentUrl\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/Screenshot-from-2023-07-24-15-01-24.png\",\"width\":1165,\"height\":283,\"caption\":\"PiCockpit.com\"},\"image\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/pi3gshop\",\"https:\\\/\\\/x.com\\\/pi3g\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/#\\\/schema\\\/person\\\/7af3a7a8c999bc722029ef9ca9d78eee\",\"name\":\"raspi berry\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pl-PL\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c10c423ceeff34163dd54a5472d6da17d71c0e360e0cf8cdb8847006372f216b?s=96&d=blank&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c10c423ceeff34163dd54a5472d6da17d71c0e360e0cf8cdb8847006372f216b?s=96&d=blank&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c10c423ceeff34163dd54a5472d6da17d71c0e360e0cf8cdb8847006372f216b?s=96&d=blank&r=g\",\"caption\":\"raspi berry\"},\"description\":\"I'm here to help you with all your Raspberry Pi related questions &amp; love to share about new project ideas for the Raspberry Pi, and give quick tips. Of course I'll also help you with PiCockpit and how to make your Raspberry Pi even easier to use with this raspberry pi monitoring solution :-)\",\"sameAs\":[\"https:\\\/\\\/picockpit.com\"],\"url\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/pl\\\/author\\\/raspi-berry\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Zdalna stacja pogodowa Raspberry Pi Pico W (zasilana energi\u0105 s\u0142oneczn\u0105) | PiCockpit","description":"W tym samouczku nauczysz si\u0119 transmitowa\u0107 punkt dost\u0119powy, kt\u00f3ry bezprzewodowo przesy\u0142a dane stacji pogodowej za pomoc\u0105 Raspberry Pi!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/picockpit.com\/raspberry-pi\/pl\/raspberry-pi-pico-w-remote-weather-station-solar-powered-and-softap\/","og_locale":"pl_PL","og_type":"article","og_title":"Raspberry Pi Pico W (Solar-Powered) Remote Weather Station | PiCockpit","og_description":"In this tutorial, learn to broadcast an access point that transmit weather station data wirelessly with your Raspberry Pi!","og_url":"https:\/\/picockpit.com\/raspberry-pi\/pl\/raspberry-pi-pico-w-remote-weather-station-solar-powered-and-softap\/","og_site_name":"PiCockpit","article_publisher":"https:\/\/www.facebook.com\/pi3gshop","article_published_time":"2022-07-17T09:53:06+00:00","article_modified_time":"2023-08-23T10:37:17+00:00","og_image":[{"width":4779,"height":2688,"url":"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/featured-image.png","type":"image\/png"}],"author":"raspi berry","twitter_card":"summary_large_image","twitter_creator":"@pi3g","twitter_site":"@pi3g","twitter_misc":{"Napisane przez":"raspi berry","Szacowany czas czytania":"8 minut"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/picockpit.com\/raspberry-pi\/raspberry-pi-pico-w-remote-weather-station\/#article","isPartOf":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/raspberry-pi-pico-w-remote-weather-station\/"},"author":{"name":"raspi berry","@id":"https:\/\/picockpit.com\/raspberry-pi\/#\/schema\/person\/7af3a7a8c999bc722029ef9ca9d78eee"},"headline":"Raspberry Pi Pico W (Solar-Powered) Remote Weather Station","datePublished":"2022-07-17T09:53:06+00:00","dateModified":"2023-08-23T10:37:17+00:00","mainEntityOfPage":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/raspberry-pi-pico-w-remote-weather-station\/"},"wordCount":1304,"commentCount":7,"publisher":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/#organization"},"image":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/raspberry-pi-pico-w-remote-weather-station\/#primaryimage"},"thumbnailUrl":"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/featured-image.png","keywords":["bme68x.py","Pico W","Pico W projects","project","Projects","Raspberry Pi","Schottky diode","TP4056 USB-C","weather tracking"],"articleSection":["Raspberry Pi Pico","Tutorials"],"inLanguage":"pl-PL","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/picockpit.com\/raspberry-pi\/raspberry-pi-pico-w-remote-weather-station\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/picockpit.com\/raspberry-pi\/raspberry-pi-pico-w-remote-weather-station\/","url":"https:\/\/picockpit.com\/raspberry-pi\/raspberry-pi-pico-w-remote-weather-station\/","name":"Zdalna stacja pogodowa Raspberry Pi Pico W (zasilana energi\u0105 s\u0142oneczn\u0105) | PiCockpit","isPartOf":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/#website"},"primaryImageOfPage":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/raspberry-pi-pico-w-remote-weather-station\/#primaryimage"},"image":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/raspberry-pi-pico-w-remote-weather-station\/#primaryimage"},"thumbnailUrl":"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/featured-image.png","datePublished":"2022-07-17T09:53:06+00:00","dateModified":"2023-08-23T10:37:17+00:00","description":"W tym samouczku nauczysz si\u0119 transmitowa\u0107 punkt dost\u0119powy, kt\u00f3ry bezprzewodowo przesy\u0142a dane stacji pogodowej za pomoc\u0105 Raspberry Pi!","breadcrumb":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/raspberry-pi-pico-w-remote-weather-station\/#breadcrumb"},"inLanguage":"pl-PL","potentialAction":[{"@type":"ReadAction","target":["https:\/\/picockpit.com\/raspberry-pi\/raspberry-pi-pico-w-remote-weather-station\/"]}]},{"@type":"ImageObject","inLanguage":"pl-PL","@id":"https:\/\/picockpit.com\/raspberry-pi\/raspberry-pi-pico-w-remote-weather-station\/#primaryimage","url":"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/featured-image.png","contentUrl":"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/07\/featured-image.png","width":4779,"height":2688,"caption":"Raspberry Pi Pico W softap weather station"},{"@type":"BreadcrumbList","@id":"https:\/\/picockpit.com\/raspberry-pi\/raspberry-pi-pico-w-remote-weather-station\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/picockpit.com\/raspberry-pi\/"},{"@type":"ListItem","position":2,"name":"Raspberry Pi Pico","item":"https:\/\/picockpit.com\/raspberry-pi\/category\/raspberry-pi-pico\/"},{"@type":"ListItem","position":3,"name":"Raspberry Pi Pico W (Solar-Powered) Remote Weather Station"}]},{"@type":"WebSite","@id":"https:\/\/picockpit.com\/raspberry-pi\/#website","url":"https:\/\/picockpit.com\/raspberry-pi\/","name":"PiCockpit","description":"","publisher":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/picockpit.com\/raspberry-pi\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"pl-PL"},{"@type":"Organization","@id":"https:\/\/picockpit.com\/raspberry-pi\/#organization","name":"PiCockpit.com","url":"https:\/\/picockpit.com\/raspberry-pi\/","logo":{"@type":"ImageObject","inLanguage":"pl-PL","@id":"https:\/\/picockpit.com\/raspberry-pi\/#\/schema\/logo\/image\/","url":"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2023\/07\/Screenshot-from-2023-07-24-15-01-24.png","contentUrl":"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2023\/07\/Screenshot-from-2023-07-24-15-01-24.png","width":1165,"height":283,"caption":"PiCockpit.com"},"image":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/pi3gshop","https:\/\/x.com\/pi3g"]},{"@type":"Person","@id":"https:\/\/picockpit.com\/raspberry-pi\/#\/schema\/person\/7af3a7a8c999bc722029ef9ca9d78eee","name":"jagoda malina","image":{"@type":"ImageObject","inLanguage":"pl-PL","@id":"https:\/\/secure.gravatar.com\/avatar\/c10c423ceeff34163dd54a5472d6da17d71c0e360e0cf8cdb8847006372f216b?s=96&d=blank&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/c10c423ceeff34163dd54a5472d6da17d71c0e360e0cf8cdb8847006372f216b?s=96&d=blank&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c10c423ceeff34163dd54a5472d6da17d71c0e360e0cf8cdb8847006372f216b?s=96&d=blank&r=g","caption":"raspi berry"},"description":"Jestem tutaj, aby pom\u00f3c Ci we wszystkich pytaniach zwi\u0105zanych z Raspberry Pi i uwielbiam dzieli\u0107 si\u0119 nowymi pomys\u0142ami na projekty dla Raspberry Pi, a tak\u017ce udziela\u0107 szybkich wskaz\u00f3wek. Oczywi\u015bcie pomog\u0119 Ci r\u00f3wnie\u017c z PiCockpit i jak sprawi\u0107, aby Twoje Raspberry Pi jeszcze \u0142atwiejsze w u\u017cyciu z tym rozwi\u0105zaniem monitorowania Maliny Pi :-)","sameAs":["https:\/\/picockpit.com"],"url":"https:\/\/picockpit.com\/raspberry-pi\/pl\/author\/raspi-berry\/"}]}},"_links":{"self":[{"href":"https:\/\/picockpit.com\/raspberry-pi\/pl\/wp-json\/wp\/v2\/posts\/2777","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/picockpit.com\/raspberry-pi\/pl\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/picockpit.com\/raspberry-pi\/pl\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/picockpit.com\/raspberry-pi\/pl\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/picockpit.com\/raspberry-pi\/pl\/wp-json\/wp\/v2\/comments?post=2777"}],"version-history":[{"count":29,"href":"https:\/\/picockpit.com\/raspberry-pi\/pl\/wp-json\/wp\/v2\/posts\/2777\/revisions"}],"predecessor-version":[{"id":4880,"href":"https:\/\/picockpit.com\/raspberry-pi\/pl\/wp-json\/wp\/v2\/posts\/2777\/revisions\/4880"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/picockpit.com\/raspberry-pi\/pl\/wp-json\/wp\/v2\/media\/2820"}],"wp:attachment":[{"href":"https:\/\/picockpit.com\/raspberry-pi\/pl\/wp-json\/wp\/v2\/media?parent=2777"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/picockpit.com\/raspberry-pi\/pl\/wp-json\/wp\/v2\/categories?post=2777"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/picockpit.com\/raspberry-pi\/pl\/wp-json\/wp\/v2\/tags?post=2777"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}