{"id":2321,"date":"2019-08-13T02:14:53","date_gmt":"2019-08-13T02:14:53","guid":{"rendered":"http:\/\/funkboxing.com\/wordpress\/?p=2321"},"modified":"2021-01-03T17:59:42","modified_gmt":"2021-01-03T17:59:42","slug":"esp32-cam-a-new-hope","status":"publish","type":"post","link":"http:\/\/funkboxing.com\/wordpress\/?p=2321","title":{"rendered":"ESP32-CAM &#8211; A New Hope"},"content":{"rendered":"\n<p>I&#8217;m getting back around to some of my electronics stuff and I was discouraged that the Lolin32 I was using had been discontinued. In retrospect I probably should have used ESP8266 as the basis for WiFi LED control, but meh.<\/p>\n\n\n\n<p>So anyway, I recently found a new board to get excited about, plus a few battery modules that haven&#8217;t actually come in yet. The ESP32-CAM has most of what I&#8217;d want in a board for simple bots; camera, wifi, and enough GPIO to control a few servos and an onboard flash LEDs. I got my first one in last weekend and spent it trying to get the basic functions for a FPV bot down.<\/p>\n\n\n\n<p>Took me a while to cobble together the functions I needed from available docs and example code, but I&#8217;ve got a sketch that does the following:<br>     ~Connect to WiFi (SSID\\PW hardcoded for now)<br>     ~Start camera stream<br>     ~Start UDP listener, parse and process incomming packets<br>     ~Servo motor control (2) currently<br>     ~LED control, onboard RED (ON\\OFF) and WHITE (PWM)<\/p>\n\n\n\n<p>Here&#8217;s the code I&#8217;ve got so far- be warned; like all my code- it&#8217;s a nightmare, but it works for me. I left some notes and links to other code I scavenged, but there&#8217;s a lot more to do and I honestly don&#8217;t even get how the camera stream is working in this sketch, but it does, so good enough for now.<\/p>\n\n\n\n<div class=\"wp-block-file\"><a href=\"http:\/\/funkboxing.com\/wordpress\/wp-content\/uploads\/2019\/08\/ESP32-CAM-botdemo.zip\">ESP32-CAM-botdemo<\/a><a href=\"http:\/\/funkboxing.com\/wordpress\/wp-content\/uploads\/2019\/08\/ESP32-CAM-botdemo.zip\" class=\"wp-block-file__button\" download>Download<\/a><\/div>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" loading=\"lazy\" width=\"819\" height=\"614\" src=\"http:\/\/funkboxing.com\/wordpress\/wp-content\/uploads\/2019\/08\/IMG_20190812_182338709.jpg\" alt=\"\" class=\"wp-image-2323\" srcset=\"http:\/\/funkboxing.com\/wordpress\/wp-content\/uploads\/2019\/08\/IMG_20190812_182338709.jpg 819w, http:\/\/funkboxing.com\/wordpress\/wp-content\/uploads\/2019\/08\/IMG_20190812_182338709-300x225.jpg 300w, http:\/\/funkboxing.com\/wordpress\/wp-content\/uploads\/2019\/08\/IMG_20190812_182338709-768x576.jpg 768w\" sizes=\"(max-width: 819px) 100vw, 819px\" \/><\/figure>\n\n\n\n<p>The biggest downside of this board for me is it doesn&#8217;t have a built in USB interface so I have to use TX\\RX pins to load code, but that&#8217;s not too big a deal. Though since only have the one ESP32-Cam at the moment and I&#8217;m leaving that one the breadboard for testing. I&#8217;ve ordered a few more since they&#8217;re so cheap- next one I get will go on this little robot platform I found online and printed. I actually found this design online some time ago and saved the files, but now I can&#8217;t figure out where I found it, so if anyone knows this design and has a link to it please let me know.<br><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" loading=\"lazy\" width=\"563\" height=\"406\" src=\"http:\/\/funkboxing.com\/wordpress\/wp-content\/uploads\/2019\/08\/IMG_20190812_182435102.jpg\" alt=\"\" class=\"wp-image-2324\" srcset=\"http:\/\/funkboxing.com\/wordpress\/wp-content\/uploads\/2019\/08\/IMG_20190812_182435102.jpg 563w, http:\/\/funkboxing.com\/wordpress\/wp-content\/uploads\/2019\/08\/IMG_20190812_182435102-300x216.jpg 300w\" sizes=\"(max-width: 563px) 100vw, 563px\" \/><\/figure>\n\n\n\n<p>Hopefully I&#8217;ll post more because hopefully I&#8217;ll do more, but this is something and I figure if anyone else out there is messing with an ESP32-CAM out there they may find this marginally useful. If by some chance you are working with this board feel free to contact me, it&#8217;s got some great potential.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m getting back around to some of my electronics stuff and I was discouraged that the Lolin32 I was using had been discontinued. In retrospect I probably should have used ESP8266 as the basis for WiFi LED control, but meh. So anyway, I recently found a new board to get excited about, plus a few <a href='http:\/\/funkboxing.com\/wordpress\/?p=2321' class='excerpt-more'>[&#8230;]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[5,47],"tags":[],"_links":{"self":[{"href":"http:\/\/funkboxing.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/2321"}],"collection":[{"href":"http:\/\/funkboxing.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/funkboxing.com\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/funkboxing.com\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/funkboxing.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2321"}],"version-history":[{"count":2,"href":"http:\/\/funkboxing.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/2321\/revisions"}],"predecessor-version":[{"id":2327,"href":"http:\/\/funkboxing.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/2321\/revisions\/2327"}],"wp:attachment":[{"href":"http:\/\/funkboxing.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2321"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/funkboxing.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2321"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/funkboxing.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2321"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}