Programming SCARA
Control Logic in C
Programming a Control logic for a Simulated Scara robot
What did you do?
Developing Full Control Logic from Scratch
What tools did you use?
Used C language with Foundational functions
I used C (structs, modular design, dynamic memory allocation, trigonometric math), Visual Studio Code, Git/GitHub
What was the outcome?
Built a Robust System, Achieved the Highest score in the Cohort
The final program was stable, robust, and handled invalid inputs gracefully without crashing. It was recognized as one of the top submissions in the class — I finished the course with a 97% average, ranking first in the robotics cohort. The lab component itself scored above the 100% cap due to bonus criteria.


Actual Scara Robot (left) and the Robot Mechanism (right)
The core challenge was implementing forward and inverse kinematics in C to translate user-defined X-Y coordinates into accurate joint-angle commands for a simulated SCARA robot.
The system had to handle coordinate-based movement, arm orientation, pen control, and speed adjustments — all while enforcing joint-limit constraints to prevent invalid configurations.


The program made by BCIT school, simulating a SCARA robot drawing shapes based on user input or programmed logics






All variables that need to be taken into account for joint angle calculations


The angle limit is a minimum of 10 degrees between joints


the maximum range in the movements of each joint


basic math formula for converting angles into x y coordinates were used for forward kinematics


Math formulas used to calculate the value of each variable: Length (L), General Direction Angle (β), Relative Angle (α), Inner-Arm angle from x-axis (Θ1), Outer-Arm angle from x-axis (Θ2)




Forward Kinematics (angles → location)
Inverse Kinematics (location → angles)


I designed the full control architecture from scratch — mapping out all modules and their relationships using a mind map before writing a single line of code. This let me keep the program flow clean and predictable across every subsystem.
A deliberate focus on readability meant each function was written so that another engineer could understand its purpose and flow at a glance — no guesswork required.
What was the project about?
Mathematical Considerations & Calculations for Arm movements
This was an individual project. The simulator and communication interface were provided; everything else was mine to build.
A basic simulation tool is provided, however a control logic is required to move the robot
A visual mapping method was used to create a big picture flow of the program to approach the development more systematically and efficiently (click image to view details)


Prioritizing Readability, Simplicity, and Robustness of the code




Focused on Readability as the top priority, as programming is a collective effort, hence requires streamlined communication. Put a lot of effort into clean format, descriptive names, and user-friendly comments.
Used structs to enhance the object-oriented coding system
Clearly defined constant values such as angle limits, tolerances, etc
This project gave me a strong practical foundation in robotic arm control, kinematics, and systems-level thinking in C.


A snapshot of course evaluation report for C programming
Systematic Approach in Architectural Design using Visual Mapping
I implemented the full C control logic for a simulated SCARA robot, including coordinate conversion, joint movement, inverse/forward kinematics, speed control, file parsing, and user command handling.
