Problems to controll M0601/FIT1042
Ulrich.Seidel 2026-05-13 18:32:47 15 Views1 Replies Hello,
I have an Arduino UNO R4 WIFI.
Mounted on it is the RS485 Shield v1.0.
Motor: FIT1042 / M0601
Orange -> B
White -> A
Brown -> Ground
The following code is running on the Arduino.
#include <Arduino.h>
#define RS485_DIR_PIN 2
// --------------------------------------------------
// SEND FRAME
// --------------------------------------------------
void sendFrame(uint8_t *data, int len)
{
digitalWrite(RS485_DIR_PIN, HIGH);
delay(5);
Serial1.write(data, len);
Serial1.flush();
delay(5);
digitalWrite(RS485_DIR_PIN, LOW);
}
// --------------------------------------------------
// PRINT HEX BYTE
// --------------------------------------------------
void printHex(uint8_t b)
{
Serial.print("0x");
if (b < 16)
Serial.print("0");
Serial.print(b, HEX);
Serial.print(" ");
}
// --------------------------------------------------
// READ RESPONSE
// --------------------------------------------------
void readResponse()
{
unsigned long start = millis();
while (millis() - start < 300)
{
while (Serial1.available())
{
uint8_t b = Serial1.read();
printHex(b);
}
}
Serial.println();
}
// --------------------------------------------------
// SETUP
// --------------------------------------------------
void setup()
{
pinMode(RS485_DIR_PIN, OUTPUT);
// Empfangsmodus
digitalWrite(RS485_DIR_PIN, LOW);
Serial.begin(115200);
Serial1.begin(115200);
delay(3000);
Serial.println();
Serial.println("=== M0601 SIMPLE SPEED TEST ===");
}
// --------------------------------------------------
// LOOP
// --------------------------------------------------
void loop()
{
// -------------------------------------------------
// Speed Command
// -------------------------------------------------
uint8_t frame[10] =
{
0x01, // ID
0x64, // CMD Speed
0x00,
0x64, // Speed = 100
0x00,
0x00,
0x00,
0x00,
0x00,
0xC9 // Beispiel Checksum
};
// -----------------------------
// PRINT TX
// -----------------------------
Serial.print("TX: ");
for (int i = 0; i < 10; i++)
{
printHex(frame[i]);
}
Serial.println();
// -----------------------------
// SEND
// -----------------------------
sendFrame(frame, 10);
// -----------------------------
// PRINT RX
// -----------------------------
Serial.print("RX: ");
readResponse();
delay(2000);
}
i tried:
- Swapped A and B
- Swapped IO pins 1 and 2
- Swapped the black and brown wires
- Ensured the motor and Arduino share a common ground
- Applied a steady 18-volt supply to the motor
- Verified that the motor exhibits resistance once power is applied
- Tested both a different motor and a different Shield
Can somebody help me plz ?
Is there a libary.h for the motor?
thx
The TXD LED also flashes every 2 seconds.
The RXD LED flashes only once—when I power up the motor.
In the Serial Monitor, I see "0xAA 0x55 0xFF" being returned by the motor upon power-up.
Ulrich.Seidel 
