Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

LCS25 firmware is v1.1 for microcontroller part of Object LCS25 - algorithm testing robot. The main purpose of this project is to develop a bridging program receiving control from high level commands from ROS/ROS2 and control robot's kinematics. PS: This repo is the next version from 2nd prize robot that competed in MERC 2025 (Mechanical Engineering Robot Contest 2025) - "QUỐC SỬ DÙNG CA" by team LC Sign. Object LCS25 LC Sign

LCS25 Firmware - Project Structure

This is a PlatformIO project for an algorithm testing robot that bridges high-level ROS/ROS2 commands to robot kinematics control. The project targets multiple microcontrollers (Raspberry Pi Pico and Arduino Mega).


Root Configuration

File Purpose
platformio.ini PlatformIO build configuration with 3 environments: pico_base, pico_arm, mega
README.md Project documentation
LICENSE License file
.gitignore Git ignore rules
.vscode/extensions.json VS Code extensions config

Source Code (src/)

Path Target Purpose
src/Pico_base/main.cpp Raspberry Pi Pico Base controller firmware
src/Pico_arm/main.cpp Raspberry Pi Pico Arm controller firmware (commented out in config)
src/Arduino_mega/main.cpp Arduino Mega 2560 ROS control / full system

Libraries (lib/)

Active Libraries

Path Description
lib/Control/Kinematic.cpp/.h Robot kinematics algorithms
lib/Control/Pid.cpp/.h PID controller implementation
lib/Control/Timer.h Timer utilities
lib/Encoder/Encoder.cpp/.h Encoder reading
lib/Motor/Motor.cpp/.h Motor control
lib/Servo/ServoJGB.cpp/.h JGB servo control
lib/Gcode/Gcode.cpp/.h G-code parsing

Reference Libraries (lib/_reference_/)

  • MPU6050 - IMU sensor library with DMP (Digital Motion Processor)
  • I2Cdev - I2C communication
  • PS2X_lib - PlayStation 2 controller interface
  • Thread - Threading/scheduler library
  • Auto_control_lib / Manual_control_lib - Control mode libraries
  • ROS_control - ROS integration headers

Headers (include/)

Path Purpose
include/Config.h Main configuration
include/Pico_base/PICO_Base.h Pico base definitions
include/Pico_arm/PICO_Arm.h Pico arm definitions
include/Arduino_mega/ROS_control/ ROS control headers

Test Headers (include/test_*/)

  • test_FeedbackLoop/ - Component tests (Communication, Encoder, Motor, PID, Servo, Wheel)
  • test_Kinematic/ - Kinematics algorithm tests
  • test_Timer/ - Timer tests

Resources (res/)

  • CSstate1.png / CSstate2.png - Control system state diagrams

Tests (test/)

Path Description
test/test_mega/ Arduino Mega tests (MPU6050, FullSystem)
test/test_PicoSerial/ Pico serial communication tests
test/temp/ Temporary test files

Build Environments (platformio.ini)

[env:pico_base]   # Raspberry Pi Pico - Base (active, COM4)
[env:pico_arm]    # Raspberry Pi Pico - Arm (commented out, COM8)
[env:mega]        # Arduino Mega 2560 (active, COM5)

Key Features

  1. Multi-platform: Supports Raspberry Pi Pico (RP2040) and Arduino Mega 2560
  2. Control modes: Auto control, Manual control (PS2), ROS control
  3. Sensors: MPU6050 IMU with DMP for orientation
  4. Communication: I2C, Serial (including ROS serial)
  5. Control algorithms: Kinematics, PID feedback loops
  6. Actuators: Motors, Servos (JGB)

Sources:

CS state #1:

CS state #1

CS state #2:

CS state #2

CS state #3:

CS state #3

Note

  • The code is not maintained properly so running might cause some errors. PLease check for dependences before proceeding the flash.

Code References

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages