{"id":9730,"date":"2022-11-09T19:38:08","date_gmt":"2022-11-09T19:38:08","guid":{"rendered":"http:\/\/putridparrot.com\/blog\/?p=9730"},"modified":"2022-11-09T19:38:08","modified_gmt":"2022-11-09T19:38:08","slug":"installing-nanoframework-on-the-atom-lite-esp32-m5stack","status":"publish","type":"post","link":"https:\/\/putridparrot.com\/blog\/installing-nanoframework-on-the-atom-lite-esp32-m5stack\/","title":{"rendered":"Installing nanoFramework on the ATOM Lite ESP32 (M5Stack)"},"content":{"rendered":"<p>I have a wonderful little M5Stack ATOM Lite, ESP32 based dev kit to play with and as I&#8217;d had such success with the M5Core2 and nanoFramework, I thought I&#8217;d try the framework on the ATOM lite.<\/p>\n<p>You, can check the device and the &#8220;Firmware Target&#8221; for the device from <a href=\"https:\/\/docs.nanoframework.net\/content\/getting-started-guides\/where-to-buy-devices.html\" rel=\"noopener\" target=\"_blank\">Recommended devices to start with .NET nanoFramework<\/a>. So, for this device the target is <em>ESP32_PICO<\/em>. <\/p>\n<p>If we connect your device to your computer&#8217;s USB port (hopefully the device will be recognised, if not see my previous post on setting up the M5Core2) execute the following command from the CLI, we&#8217;ll flash the device with the nanoFramework<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nnanoff --target ESP32_PICO --update --serialport COM10\r\n<\/pre>\n<p><em>Change the COM port to whatever your device is on. Also I&#8217;m again assuming you&#8217;ve installed nanoff, if not try running the following from the CLI &#8220;dotnet tool install -g nanoff&#8221;.<\/em><\/p>\n<p>The ATOM lite comes with WiFi, bluetooth a NeoPixel RGB LED, button and even infrared. <\/p>\n<p>Once you&#8217;ve installed nanoFramework, create a new nanoFramework project in Visual Studio 2022 (seem my previous posts on setting this up if you&#8217;ve not already got everything setup).<\/p>\n<p>Let&#8217;s start with the LED, we&#8217;ll simply change the colour of the LED. First, you&#8217;ll need to add the package <em>nanoFramework.AtomLite<\/em> via NuGet. Next copy and paste this code into the Program.cs<\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\r\nwhile (true)\r\n{\r\n    AtomLite.NeoPixel.Image.SetPixel(0, 0, Color.Gray);\r\n    AtomLite.NeoPixel.Update();\r\n\r\n    Thread.Sleep(5000);\r\n\r\n    AtomLite.NeoPixel.Image.SetPixel(0, 0, Color.Green);\r\n    AtomLite.NeoPixel.Update();\r\n\r\n    Thread.Sleep(5000);\r\n\r\n    AtomLite.NeoPixel.Image.SetPixel(0, 0, Color.Red);\r\n    AtomLite.NeoPixel.Update();\r\n}\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I have a wonderful little M5Stack ATOM Lite, ESP32 based dev kit to play with and as I&#8217;d had such success with the M5Core2 and nanoFramework, I thought I&#8217;d try the framework on the ATOM lite. You, can check the device and the &#8220;Firmware Target&#8221; for the device from Recommended devices to start with .NET [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[346,89,341],"tags":[],"class_list":["post-9730","post","type-post","status-publish","format-standard","hentry","category-atom-lite","category-electronics","category-nanoframework"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts\/9730","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/comments?post=9730"}],"version-history":[{"count":4,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts\/9730\/revisions"}],"predecessor-version":[{"id":9734,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts\/9730\/revisions\/9734"}],"wp:attachment":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/media?parent=9730"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/categories?post=9730"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/tags?post=9730"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}