{"id":4706,"date":"2026-02-10T07:31:33","date_gmt":"2026-02-10T15:31:33","guid":{"rendered":"https:\/\/www.donluc.com\/?p=4706"},"modified":"2026-02-10T07:31:33","modified_gmt":"2026-02-10T15:31:33","slug":"project-12-robotics-camera-mk31","status":"publish","type":"post","link":"https:\/\/www.donluc.com\/?p=4706","title":{"rendered":"Project #12: Robotics &#8211; Camera &#8211; Mk31"},"content":{"rendered":"<div style=\"width: 1200px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-4706-1\" width=\"1200\" height=\"675\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/02\/DL2602Mk02W.mp4?_=1\" \/><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/02\/DL2602Mk02W.mp4\">https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/02\/DL2602Mk02W.mp4<\/a><\/video><\/div>\n<p>&#8212;&#8212;<\/p>\n<p>#DonLucElectronics #DonLuc #Camera #ESP32CAM #ESP32 #IoT #Project #Fritzing #Programming #Electronics #Microcontrollers #Consultant<\/p>\n<p>&#8212;&#8212;<\/p>\n<p><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/02\/DL2602Mk02a.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/02\/DL2602Mk02a.jpg\" alt=\"Camera\" width=\"720\" height=\"514\" class=\"alignnone size-full wp-image-4708\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/02\/DL2602Mk02a.jpg 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/02\/DL2602Mk02a-300x214.jpg 300w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><\/a><\/p>\n<p>&#8212;&#8212;<\/p>\n<p><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/02\/DL2602Mk02b.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/02\/DL2602Mk02b.jpg\" alt=\"Camera\" width=\"720\" height=\"480\" class=\"alignnone size-full wp-image-4709\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/02\/DL2602Mk02b.jpg 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/02\/DL2602Mk02b-300x200.jpg 300w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><\/a><\/p>\n<p>&#8212;&#8212;<\/p>\n<p><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/02\/DL2602Mk02c.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/02\/DL2602Mk02c.jpg\" alt=\"Camera\" width=\"720\" height=\"480\" class=\"alignnone size-full wp-image-4710\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/02\/DL2602Mk02c.jpg 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/02\/DL2602Mk02c-300x200.jpg 300w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><\/a><\/p>\n<p>&#8212;&#8212;<\/p>\n<p><strong>ESP32-CAM Camera<\/strong><\/p>\n<p>The ESP32-CAM is a small size, low power consumption camera module based on ESP32. It comes with an OV2640 camera and provides onboard TF card slot. The ESP32-CAM can be widely used in intelligent IoT applications such as wireless video monitoring, WiFi image upload, QR identification, and so on.<\/p>\n<p><strong>DL2602Mk02<\/strong><\/p>\n<p>1 x ESP32-CAM<br \/>\n1 x OV2640 Camera<br \/>\n1 x ESP32-CAM-MB Adapter<br \/>\n1 x MicroSD Card 8 GB<br \/>\n1 x USB Battery Pack<br \/>\n1 x Micro USB Cable<\/p>\n<p><strong>DL2602Mk02p<\/strong><\/p>\n<p><strong>DL2602Mk02p.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"arduino\" data-enlighter-title=\"\">\r\n\/****** Don Luc Electronics \u00a9 ******\r\nSoftware Version Information\r\nProject #12: Robotics - Camera - Mk31\r\n12-31\r\nDL2602Mk02p.ino\r\nDL2602Mk02\r\n1 x ESP32-CAM\r\n1 x OV2640 Camera\r\n1 x ESP32-CAM-MB Adapter\r\n1 x MicroSD Card 2 GB\r\n1 x USB Battery Pack\r\n1 x Micro USB Cable\r\n*\/\r\n\r\n\/\/ Include the Library Code\r\n \/\/ ESP Camera\r\n#include &quot;esp_camera.h&quot;\r\n\/\/ Arduino\r\n#include &quot;Arduino.h&quot;\r\n\/\/ SD Card ESP32\r\n#include &quot;FS.h&quot;\r\n\/\/ SD Card ESP32\r\n#include &quot;SD_MMC.h&quot;\r\n\/\/ Disable brownout problems\r\n#include &quot;soc\/soc.h&quot;\r\n\/\/ Disable brownout problems\r\n#include &quot;soc\/rtc_cntl_reg.h&quot; \r\n\/\/ Driver\r\n#include &quot;driver\/rtc_io.h&quot;\r\n\/\/ Read and write from flash memory\r\n#include &lt;EEPROM.h&gt;\r\n\r\n\/\/ Define the number of bytes you want to access\r\n#define EEPROM_SIZE 1\r\n\r\n\/\/ Pin definition for CAMERA_MODEL_AI_THINKER\r\n#define PWDN_GPIO_NUM     32\r\n#define RESET_GPIO_NUM    -1\r\n#define XCLK_GPIO_NUM      0\r\n#define SIOD_GPIO_NUM     26\r\n#define SIOC_GPIO_NUM     27\r\n#define Y9_GPIO_NUM       35\r\n#define Y8_GPIO_NUM       34\r\n#define Y7_GPIO_NUM       39\r\n#define Y6_GPIO_NUM       36\r\n#define Y5_GPIO_NUM       21\r\n#define Y4_GPIO_NUM       19\r\n#define Y3_GPIO_NUM       18\r\n#define Y2_GPIO_NUM        5\r\n#define VSYNC_GPIO_NUM    25\r\n#define HREF_GPIO_NUM     23\r\n#define PCLK_GPIO_NUM     22\r\n \r\n \/\/ Picture Number\r\nint pictureNumber = 0;\r\n\r\n\/\/ Software Version Information\r\nString sver = &quot;12-31&quot;;\r\n\r\nvoid loop() {\r\n  \r\n}\r\n<\/pre>\n<p><strong>getCamera.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"arduino\" data-enlighter-title=\"\">\r\n\/\/ Camera\r\n\/\/ Camera Setup\r\nvoid isCameraSetup(){\r\n\r\n  \/\/ Disable brownout detector\r\n  WRITE_PERI_REG(RTC_CNTL_BROWN_OUT_REG, 0);\r\n\r\n  \/\/ Camera Config\r\n  camera_config_t config;\r\n  config.ledc_channel = LEDC_CHANNEL_0;\r\n  config.ledc_timer = LEDC_TIMER_0;\r\n  config.pin_d0 = Y2_GPIO_NUM;\r\n  config.pin_d1 = Y3_GPIO_NUM;\r\n  config.pin_d2 = Y4_GPIO_NUM;\r\n  config.pin_d3 = Y5_GPIO_NUM;\r\n  config.pin_d4 = Y6_GPIO_NUM;\r\n  config.pin_d5 = Y7_GPIO_NUM;\r\n  config.pin_d6 = Y8_GPIO_NUM;\r\n  config.pin_d7 = Y9_GPIO_NUM;\r\n  config.pin_xclk = XCLK_GPIO_NUM;\r\n  config.pin_pclk = PCLK_GPIO_NUM;\r\n  config.pin_vsync = VSYNC_GPIO_NUM;\r\n  config.pin_href = HREF_GPIO_NUM;\r\n  config.pin_sccb_sda = SIOD_GPIO_NUM;\r\n  config.pin_sccb_scl = SIOC_GPIO_NUM;\r\n  config.pin_pwdn = PWDN_GPIO_NUM;\r\n  config.pin_reset = RESET_GPIO_NUM;\r\n  config.xclk_freq_hz = 20000000;\r\n  config.pixel_format = PIXFORMAT_JPEG;\r\n  config.grab_mode = CAMERA_GRAB_LATEST;\r\n\r\n  \/\/ Camera Config\r\n  if(psramFound()){\r\n\r\n    \/\/ FRAMESIZE_ + QVGA|CIF|VGA|SVGA|XGA|SXGA|UXGA\r\n    config.frame_size = FRAMESIZE_UXGA; \r\n    config.jpeg_quality = 10;\r\n    config.fb_count = 2;\r\n\r\n  } else {\r\n\r\n    config.frame_size = FRAMESIZE_SVGA;\r\n    config.jpeg_quality = 12;\r\n    config.fb_count = 1;\r\n\r\n  }\r\n\r\n  \/\/ Delay\r\n  delay( 100 );\r\n\r\n  \/\/ Init Camera\r\n  esp_err_t err = esp_camera_init(&amp;config);\r\n  if (err != ESP_OK) {\r\n\r\n    \/\/ Camera init failed;\r\n    return;\r\n\r\n  }\r\n\r\n  \/\/ Delay \r\n  delay(500);\r\n\r\n  if(!SD_MMC.begin()){\r\n\r\n    \/\/ SD Card Mount Failed\r\n    return;\r\n\r\n  }\r\n \r\n  \/\/ Card Type\r\n  uint8_t cardType = SD_MMC.cardType();\r\n  if(cardType == CARD_NONE){\r\n\r\n    \/\/ No SD Card attached\r\n    return;\r\n\r\n  }\r\n   \r\n  \/\/ Camera\r\n  camera_fb_t * fb = NULL;\r\n  \r\n  \/\/ Take Picture with Camera\r\n  fb = esp_camera_fb_get();  \r\n  if(!fb) {\r\n\r\n    \/\/ Camera capture failed\r\n    return;\r\n\r\n  }\r\n\r\n  \/\/ Initialize EEPROM with predefined size\r\n  EEPROM.begin(EEPROM_SIZE);\r\n  pictureNumber = EEPROM.read(0) + 1;\r\n\r\n  \/\/ Path where new picture will be saved in SD Card\r\n  String path = &quot;\/picture&quot; + String(pictureNumber) +&quot;.jpg&quot;;\r\n\r\n  \/\/ Camera\r\n  fs::FS &amp;fs = SD_MMC; \r\n  File file = fs.open(path.c_str(), FILE_WRITE);\r\n  if(!file){\r\n\r\n    \/\/ Failed to open file in writing mode\r\n\r\n  } \r\n  else {\r\n\r\n    \/\/ Payload (image), payload length\r\n    file.write(fb-&gt;buf, fb-&gt;len); \r\n    EEPROM.write(0, pictureNumber);\r\n    EEPROM.commit();\r\n\r\n  }\r\n\r\n  \/\/ Close\r\n  file.close();\r\n  esp_camera_fb_return(fb); \r\n  \r\n  \/\/ Turns off the ESP32-CAM white on-board LED (flash) connected to GPIO 4\r\n  pinMode(4, OUTPUT);\r\n  digitalWrite(4, LOW);\r\n  rtc_gpio_hold_en(GPIO_NUM_4);\r\n  \r\n  delay(2000);\r\n  \/\/ Going to sleep now\r\n  delay(2000);\r\n  esp_deep_sleep_start();\r\n  \/\/ This will never be printed\r\n\r\n}\r\n<\/pre>\n<p><strong>setup.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"arduino\" data-enlighter-title=\"\">\r\n\/\/ Setup\r\nvoid setup()\r\n{\r\n \r\n  \/\/ Delay\r\n  delay( 100 );\r\n\r\n  \/\/ Camera Setup\r\n  isCameraSetup();\r\n\r\n  \/\/ Delay 1 Second\r\n  delay( 1000 );\r\n\r\n}\r\n<\/pre>\n<p>&#8212;&#8212;<\/p>\n<p><strong>People can contact us:<\/strong> https:\/\/www.donluc.com\/?page_id=1927<\/p>\n<p><strong>Consultant, R&#038;D, Electronics, IoT, Teacher and Instructor<\/strong><\/p>\n<ul>\n<li>Programming Language<\/li>\n<li>Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi, Arm, Silicon Labs, Espressif, Etc&#8230;)<\/li>\n<li>IoT<\/li>\n<li>Wireless (Radio Frequency, Bluetooth, WiFi, Etc&#8230;)<\/li>\n<li>Robotics<\/li>\n<li>Automation<\/li>\n<li>Camera and Video Capture Receiver Stationary, Wheel\/Tank , Underwater and UAV Vehicle<\/li>\n<li>Unmanned Vehicles Terrestrial,  Marine and UAV<\/li>\n<li>Machine Learning<\/li>\n<li>Artificial Intelligence (AI)<\/li>\n<li>RTOS<\/li>\n<li>Sensors, eHealth Sensors, Biosensor, and Biometric<\/li>\n<li>Research &#038; Development (R &#038; D)<\/li>\n<li>Consulting<\/li>\n<\/ul>\n<p><strong>Follow Us<\/strong><\/p>\n<p><strong>Luc Paquin \u2013 Curriculum Vitae &#8211; 2026<\/strong><br \/>\nhttps:\/\/www.donluc.com\/luc\/LucPaquinCVEng2026Mk01.pdf<br \/>\nhttps:\/\/www.donluc.com\/luc\/<\/p>\n<p><strong>Web:<\/strong> https:\/\/www.donluc.com\/<br \/>\n<strong>Web:<\/strong> https:\/\/www.jlpconsultants.com\/<br \/>\n<strong>Facebook:<\/strong> https:\/\/www.facebook.com\/neosteam.labs.9\/<br \/>\n<strong>YouTube:<\/strong> https:\/\/www.youtube.com\/@thesass2063<br \/>\n<strong>DFRobot:<\/strong> https:\/\/learn.dfrobot.com\/user-10186.html<br \/>\n<strong>Elecrow:<\/strong> https:\/\/www.elecrow.com\/share\/sharepj\/center\/no\/760816d385ebb1edc0732fd873bfbf13<br \/>\n<strong>TikTok:<\/strong> https:\/\/www.tiktok.com\/@luc.paquin8<br \/>\n<strong>Hackster:<\/strong> https:\/\/www.hackster.io\/luc-paquin<br \/>\n<strong>LinkedIn:<\/strong> https:\/\/www.linkedin.com\/in\/jlucpaquin\/<\/p>\n<p><strong>Don Luc<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8212;&#8212; #DonLucElectronics #DonLuc #Camera #ESP32CAM #ESP32 #IoT #Project #Fritzing #Programming #Electronics #Microcontrollers #Consultant &#8212;&#8212; &#8212;&#8212; &#8212;&#8212; &#8212;&#8212; ESP32-CAM Camera The ESP32-CAM is a small size, low power consumption camera module based on ESP32. It comes with an OV2640 camera and provides onboard TF card slot. The ESP32-CAM can be widely used in intelligent IoT applications &#8230; <a title=\"Project #12: Robotics &#8211; Camera &#8211; Mk31\" class=\"read-more\" href=\"https:\/\/www.donluc.com\/?p=4706\" aria-label=\"Read more about Project #12: Robotics &#8211; Camera &#8211; Mk31\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[94,50,49,38,80,412,59,115,5,287,58,82,10],"tags":[86,6,92,413,102,4,19,83,85,24,9,84,27,95,33,34,108],"class_list":["post-4706","post","type-post","status-publish","format-standard","hentry","category-robotics-projerts","category-arduino","category-consultant","category-digitalelectronics","category-esp32","category-esp32-cam","category-fritzing","category-e-mentor","category-microcontrollers","category-program","category-arduino-programming","category-program-esp32","category-projects","tag-adafruit","tag-arduino","tag-battery","tag-camera","tag-components","tag-consultant","tag-electronics","tag-esp32","tag-fritzing","tag-microcontroller","tag-programming","tag-programming-esp32","tag-projects-2","tag-robotic","tag-technology","tag-video-blog","tag-vlog"],"_links":{"self":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/4706","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4706"}],"version-history":[{"count":1,"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/4706\/revisions"}],"predecessor-version":[{"id":4711,"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/4706\/revisions\/4711"}],"wp:attachment":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4706"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4706"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4706"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}