Just a program that tests servos. NEW UPDATE BASICALLY A SERVO CONTROLLER NOW!
Used ai for setup and debugging
Just a program that tests servos. NEW UPDATE BASICALLY A SERVO CONTROLLER NOW!
Used ai for setup and debugging
Devlog #4: The Name Change & The PyPI âWallâ
Date: April 8, 2026
Status: 0.1.7 is finally live (and I am exhausted).
đToday (AHHHHH)
If you looked at my commit history today, youâd see a beautiful new feature and a clean project name. What you donât see is the absolute war I waged against the PyPI servers.
So today i added it to the PYPI liabry! (try it yourself: pip install servotest, then run servotest)
I officially renamed the project from servo_tester to the much cleaner servotest.
Pro-tip: Renaming a project mid-build is like trying to change a tire while the car is moving. I hit every error from 0 to 404, because my local dist/ folder was haunted by the ghost of the old name or pypi just hates me.
New Feature: The âDual-Coreâ Startup
While I wasnât fighting with YAML, I actually made the tool much smarter. Iâve implemented a more professional Mode Selection and Port Searching logic.
Choose Your Adventure: Test vs. Real
Iâve moved away from hardcoding âTESTâ in the script. Now, when you launch servotest, the CLI gives you a choice:
*Real Mode: The script scans your system using pyserialâs tools.list_ports. It looks for the Waveshare driver signature and tries to handshake with the STS3215 servos.
*Test Mode: No hardware? No problem. It spins up a Virtual Servo inside the terminal. This allows for logic testing, packet verification, and UI layout checks even if the postman is still a few days away with the actual servos.
Intelligent Port Searching
Instead of guessing if the board is on COM3 or COM7, the script now lists available serial devices and asks for confirmation if itâs unsure. Itâs way more robust than the âpray it connectsâ method I had last week.
đŚ The âFresh Startâ Release
Iâve officially nuked the old API tokens and moved to Trusted Publishing. No more secret keys; GitHub and PyPI now just âtrustâ each other via OIDC.
This is probaly my last devlog for this project, now to the robot arm!
Log in to leave a comment
Gemini said
neoxyyang11 worked on Just another servo tester
1 minute ago
1h 20m logged
DEVLOG: THE EYE OF THE SERVO â PATCH NOTES v1.5
Date: April 6, 2026
Status: Software Refined / Simulation Mode Active
[NEW FEATURES]
The Progress & Angle Bar (Visual Feedback)
Added: A dynamic ASCII-based visualizer for servo positioning.
Logic: Created the draw_bar(val) function. It maps the 12-bit range (0â4095) to a 20-character block string.
The Result: Instead of just staring at numbers, the console now shows a âloading barâ style slider that moves in real-time as the servo (simulated or real) hits its targets. It makes it much easier to catch jitter or travel limits at a glance.
Macro Mode: Record & Replay
Added: A persistent MACRO_LIST array to store movement sequences.
Workflow: In Live Mode, every successful command (raw or degree-based) is automatically pushed to the macro list.
Replay: Option [3] iterates through the list with a 0.8s delay between steps, allowing for âchoreographedâ movement testing.
Cleanup: Added Option [4] to flush the array so I can start fresh without restarting the script.
Real-Time Telemetry (Voltage & Temp)
Added: A get_telemetry function that pings the STS3215 internal sensors.
Registers: Reading 2 bytes starting at address 0x2C.
Safe-Guards: * Voltage: The raw value is divided by 10 to get the actual 12.0V reading.
Thermal Alert: The temperature display turns CRITICAL RED if the internal thermistor reads over 50°C.
[BUG FIXES & REFINEMENTS]
Refined: Added ser.reset_input_buffer() to the telemetry loop. This clears out any âghostâ data or echoes from the TX line so the temperature readings donât get mixed up with previous position commands.
UI: Added a clear_console() call to the main menu loop. It keeps the terminal from becoming a wall of text and keeps the telemetry âHUDâ at the top during manual control.
[KNOWN ISSUES]
The TEST MODE telemetry returns dummy values (shown in CYAN) since thereâs no physical sensor to ping.
Still havenât tested if the 0.05s sleep is enough time for the Waveshare board to switch from TX to RX mode.
Note: The macro recorder is actually a game changer. I can âteachâ the servo a path manually and then just watch it repeat the loop. It feels less like a script and more like a controller now. Still staring at the front door waiting for the delivery truck.
Log in to leave a comment
DEVLOG: THE SERVO STIRRER â PATCH NOTES v1.2
Date: April 6, 2026
Status: Hardware Pending (Simulation Phase)
[NEW FEATURES]
PORT = "TEST" now bypasses the serial.Serial initialization which previously caused the script to crash if no servo was found.0-4095 for direct register control.180d) which are automatically converted to the 12-bit servo scale via the formula $(Deg / 360) \times 4095$.[BUG FIXES & REFINEMENTS]
input() function prevented the script from compiling.send_packet function to handle NoneType serial objects when in simulation mode.try/except block to provide more specific troubleshooting tips for the Waveshare board (Jumper B settings, driver issues).[KNOWN ISSUES]
Note:** This update was a huge milestone. Even though Iâm still waiting on the hardware, the software side is now a ârealâ tool. Seeing the TEST MODE warning in bright red makes it look cooler.
Next step: Plugging in the 12V and seeing it spin.
DEVLOG: THE SERVO SPIN TESTER BENCHAMRK THIGNYMAGIG
April 4th: ITâS ALIVE
When youâre building complex robotics, the last thing you want to do is troubleshoot a dead motor after you built it. This project was born out of the need for a âcheckâ tool. This script lets you plug a servo into a Waveshare Adapter, check your COM port, and instantly verify if the hardware is alive, responsive, and moving through its full 0 to 4095 range. (0-360 degrees)
I based the packet structure off of the Waveshare wiki originally, but their examples were for a different library than the raw approach I wanted. That meant I had to figure out not only how they structured the hex packets originally, but also how to calculate the checksums manually so the servo didnât just ignore me.
Fortunately for us, the STS3215 protocol is somewhat documented. They use a specific command structure where you send a start header, the ID, length, command type, the register address, and finally the parameters.
In short, hereâs how the packet method worked:
Construct a list of bytes starting with 0xFF
Pack the target servo ID and the length of the remaining message
Add the command (0x03 for write) and the register address (0x2A for position)
Split the 12 bit position value into two 8 bit bytes (low then high)
Calculate a checksum by summing the bytes and bitwise flipping the result
The main problem was then figuring out why the servo wasnât responding even when the TX light was blinking. I wasnât even sure if I had the baud rate right. 1000000 bps what the docs said.
Hereâs how I figured that out:
The Waveshare docs mentioned the default baud is 1M
A quick search on some forums mentioned that the checksum needs to be calculated starting from the ID byte, not the headers
A bunch more digging eventually led me to realize that the jumper needs to be on B for USB mode.
Anyhow, digging into the register map eventually led me to realize 0x2A is the 2 byte position register. Using a bit of bit shifting to split the values, I eventually got the benchmark sequence running.
Ps this is my first project with hackclub, please donât judge, writing skills arenât great.
Log in to leave a comment