Ten projekt to zaawansowany sterownik dla bazy robotycznej M5Stack BugC2 współpracującej z modułem M5StickC / Plus / Plus2. Rozwiązuje on powszechne problemy z komunikacją I2C oraz błędną polaryzacją silników, oferując płynne i intuicyjne sterowanie przez przeglądarkę.
- Precyzyjny Mikser Ruchu (Skid-Steer): Płynne przechodzenie między jazdą prosto, łukami a obrotami.
- Poprawna Obsługa I2C: Wykorzystanie typów
signed char(int8_t) zapewnia pełną kontrolę nad jazdą do tyłu (rozwiązanie problemu braku wstecznego). - Horyzontalny Interfejs Web: Responsywny joystick do jazdy oraz dedykowane przyciski o obniżonej mocy do precyzyjnych obrotów w miejscu.
- Telemetria na Ekranie: M5StickC wyświetla dane sieci WiFi (SSID, Hasło) oraz adres IP serwera sterowania zaraz po starcie.
- Tryb Diagnostyczny: Dołączony skrypt do statycznego testowania silników bez użycia sieci.
- Urządzenie: M5StickC / Plus / Plus2
- Baza: BugC2 (Adres I2C:
0x38) - Piny I2C: SDA:
0, SCL:26 - Rejestry Silników: -
0x00: Przedni Lewy0x01: Przedni Prawy0x02: Tylny Lewy0x03: Tylny Prawy
- Sklonuj repozytorium na swój dysk.
- Użyj Thonny IDE lub M5Burner, aby wgrać firmware MicroPython na swoje urządzenie.
- Prześlij pliki
.pyoraz folderstatic(jeśli istnieje) do pamięci M5StickC. - Zresetuj urządzenie – dane do połączenia pojawią się na wyświetlaczu LCD.
Jeśli robot kręci się w kółko przy jeździe do przodu:
- Sprawdź sekcję
configw pliku głównym. Niektóre partie produkcyjne BugC2 mają odwróconą polaryzację silników. Wystarczy zmienić mnożnik kierunku dla konkretnego silnika z1na-1.
MIT License - czuj się swobodnie w modyfikowaniu projektu pod własne potrzeby!
This project is an advanced driver for the M5Stack BugC2 robotic base, designed to work with the M5StickC / Plus / Plus2 modules. It solves common I2C communication issues and motor polarity misalignments, offering smooth and intuitive control via a web browser.
- Precision Motion Mixer (Skid-Steer): Seamless transitions between driving straight, turning in arcs, and spinning in place.
- Correct I2C Handling: Utilizes
signed char(int8_t) types to ensure full control over reverse movement (fixing the "no-reverse" bug). - Horizontal Web Interface: Responsive joystick for driving and dedicated low-power buttons for precise 360° spins.
- On-Screen Telemetry: The M5StickC LCD displays WiFi network data (SSID, Password) and the Web Server IP address immediately upon startup.
- Diagnostic Mode: Includes a standalone script for static motor testing without the need for a network connection.
- Device: M5StickC / Plus / Plus2
- Base: BugC2 (I2C Address:
0x38) - I2C Pins: SDA:
0, SCL:26 - Motor Registers: -
0x00: Front Left0x01: Front Right0x02: Rear Left0x03: Rear Right
- Clone the repository to your local machine.
- Use Thonny IDE or M5Burner to flash the MicroPython firmware onto your device.
- Upload the
.pyfiles and thestaticfolder (if applicable) to the M5StickC memory. - Restart the device – the connection details will appear on the LCD screen.
If the robot spins in circles while driving forward:
- Check the
configsection in the main file. Some BugC2 production batches have inverted motor polarity. Simply change the direction multiplier for the specific motor from1to-1.
MIT License - feel free to modify this project for your own needs!