<?xml version="1.0" encoding="UTF-8"?>        <rss version="2.0"
             xmlns:atom="http://www.w3.org/2005/Atom"
             xmlns:dc="http://purl.org/dc/elements/1.1/"
             xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
             xmlns:admin="http://webns.net/mvcb/"
             xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:content="http://purl.org/rss/1.0/modules/content/">
        <channel>
            <title>
									DIY CNC 3D Printer Robot Forum - Recent Topics				            </title>
            <link>https://diycnc.ca/community/</link>
            <description>DIYCNC Customer Support &amp; Tech Sharing for Canadian DIY Hobbyists and Makers.</description>
            <language>en-US</language>
            <lastBuildDate>Thu, 15 Oct 2026 08:47:43 +0000</lastBuildDate>
            <generator>wpForo</generator>
            <ttl>60</ttl>
							                    <item>
                        <title>Interac e-Transfer is supported for Canadian customers</title>
                        <link>https://diycnc.ca/community/main-forum/interac-e-transfer-is-supported-for-canadian-customers/</link>
                        <pubDate>Sun, 11 Oct 2026 17:00:47 +0000</pubDate>
                        <description><![CDATA[Interac e-Transfer is supported for Canadian customers now. 
Steps:
Step 1. When checking out, select &#039;Direct Bank Transfer Discount&#039; payment option. The discounted amount will be showing ...]]></description>
                        <content:encoded><![CDATA[<p>Interac e-Transfer is supported for Canadian customers now. </p>
<p>Steps:</p>
<p><strong>Step 1. </strong>When checking out, select 'Direct Bank Transfer Discount' payment option. The discounted amount will be showing and Total will be updated. Place Order.</p>
<p><img src="https://diycnc.ca/wp-content/uploads/2026/10/smple-of-bank-transfer.png" /></p>
<p><strong>Step 2. </strong> If you are a registered user, your order will appear under <strong>My Account → Orders.</strong> If you check out as a guest, you will receive an email confirming your order.<br />Your order will be placed <strong>On Hold for 4 hours</strong> while we wait for your bank payment. If we do not receive the payment within this 4-hour window, the order will be automatically cancelled, and the reserved products will be returned to inventory.</p>
<p><strong>Step 3.</strong> Make a payment</p>
<ul>
<li>From your Canadian bank account</li>
<li>Select Interac e-Transer</li>
<li>Recipient Email: <strong>orders@diycnc.ca</strong></li>
<li>Put the order# in the message box. The example below shows the TD Bank e-Transfer page. Other banks and financial institutions may have different interfaces.</li>
</ul>
<p>&nbsp;</p>
<p><img src="https://diycnc.ca/wp-content/uploads/2026/10/smple-of-TD.png" /></p>
<p><strong>Step 4, </strong><span>Once we have received and verified your e-Transfer, your order status will change to </span><strong><span>Processing</span></strong><span>, and you will receive a confirmation email.</span></p>]]></content:encoded>
						                            <category domain="https://diycnc.ca/community/"></category>                        <dc:creator>admin</dc:creator>
                        <guid isPermaLink="true">https://diycnc.ca/community/main-forum/interac-e-transfer-is-supported-for-canadian-customers/</guid>
                    </item>
				                    <item>
                        <title>CAN Bus Communication for Servo**D Series Closed Loop Stepper Driver - STM32 Blue Pill</title>
                        <link>https://diycnc.ca/community/makerbase-products/can-bus-communication-for-servod-series-closed-loop-stepper-driver-stm32-blue-pill/</link>
                        <pubDate>Sat, 12 Sep 2026 04:00:31 +0000</pubDate>
                        <description><![CDATA[Servo42D/57D supports position mode and Speed mode. On Position Mode, the Position Mode includes absolute position and relative position. 
The code below shows the Relative Position motion ...]]></description>
                        <content:encoded><![CDATA[<p><img src="https://diycnc.ca/wp-content/uploads/2026/09/stm32-mks-servo-kit-1.png" /></p>
<p>Servo42D/57D supports position mode and Speed mode. On Position Mode, the Position Mode includes absolute position and relative position. </p>
<p>The code below shows the Relative Position motion baccording to pulse number (page 78 on CAN User Manual)</p>
<pre contenteditable="false">#define SERVO42D_SPEED_MODE 0xF6

void Servo42D_RunPosition(void)
{
  TxHeader.StdId=SERVO42D_ID;
  TxHeader.ExtId=0;
  TxHeader.IDE=CAN_ID_STD;
  TxHeader.RTR=CAN_RTR_DATA;
  TxHeader.DLC=8;
  TxHeader.TransmitGlobalTime=DISABLE;

  TxData=SERVO42D_POSITION_MODE1;
  TxData=0x00;
  TxData=0x3C;
  TxData=0x02;
  TxData=0x00;
  TxData=0x00;
  TxData=0x64;
  TxData=(SERVO42D_ID+TxData+TxData+TxData+TxData+TxData+TxData+TxData)&amp;0xFF;


  if(HAL_CAN_AddTxMessage(&amp;hcan,&amp;TxHeader,TxData,&amp;TxMailbox)!=HAL_OK)
  {
    Error_Handler();
  }
}
</pre>
<p>&nbsp;</p>]]></content:encoded>
						                            <category domain="https://diycnc.ca/community/"></category>                        <dc:creator>T Zhao</dc:creator>
                        <guid isPermaLink="true">https://diycnc.ca/community/makerbase-products/can-bus-communication-for-servod-series-closed-loop-stepper-driver-stm32-blue-pill/</guid>
                    </item>
				                    <item>
                        <title>CAN Bus Communication for Servo 28D/35D/42D/57D Series Closed Loop Stepper Driver - STM32 Blue Pill</title>
                        <link>https://diycnc.ca/community/makerbase-products/can-bus-communication-for-servo-28d-35d-42d-57d-series-closed-loop-stepper-driver-stm32-blue-pill/</link>
                        <pubDate>Wed, 09 Sep 2026 17:57:01 +0000</pubDate>
                        <description><![CDATA[Hardware: MKS Servo42D Closed Loop Driver with CAN communication, MCP2551, STM32F103C8Tx Blue Pill
Referring:
Software enviroment: STM32CubeIDE, STM32CubeMX
STM32F103C8Tx Blue Pill Pins Co...]]></description>
                        <content:encoded><![CDATA[<p>Hardware: MKS Servo42D Closed Loop Driver with CAN communication, MCP2551, STM32F103C8Tx Blue Pill</p>
<p>Referring: https://community.st.com/stm32-mcus-60/using-can-bxcan-in-normal-mode-with-stm32-microcontrollers-part-1-151183</p>
<p>Software enviroment: STM32CubeIDE, STM32CubeMX</p>
<p>STM32F103C8Tx Blue Pill Pins Configuration va STM32CubeMX:</p>
<p>&nbsp;</p>
<div><img style="margin-left: auto;margin-right: auto" src="/wp-content/uploads/wpforo/default_attachments/1788976621-STM32BluePill-MX.png" width="500" /></div>]]></content:encoded>
						                            <category domain="https://diycnc.ca/community/"></category>                        <dc:creator>T Zhao</dc:creator>
                        <guid isPermaLink="true">https://diycnc.ca/community/makerbase-products/can-bus-communication-for-servo-28d-35d-42d-57d-series-closed-loop-stepper-driver-stm32-blue-pill/</guid>
                    </item>
				                    <item>
                        <title>CAN Bus Communication for Servo 28D/35D/42D/57D Series Closed Loop Stepper Driver</title>
                        <link>https://diycnc.ca/community/makerbase-products/can-bus-communication-for-servo-28d-35d-42d-57d-series-closed-loop-stepper-driver/</link>
                        <pubDate>Sun, 06 Sep 2026 15:32:56 +0000</pubDate>
                        <description><![CDATA[Case 1,  Single Drive over CAN Bus
Hardware:  Nema17 with Servo42D, MKS CANable V2.0 USB-CAN, 12V DC Power Power Supply
Wiring: Refer gitbub user manual: Github User Manual, (Note: MKS_Ser...]]></description>
                        <content:encoded><![CDATA[<p><strong>Case 1,  Single Drive over CAN Bus</strong></p>
<p>Hardware:  <a href="https://diycnc.ca/product/makerbase-mks-servo42d-nema17-closed-loop-stepper-motor-driver/" target="_blank" rel="noopener">Nema17 with Servo42D</a>, <a href="https://diycnc.ca/product/usb-rs485-can-driver/" target="_blank" rel="noopener">MKS CANable V2.0 USB-CAN</a>, 12V DC Power Power Supply</p>
<p>Wiring: Refer gitbub user manual: <a href="https://github.com/makerbase-motor/MKS-SERVO42D-57D/blob/master/User%20Manual/V1.0.9/MKS%20SERVO42%2657D_CAN%20User%20Manual%20V1.0.9.pdf" target="_blank" rel="noopener">Github User Manual</a>, (Note: MKS_ServoD_Control software is not suitable for testing the CAN bus, use CNGaroo or Python)</p>
<p><strong>Step one: </strong> Test the communication, Here, I am using Python to do the test, without using software tool such as CANgaroo.</p>
<ul>
<li>Use USB cable connect the CANable adaper to PC</li>
<li>Use three dopont wires to connect CANable adaper and MKS Servo42D Motor Driver(CAN-H, CAN-L and GRD)</li>
<li>12V DC Power to Servo42D Motor Driver</li>
<li>The following code to test the communication, only CAN ID received is successful. </li>
</ul>
<pre contenteditable="false">import can
import time

bus = can.Bus(
    interface="slcan",
    channel="COM5",       # change to your COM port
    bitrate=500000
)

print("CAN bus opened")

# Send Servo42D encoder request
msg = can.Message(
    arbitration_id=0x01,
    data=,
    is_extended_id=False
)

print("Sending:", msg)
bus.send(msg)

print("Waiting for response...")

# Listen for up to 3 seconds
start = time.time()

while time.time() - start &lt; 3:
    response = bus.recv(timeout=0.5)

    if response is not None:
        print("RECEIVED:", response)
        print("ID:", hex(response.arbitration_id))
        print("DATA:", response.data.hex(" ").upper())
        print("DLC:", response.dlc)

print("Done")

bus.shutdown()</pre>
<p><strong>Step two, </strong> Run the motor.  </p>
<p>The following code will control the stepper motor by selecting its direction and speed:</p>
<pre contenteditable="false"># MKS Servo42D/57D CAN Bus Testing

import can
import time

# =========================
# CAN configuration
# =========================
COM_PORT = "COM5"       # &lt;-- change this based on your USB Port
CAN_BITRATE = 500000
CAN_ID = 0x01

# =========================
# Open CAN bus
# =========================
bus = can.Bus(
    interface="slcan",
    channel=COM_PORT,
    bitrate=CAN_BITRATE
)

print("CAN bus opened")
print(f"Port: {COM_PORT}")
print(f"CAN ID: 0x{CAN_ID:X}")
print(f"Bitrate: {CAN_BITRATE}")
print()


# =========================
# Send CAN frame
# =========================
def send(data):
    msg = can.Message(
        arbitration_id=CAN_ID,
        data=data,
        is_extended_id=False
    )

    print("TX:", " ".join(f"{x:02X}" for x in data))

    try:
        bus.send(msg)
    except can.CanError as e:
        print("CAN ERROR:", e)


# =========================
# Read CAN response
# =========================
def receive(timeout=1.0):
    msg = bus.recv(timeout=timeout)

    if msg is None:
        print("RX: no response")
        return None

    print(
        f"RX ID: 0x{msg.arbitration_id:X}  "
        f"DATA: {msg.data.hex(' ').upper()}  "
        f"DLC: {msg.dlc}"
    )

    return msg

# =========================
# Enable motor
# =========================
def enable():
    # F3 01 + checksum F5
    send()
    receive()


# =========================
# Disable motor
# =========================
def disable():
    # F3 00 + checksum F4
    send()
    receive()


# =========================
# Read encoder
# =========================
def read_encoder():
    # 30 31
    send()
    receive()


# =========================
# Speed command
# =========================
def speed_command(rpm, direction=0, acceleration=2):

    if rpm &lt; 0:
        rpm = -rpm
        direction = 1

    if rpm &gt; 2047:
        print("RPM too high")
        return

    # 12-bit speed value
    speed = int(rpm)

    high = (speed &gt;&gt; 8) &amp; 0x0F
    low = speed &amp; 0xFF

    # Bit 7 = direction
    if direction:
        high |= 0x80

    # Calculate checksum
    checksum = (
        CAN_ID +
        0xF6 +
        high +
        low +
        acceleration
    ) &amp; 0xFF

    data = 

    send(data)


# =========================
# Stop motor
# =========================
def stop():
    # F6 00 00 00 + checksum
    checksum = (
        CAN_ID +
        0xF6
    ) &amp; 0xFF

    send()

    receive()


# =========================
# Main menu
# =========================
try:

    while True:

        print()
        print("============================")
        print(" MKS SERVO42D CAN TEST")
        print("============================")
        print("1 - Enable motor")
        print("2 - Disable motor")
        print("3 - Read encoder")
        print("4 - CW 100 RPM")
        print("5 - CCW 100 RPM")
        print("6 - CW 300 RPM")
        print("7 - CCW 300 RPM")
        print("8 - STOP")
        print("9 - Exit")
        print("============================")

        choice = input("Select: ")
        if choice == "1":
            enable()

        elif choice == "2":
            disable()

        elif choice == "3":
            read_encoder()

        elif choice == "4":
            speed_command(100, direction=0)

        elif choice == "5":
            speed_command(100, direction=1)

        elif choice == "6":
            speed_command(300, direction=0)

        elif choice == "7":
            speed_command(300, direction=1)

        elif choice == "8":
            stop()

        elif choice == "9":
            stop()
            break

        else:
            print("Invalid selection")

finally:
    bus.shutdown()
    print("CAN bus closed")</pre>
<p>&nbsp;</p>
<p><strong>Notes: If the communication cannot be created between CANable Adapter and Servo42D, check the resister (120 Ω) either in adapter or Servo42D board, at leaset one resistor should be connected for the single master motor. </strong></p>]]></content:encoded>
						                            <category domain="https://diycnc.ca/community/"></category>                        <dc:creator>T Zhao</dc:creator>
                        <guid isPermaLink="true">https://diycnc.ca/community/makerbase-products/can-bus-communication-for-servo-28d-35d-42d-57d-series-closed-loop-stepper-driver/</guid>
                    </item>
				                    <item>
                        <title>MKS Servo42D Servo57D Stepper Motor Technical Support</title>
                        <link>https://diycnc.ca/community/makerbase-products/mks-servo42d-servo57d-stepper-motor-technical-support/</link>
                        <pubDate>Sat, 05 Sep 2026 01:11:42 +0000</pubDate>
                        <description><![CDATA[One of the popular products, I want to use this topic to answer any questions.]]></description>
                        <content:encoded><![CDATA[<p>One of the popular products, I want to use this topic to answer any questions. </p>]]></content:encoded>
						                            <category domain="https://diycnc.ca/community/"></category>                        <dc:creator>T Zhao</dc:creator>
                        <guid isPermaLink="true">https://diycnc.ca/community/makerbase-products/mks-servo42d-servo57d-stepper-motor-technical-support/</guid>
                    </item>
				                    <item>
                        <title>LinuxCNC Projects</title>
                        <link>https://diycnc.ca/community/cnc-build-logs/linuxcnc-projects/</link>
                        <pubDate>Mon, 31 Aug 2026 05:12:49 +0000</pubDate>
                        <description><![CDATA[Creating two LinuxCNC project:  1) EtherCAT Drive Servo Motors, 2) CANOpen Closed Loop. Putting the list below:



 
EtherCAT Pro Kit
CANOpen Learning Kit
Notes


1
Raspberry Pi 4...]]></description>
                        <content:encoded><![CDATA[<p>Creating two LinuxCNC project:  1) EtherCAT Drive Servo Motors, 2) CANOpen Closed Loop. Putting the list below:</p>
<table class="bridata-table" width="682">
<tbody>
<tr>
<td width="64"> </td>
<td width="106">EtherCAT Pro Kit</td>
<td width="141">CANOpen Learning Kit</td>
<td width="371">Notes</td>
</tr>
<tr>
<td>1</td>
<td>Raspberry Pi 4B</td>
<td>Raspberry Pi 4B</td>
<td>4G, Case, 32G MicoSD, Preinstalled and configure LinuxCNC</td>
</tr>
<tr>
<td>2</td>
<td>7" Touch Screen</td>
<td>7" Touch Screen</td>
<td>Capacitive IPS</td>
</tr>
<tr>
<td>3</td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>4</td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>5</td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>6</td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>7</td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>8</td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>9</td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>10</td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>11</td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>12</td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>13</td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>14</td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>15</td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>16</td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>17</td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>18</td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>19</td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>20</td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>21</td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>22</td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>23</td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>24</td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>25</td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</tbody>
</table>]]></content:encoded>
						                            <category domain="https://diycnc.ca/community/"></category>                        <dc:creator>Ray</dc:creator>
                        <guid isPermaLink="true">https://diycnc.ca/community/cnc-build-logs/linuxcnc-projects/</guid>
                    </item>
				                    <item>
                        <title>VFD Spindle Technical Support</title>
                        <link>https://diycnc.ca/community/technical-questions/vfd-spindle-technical-support/</link>
                        <pubDate>Sun, 30 Aug 2026 13:27:00 +0000</pubDate>
                        <description><![CDATA[VFD Spindle Technical Support]]></description>
                        <content:encoded><![CDATA[<p>VFD Spindle Technical Support</p>]]></content:encoded>
						                            <category domain="https://diycnc.ca/community/"></category>                        <dc:creator>Ray</dc:creator>
                        <guid isPermaLink="true">https://diycnc.ca/community/technical-questions/vfd-spindle-technical-support/</guid>
                    </item>
				                    <item>
                        <title>Interface and Communication Tech Discussion</title>
                        <link>https://diycnc.ca/community/product-questions-and-technical-exchange/interface-and-communication-tech-discussion/</link>
                        <pubDate>Sat, 29 Aug 2026 15:17:39 +0000</pubDate>
                        <description><![CDATA[Interface and Communication Tech Discussion. Catagory Link:]]></description>
                        <content:encoded><![CDATA[<p>Interface and Communication Tech Discussion. Catagory Link: https://diycnc.ca/product-category/electronic/interface-communication/</p>]]></content:encoded>
						                            <category domain="https://diycnc.ca/community/"></category>                        <dc:creator>Ray</dc:creator>
                        <guid isPermaLink="true">https://diycnc.ca/community/product-questions-and-technical-exchange/interface-and-communication-tech-discussion/</guid>
                    </item>
				                    <item>
                        <title>Raspberry Pi</title>
                        <link>https://diycnc.ca/community/product-questions-and-technical-exchange/raspberry-pi/</link>
                        <pubDate>Thu, 27 Aug 2026 17:20:18 +0000</pubDate>
                        <description><![CDATA[Raspberry Pi Discussion]]></description>
                        <content:encoded><![CDATA[<p>Raspberry Pi Discussion</p>]]></content:encoded>
						                            <category domain="https://diycnc.ca/community/"></category>                        <dc:creator>Frank</dc:creator>
                        <guid isPermaLink="true">https://diycnc.ca/community/product-questions-and-technical-exchange/raspberry-pi/</guid>
                    </item>
				                    <item>
                        <title>ESP32-S3 CAM</title>
                        <link>https://diycnc.ca/community/product-questions-and-technical-exchange/esp32-s3-cam-ov5640/</link>
                        <pubDate>Sat, 22 Aug 2026 15:02:49 +0000</pubDate>
                        <description><![CDATA[Product Link:
CAM: OV5640
Test environment:  Arduino IDE

Select &#039;ESP32S3 Dev Module&#039;
Enable PSRAM (ODI PSRAM)

Sample code: (Refer: Exsamples -&gt; ESP32 -&gt; Camera -&gt; CameraWebS...]]></description>
                        <content:encoded><![CDATA[<p>Product Link: <a href="https://diycnc.ca/product/esp32-s3-cam-dev-board-with-ov5640/" target="_blank" rel="noopener">https://diycnc.ca/product/esp32-s3-cam-dev-board-with-ov5640/</a></p>
<p>CAM: OV5640</p>
<p>Test environment:  Arduino IDE</p>
<ul>
<li>Select 'ESP32S3 Dev Module'</li>
<li>Enable PSRAM (ODI PSRAM)</li>
</ul>
<p>Sample code: (Refer: Exsamples -&gt; ESP32 -&gt; Camera -&gt; CameraWebServer</p>
<pre contenteditable="false">#include &lt;Arduino.h&gt;
#include "esp_camera.h"
#include &lt;WiFi.h&gt;

const char *ssid = "wifi name";
const char *password = "wifi password";

#define PWDN_GPIO_NUM    -1
#define RESET_GPIO_NUM   -1
#define XCLK_GPIO_NUM    15
#define SIOD_GPIO_NUM    4
#define SIOC_GPIO_NUM    5
#define Y9_GPIO_NUM      16
#define Y8_GPIO_NUM      17
#define Y7_GPIO_NUM      18
#define Y6_GPIO_NUM      12
#define Y5_GPIO_NUM      10
#define Y4_GPIO_NUM       8
#define Y3_GPIO_NUM       9
#define Y2_GPIO_NUM      11
#define VSYNC_GPIO_NUM    6
#define HREF_GPIO_NUM     7
#define PCLK_GPIO_NUM    13

void startCameraServer();

void setup() {
  Serial.begin(115200);
  Serial.setDebugOutput(true);
  Serial.println();

  Serial.println("=== ESP32-S3 Camera ===");
  if (psramFound()) {
    Serial.println("PSRAM: YES");
    Serial.printf("PSRAM size: %u bytes\n", ESP.getPsramSize());
    Serial.printf("Free PSRAM: %u bytes\n", ESP.getFreePsram());
  } else {
    Serial.println("PSRAM: NO");
  }

  camera_config_t config;
  config.ledc_channel = LEDC_CHANNEL_0;
  config.ledc_timer = LEDC_TIMER_0;
  config.pin_d0 = Y2_GPIO_NUM;
  config.pin_d1 = Y3_GPIO_NUM;
  config.pin_d2 = Y4_GPIO_NUM;
  config.pin_d3 = Y5_GPIO_NUM;
  config.pin_d4 = Y6_GPIO_NUM;
  config.pin_d5 = Y7_GPIO_NUM;
  config.pin_d6 = Y8_GPIO_NUM;
  config.pin_d7 = Y9_GPIO_NUM;
  config.pin_xclk = XCLK_GPIO_NUM;
  config.pin_pclk = PCLK_GPIO_NUM;
  config.pin_vsync = VSYNC_GPIO_NUM;
  config.pin_href = HREF_GPIO_NUM;
  config.pin_sccb_sda = SIOD_GPIO_NUM;
  config.pin_sccb_scl = SIOC_GPIO_NUM;
  config.pin_pwdn = PWDN_GPIO_NUM;
  config.pin_reset = RESET_GPIO_NUM;
  config.xclk_freq_hz = 20000000;
  config.frame_size = FRAMESIZE_XGA;
  config.pixel_format = PIXFORMAT_JPEG;
  config.jpeg_quality = 8;
  config.fb_location = CAMERA_FB_IN_PSRAM;
  config.fb_count = 2;
  config.grab_mode = CAMERA_GRAB_LATEST;

  Serial.println("Initializing camera...");
  esp_err_t err = esp_camera_init(&amp;config);
  if (err != ESP_OK) {
    Serial.printf("Camera init failed with error 0x%x\n", err);
    return;
  }

  sensor_t *s = esp_camera_sensor_get();
  if (s == NULL) {
    Serial.println("ERROR: Camera sensor not found");
    return;
  }

  Serial.printf("Camera PID: %u (0x%04X)\n", s-&gt;id.PID, s-&gt;id.PID);

  if (s-&gt;id.PID == OV5640_PID) {
    Serial.println("Camera: OV5640");
    s-&gt;set_hmirror(s, 1);
    s-&gt;set_brightness(s, 1);
    s-&gt;set_saturation(s, -2);
  }

  Serial.printf("Frame size: %d\n", s-&gt;status.framesize);
  Serial.printf("JPEG quality: %d\n", s-&gt;status.quality);
  Serial.printf("Free PSRAM after camera init: %u bytes\n", ESP.getFreePsram());

  WiFi.begin(ssid, password);
  WiFi.setSleep(false);
  Serial.print("WiFi connecting");

  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }

  Serial.println();
  Serial.println("WiFi connected");

  startCameraServer();

  Serial.print("Camera Ready! Use 'http://");
  Serial.print(WiFi.localIP());
  Serial.println("' to connect");
}

void loop() {
  delay(10000);
}</pre>
<p>&nbsp;</p>]]></content:encoded>
						                            <category domain="https://diycnc.ca/community/"></category>                        <dc:creator>Ray</dc:creator>
                        <guid isPermaLink="true">https://diycnc.ca/community/product-questions-and-technical-exchange/esp32-s3-cam-ov5640/</guid>
                    </item>
							        </channel>
        </rss>
		