mirror of
https://github.com/alexandrebobkov/ESP-Nodes.git
synced 2025-08-08 12:30:52 +00:00
RC Robot Tutorial
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -8,9 +8,30 @@ The bitByteRider RC car operates using two main units: the *transmitter*, which
|
||||
the *receiver*, which interprets these values and converts them into PWM signals to control the DC motors. Both units communicate
|
||||
via **ESP-NOW**, a low-latency, connectionless wireless protocol that requires no Wi-Fi network or pairing.
|
||||
|
||||
In addition to enabling real-time control, using ESP-NOW introduces to key networking concepts such as **data encapsulation** and
|
||||
In addition to enabling real-time control, using ESP-NOW introduces key networking concepts such as **data encapsulation** and
|
||||
structured communication. By using data structures to group control variables, you gain hands-on experience with how information
|
||||
is packaged and transmitted — laying the groundwork for understanding the fundamentals of network communication in embedded systems.
|
||||
is packaged and transmitted, laying the groundwork for understanding the fundamentals of network communication in embedded systems.
|
||||
|
||||
The joystick used in the bitByteRider RC car remote unit outputs analog voltages ranging from 0V to 3.3V on both the x- and y- axes,
|
||||
depending on the position of the joystick. These voltage levels are read by the ESP32-C3's ADC (Analog-to-Digital Converter) inputs.
|
||||
|
||||
When the joystick is in its neutral (centered) position, the ADC inputs on the ESP32-C3 receive approximately 1.65V on both axes.
|
||||
This midpoint voltage is interpreted and interpolated into a PWM (Pulse Width Modulation) value of 0, indicating no movement or
|
||||
motor activity.
|
||||
|
||||
As the joystick is pushed to its maximum positions along the x- and y- axis, the voltage increases up to 3.3V. This maximum voltage
|
||||
is interpolated to a PWM value of 1024, which corresponds to a 100% duty cycle on the receiver side—resulting in full-speed
|
||||
operation of the DC motors.
|
||||
|
||||
To transmit control data, the X and Y axis values are encapsulated in a C struct, along with the receiver's **MAC** address, and sent
|
||||
wirelessly using ESP-NOW. This protocol enables low-latency, connectionless communication between the transmitter and receiver
|
||||
without requiring a Wi-Fi network or pairing.
|
||||
|
||||
Upon reception, the RC car's receiver decapsulates the data, extracts the joystick values, and interpolates them into PWM
|
||||
signals. These signals are then used to control the rotation speeds of the DC motors, enabling smooth and responsive remote control.
|
||||
|
||||
This process not only facilitates real-time control but also introduces you to key networking concepts such as data
|
||||
encapsulation, data structs, and the fundamentals of wireless data transmission in embedded systems.
|
||||
|
||||
.. _GitHub: https://github.com/alexandrebobkov/ESP32-C3_Breadboard-Adapter
|
||||
|
||||
|
@@ -40,9 +40,24 @@ on <a class="reference external" href="https://github.com/alexandrebobkov/ESP32-
|
||||
<p>The bitByteRider RC car operates using two main units: the <em>transmitter</em>, which reads and sends the joystick’s X and Y values, and
|
||||
the <em>receiver</em>, which interprets these values and converts them into PWM signals to control the DC motors. Both units communicate
|
||||
via <strong>ESP-NOW</strong>, a low-latency, connectionless wireless protocol that requires no Wi-Fi network or pairing.</p>
|
||||
<p>In addition to enabling real-time control, using ESP-NOW introduces to key networking concepts such as <strong>data encapsulation</strong> and
|
||||
<p>In addition to enabling real-time control, using ESP-NOW introduces key networking concepts such as <strong>data encapsulation</strong> and
|
||||
structured communication. By using data structures to group control variables, you gain hands-on experience with how information
|
||||
is packaged and transmitted — laying the groundwork for understanding the fundamentals of network communication in embedded systems.</p>
|
||||
is packaged and transmitted, laying the groundwork for understanding the fundamentals of network communication in embedded systems.</p>
|
||||
<p>The joystick used in the bitByteRider RC car remote unit outputs analog voltages ranging from 0V to 3.3V on both the x- and y- axes,
|
||||
depending on the position of the joystick. These voltage levels are read by the ESP32-C3’s ADC (Analog-to-Digital Converter) inputs.</p>
|
||||
<p>When the joystick is in its neutral (centered) position, the ADC inputs on the ESP32-C3 receive approximately 1.65V on both axes.
|
||||
This midpoint voltage is interpreted and interpolated into a PWM (Pulse Width Modulation) value of 0, indicating no movement or
|
||||
motor activity.</p>
|
||||
<p>As the joystick is pushed to its maximum positions along the x- and y- axis, the voltage increases up to 3.3V. This maximum voltage
|
||||
is interpolated to a PWM value of 1024, which corresponds to a 100% duty cycle on the receiver side—resulting in full-speed
|
||||
operation of the DC motors.</p>
|
||||
<p>To transmit control data, the X and Y axis values are encapsulated in a C struct, along with the receiver’s <strong>MAC</strong> address, and sent
|
||||
wirelessly using ESP-NOW. This protocol enables low-latency, connectionless communication between the transmitter and receiver
|
||||
without requiring a Wi-Fi network or pairing.</p>
|
||||
<p>Upon reception, the RC car’s receiver decapsulates the data, extracts the joystick values, and interpolates them into PWM
|
||||
signals. These signals are then used to control the rotation speeds of the DC motors, enabling smooth and responsive remote control.</p>
|
||||
<p>This process not only facilitates real-time control but also introduces you to key networking concepts such as data
|
||||
encapsulation, data structs, and the fundamentals of wireless data transmission in embedded systems.</p>
|
||||
<section id="reserved-pins-gpios">
|
||||
<h2><span class="section-number">2.1. </span>Reserved Pins & GPIOs<a class="headerlink" href="#reserved-pins-gpios" title="Link to this heading">¶</a></h2>
|
||||
<p>The following table summarizes GPIOs and pins reserved for operations purposes.</p>
|
||||
|
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
|
||||
# Sphinx build info version 1
|
||||
# This file records the configuration used when building these files. When it is not found, a full rebuild will be done.
|
||||
config: 0b5a77bec177eb5b905112e37424ee08
|
||||
config: 1b0f247f006ad819fe4712b6cd6c081e
|
||||
tags: 62a1e7829a13fc7881b6498c52484ec0
|
||||
|
@@ -316,13 +316,44 @@ via
|
||||
, a low-latency, connectionless wireless protocol that requires no Wi-Fi network or pairing.
|
||||
</p>
|
||||
<p>
|
||||
In addition to enabling real-time control, using ESP-NOW introduces to key networking concepts such as
|
||||
In addition to enabling real-time control, using ESP-NOW introduces key networking concepts such as
|
||||
<strong>
|
||||
data encapsulation
|
||||
</strong>
|
||||
and
|
||||
structured communication. By using data structures to group control variables, you gain hands-on experience with how information
|
||||
is packaged and transmitted — laying the groundwork for understanding the fundamentals of network communication in embedded systems.
|
||||
is packaged and transmitted, laying the groundwork for understanding the fundamentals of network communication in embedded systems.
|
||||
</p>
|
||||
<p>
|
||||
The joystick used in the bitByteRider RC car remote unit outputs analog voltages ranging from 0V to 3.3V on both the x- and y- axes,
|
||||
depending on the position of the joystick. These voltage levels are read by the ESP32-C3’s ADC (Analog-to-Digital Converter) inputs.
|
||||
</p>
|
||||
<p>
|
||||
When the joystick is in its neutral (centered) position, the ADC inputs on the ESP32-C3 receive approximately 1.65V on both axes.
|
||||
This midpoint voltage is interpreted and interpolated into a PWM (Pulse Width Modulation) value of 0, indicating no movement or
|
||||
motor activity.
|
||||
</p>
|
||||
<p>
|
||||
As the joystick is pushed to its maximum positions along the x- and y- axis, the voltage increases up to 3.3V. This maximum voltage
|
||||
is interpolated to a PWM value of 1024, which corresponds to a 100% duty cycle on the receiver side—resulting in full-speed
|
||||
operation of the DC motors.
|
||||
</p>
|
||||
<p>
|
||||
To transmit control data, the X and Y axis values are encapsulated in a C struct, along with the receiver’s
|
||||
<strong>
|
||||
MAC
|
||||
</strong>
|
||||
address, and sent
|
||||
wirelessly using ESP-NOW. This protocol enables low-latency, connectionless communication between the transmitter and receiver
|
||||
without requiring a Wi-Fi network or pairing.
|
||||
</p>
|
||||
<p>
|
||||
Upon reception, the RC car’s receiver decapsulates the data, extracts the joystick values, and interpolates them into PWM
|
||||
signals. These signals are then used to control the rotation speeds of the DC motors, enabling smooth and responsive remote control.
|
||||
</p>
|
||||
<p>
|
||||
This process not only facilitates real-time control but also introduces you to key networking concepts such as data
|
||||
encapsulation, data structs, and the fundamentals of wireless data transmission in embedded systems.
|
||||
</p>
|
||||
<section id="reserved-pins-gpios">
|
||||
<h3>
|
||||
|
Reference in New Issue
Block a user