Cadence
9/15/2018 - Day 4
Listening to: FM-84 - Mainframe
I found out today having a PWM wire today on a servo only makes the torque of the servo weaker, it does nothing for the speed. So I set out to work on ways to potentially slow the servo down during transition. I also needed to find a way to stop the servo in the middle of its transition in order to give it a new position command. This is important as when the hexapod finds a new path or takes in new information when it is navigating, it will need to change its motion on the fly before walk cycles of certain limbs are completed. This is a common occurrence in normal animals as they walk, thus it needs to be an available option with the hexapod.
After most of the day looking into a setInterval() loop checking on input angles set in variables and doing a compare against them with the current angle for each servo, I realized I was over complicating it. The current johnny five API servo methods have the ability to set speed, I can also call a stop on a servo when a new command is passed into the socket. However I might still need to look into setInterval, as new commands will need to be passed into a loop, however the socket connection check loop will no longer be listening for these types of commands, the script itself might be passing these commands. Im still working out this configuration, but I have successfully interfaced with a servo and controlled its speed and interrupted its transition with a new position command. I will have to purchase a few servos to try and create patterns and control multiple at once. I also need to look into control boards for controlling multiple servos.













