Board-dat/NWI/NWI1255-dat/2026-06-10-18-18-15.png
... ...
Binary files /dev/null and b/Board-dat/NWI/NWI1255-dat/2026-06-10-18-18-15.png differ
Board-dat/NWI/NWI1255-dat/NWI1255-dat.md
... ...
@@ -0,0 +1,30 @@
1
+
2
+# NWI1255-dat
3
+
4
+## Info
5
+
6
+[product url - ESP2RS ESP32-C3 RS-485 RS-232 Data Logger V1 w/case](https://www.electrodragon.com/product/esp2rs-esp32-c3-rs-485-rs-232-data-logger-v1-w-case/)
7
+
8
+### Board Map, Dimension, Pins, chip info, Use Guide, Setup Jumper, etc.
9
+
10
+![](2026-06-10-18-18-15.png)
11
+
12
+Updates version compare to [[NWI1254-dat]]:
13
+
14
+- [[CONN-USB-Type-C-dat]] instead of micro USB
15
+- DB9 connector pre-added
16
+- [[ESP32-C3-dat]] external antenna version
17
+
18
+
19
+
20
+
21
+
22
+## Applications, category, tags, etc.
23
+
24
+## Demo Code and Video
25
+
26
+## ref
27
+
28
+- [[NWI1255]] - [[NWI1254]]
29
+
30
+- legacy wiki page
SDK-dat/ESP-SDK-dat/ESP32-RC-phone-dat/ESP32-RC-phone-dat.ino
... ...
@@ -1,5 +1,6 @@
1 1
2 2
#include <WiFi.h>
3
+#define CONFIG_ASYNC_TCP_RUNNING_CORE 1
3 4
#include <AsyncTCP.h> // Requires installing the AsyncTCP library
4 5
#include <ESPAsyncWebServer.h> // Requires installing the ESPAsyncWebServer library
5 6
... ...
@@ -8,10 +9,9 @@ const char* ssid = "ESP32_C3_RC_Car";
8 9
const char* password = "123456789"; // Minimum 8 characters
9 10
10 11
// --- Pin Allocations ---
11
-const int M1_PWM = 6;
12
-const int M1_DIR = 7;
13
-const int M2_PWM = 9;
14
-const int M2_DIR = 10;
12
+const int M1_PWM = 2; // Left side
13
+const int M2_PWM = 3; // Right side
14
+const int LED_PIN = 8; // Indicator LED
15 15
16 16
// --- PWM Settings ---
17 17
const int PWM_FREQ = 5000;
... ...
@@ -119,22 +119,17 @@ void driveMotors(int16_t throttle, int16_t steering) {
119 119
leftSpeed = constrain(leftSpeed, -255, 255);
120 120
rightSpeed = constrain(rightSpeed, -255, 255);
121 121
122
- // Motor 1 (Left)
123
- if (leftSpeed >= 0) {
124
- digitalWrite(M1_DIR, LOW);
125
- analogWrite(M1_PWM, leftSpeed);
126
- } else {
127
- digitalWrite(M1_DIR, HIGH);
128
- analogWrite(M1_PWM, 255 + leftSpeed);
129
- }
122
+ // Motor 1 (Left side, unidirectional PWM)
123
+ analogWrite(M1_PWM, abs(leftSpeed));
124
+
125
+ // Motor 2 (Right side, unidirectional PWM)
126
+ analogWrite(M2_PWM, abs(rightSpeed));
130 127
131
- // Motor 2 (Right)
132
- if (rightSpeed >= 0) {
133
- digitalWrite(M2_DIR, LOW);
134
- analogWrite(M2_PWM, rightSpeed);
128
+ // LED indication for activity (lights up when moving)
129
+ if (abs(throttle) > 10 || abs(steering) > 10) {
130
+ digitalWrite(LED_PIN, HIGH);
135 131
} else {
136
- digitalWrite(M2_DIR, HIGH);
137
- analogWrite(M2_PWM, 255 + rightSpeed);
132
+ digitalWrite(LED_PIN, LOW);
138 133
}
139 134
}
140 135
... ...
@@ -163,16 +158,15 @@ void onEvent(AsyncWebSocket *server, AsyncWebSocketClient *client, AwsEventType
163 158
void setup() {
164 159
Serial.begin(115200);
165 160
166
- // Initialize Motor Control Hardware
161
+ // Initialize Motor Control and LED Hardware
167 162
pinMode(M1_PWM, OUTPUT);
168
- pinMode(M1_DIR, OUTPUT);
169 163
pinMode(M2_PWM, OUTPUT);
170
- pinMode(M2_DIR, OUTPUT);
164
+ pinMode(LED_PIN, OUTPUT);
171 165
172 166
analogWriteFrequency(M1_PWM, PWM_FREQ);
173
- analogWriteResolution(M1_RES);
167
+ analogWriteResolution(M1_PWM, PWM_RES);
174 168
analogWriteFrequency(M2_PWM, PWM_FREQ);
175
- analogWriteResolution(PWM_RES);
169
+ analogWriteResolution(M2_PWM, PWM_RES);
176 170
177 171
// Turn off driving pins initially
178 172
driveMotors(0, 0);
... ...
@@ -189,7 +183,7 @@ void setup() {
189 183
190 184
// Serve HTML page when phone connects to base address
191 185
server.on("/", HTTP_GET, [](AsyncWebServerRequest *request){
192
- request->send_P(200, "text/html", index_html);
186
+ request->send(200, "text/html", index_html);
193 187
});
194 188
195 189
server.begin();