{"id":1999,"date":"2024-12-15T11:00:25","date_gmt":"2024-12-15T19:00:25","guid":{"rendered":"https:\/\/unixwizardry.com\/?p=1999"},"modified":"2024-12-18T20:14:16","modified_gmt":"2024-12-19T04:14:16","slug":"well-i-thought-i-was-on-the-home-stretch-with-the-weather-station","status":"publish","type":"post","link":"https:\/\/unixwizardry.com\/index.php\/2024\/12\/15\/well-i-thought-i-was-on-the-home-stretch-with-the-weather-station\/","title":{"rendered":"Well, I thought I was on the home stretch with the weather station&#8230;"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"1999\" class=\"elementor elementor-1999\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-2adab07 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"2adab07\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-698ec900\" data-id=\"698ec900\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-5de68dfe elementor-widget elementor-widget-text-editor\" data-id=\"5de68dfe\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><strong>UPDATE.<\/strong>\u00a0 I found the reason for the below exception:\u00a0 I was using too much time in processing the software interrupt (ESP8266Interrupt library) in loop().\u00a0 I was doing some A-D conversion to get the LiPo battery voltage status and evidently used too much time.\u00a0 So, THAT&#8217;S fixed.<\/p><p>Now, I&#8217;m getting very weird stuff happening when I&#8217;m testing for long periods of time:\u00a0 the temperature probe occasionally reads WAY high (300 degrees?), the time acquired from the DS3231 loses the Time Zone I&#8217;m in, and the OLED display gets scrambled a display and I have to re-initialize it from time to time (still in progress, that fix is).\u00a0 Nice, huh?\u00a0 Oh, and I got an Exception 0 panic &#8211; Illegal Instruction.\u00a0 Maybe I wrote so many times to the D1 Mini that I corrupted the memory?\u00a0 Jeez.\u00a0 \u00a0I&#8217;m starting to get a little discouraged with this project and I still have more to do.\u00a0 \u00a0I just want to make sure the hardware is sound so I can work on a PCB and send it off to JLCPCB.\u00a0\u00a0<\/p><p>(The below is OLD PANIC INFO)<\/p><p>I&#8217;m using Khoi Hoang&#8217;s ESP8266Interrupt library as the main &#8220;driver&#8221; in the code; all the data gathering is interrupt driven.\u00a0 Another chance to learn more about PlatformIO and debugging code, I guess.\u00a0 I found there&#8217;s an option in the platformio.ini file to filter and decode any exception that is thrown by the program.\u00a0 Below in bold is the output from the program (I hate calling it a &#8220;sketch&#8221;. )\u00a0 \ud83d\ude42\u00a0 \u00a0It gets the reading in degrees from the MLX90316 angle sensor, that works great (albeit a bit power hungry).\u00a0 Then I enable interrupts to get a count of reed switch closings from the anemometer, get the count, and turn off interrupts.\u00a0 Hmm, maybe that&#8217;s the issue?<\/p><p><strong>Heading: 109 Compass: E<\/strong><\/p><p><strong>getWindData(): WindSensorPin interrupt enabled. sTimer ID is 0 at 21:15:44<\/strong><br \/><strong>getWindSpeedMPH(): WindSensorPin interrupt disabled at 21:15:49<\/strong><br \/><strong>pulseCount: 0 revCount: 0 rps: 0 rpm: 0 MPH: 0<\/strong><br \/><strong>WiFi Radio is ON. Connecting to AMADEUS as MetOneWX&#8230;<\/strong><br \/><strong>&#8230;Connected to WiFi. My IP is 10.0.0.240 Channel 1<\/strong><br \/><strong>MAC address: 3C:71:BF:28:DB:31<\/strong><br \/><strong>3.00 secs<\/strong><br \/><strong>Connected to broker<\/strong><br \/><strong>MQTT_CONNECTED<\/strong><br \/><strong>Message sent<\/strong><br \/><strong>MQTT_CONNECTED<\/strong><br \/><strong>Message sent<\/strong><br \/><strong>set_wifi(): WiFi radio OFF<\/strong><br \/><strong>034B:LOAD Disabled<\/strong><br \/><strong>Lithium Ion AIN2: 432<\/strong><br \/><strong>LiPo Voltage: 3.9076 V<\/strong><br \/><strong>Solar cell Voltage: -0.0041 V<\/strong><\/p><p><strong>User exception (panic\/abort\/assert)<\/strong><br \/><strong>&#8212;&#8212;&#8212;&#8212;&#8212; CUT HERE FOR EXCEPTION DECODER &#8212;&#8212;&#8212;&#8212;&#8212;<\/strong><\/p><p><strong>Panic core_esp8266_main.cpp:191 __yield<\/strong><\/p><p><strong>&gt;&gt;&gt;stack&gt;&gt;&gt;<\/strong><\/p><p><strong>ctx: cont<\/strong><br \/><strong>sp: 3ffffd10 end: 3fffffc0 offset: 0010<\/strong><br \/><strong>3ffffd20: 00000038 0000002f 3fff156c 4020edc5 <\/strong><br \/><strong>3ffffd30: 00000038 00000038 3ffefc60 4020a56c<\/strong><br \/><strong>3ffffd40: 3fff14fc 00000000 00000017 4020dd02 <\/strong><br \/><strong>3ffffd50: 00000000 0015001f 00000000 00000030 <\/strong><br \/><strong>3ffffd60: 00000038 00000038 3ffefc60 40203670 <\/strong><br \/><strong>3ffffd70: 3ffffda0 00000002 3ffffda0 4020e929 <\/strong><br \/><strong>3ffffd80: 3ffefa54 3ffefa54 3ffffda0 3ffefac2\u00a0<\/strong><\/p><p>(Cut short because this is fixed.)<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>UPDATE.\u00a0 I found the reason for the below exception:\u00a0 I was using too much time in processing the software interrupt (ESP8266Interrupt library) [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[44,35,38],"tags":[],"class_list":["post-1999","post","type-post","status-publish","format-standard","hentry","category-platformio","category-programming","category-weather-instruments"],"_links":{"self":[{"href":"https:\/\/unixwizardry.com\/index.php\/wp-json\/wp\/v2\/posts\/1999","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unixwizardry.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unixwizardry.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unixwizardry.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unixwizardry.com\/index.php\/wp-json\/wp\/v2\/comments?post=1999"}],"version-history":[{"count":27,"href":"https:\/\/unixwizardry.com\/index.php\/wp-json\/wp\/v2\/posts\/1999\/revisions"}],"predecessor-version":[{"id":2036,"href":"https:\/\/unixwizardry.com\/index.php\/wp-json\/wp\/v2\/posts\/1999\/revisions\/2036"}],"wp:attachment":[{"href":"https:\/\/unixwizardry.com\/index.php\/wp-json\/wp\/v2\/media?parent=1999"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unixwizardry.com\/index.php\/wp-json\/wp\/v2\/categories?post=1999"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unixwizardry.com\/index.php\/wp-json\/wp\/v2\/tags?post=1999"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}