You’re Going to Have to Take My Word for ItPhysical Computing
Right, so no video this time. The driver’s power input has these weird holes with screws on it and one of them is too tight so I have to hold it in manually (can’t just wire it and leave it like that like a normal person would because I don’t have a tiny screwdriver). This makes operating a camera while attempting to make the circuit work difficult. It works though. Trust me. I’m not lying.
Simple stuff. Make thingy rotate. Figure out how to make thingy do the rotations I want it to do. Add a button maybe.
Experiment #1: The button triggers a 360-degree rotation when pressed. This takes 3200 steps for some reason (my understanding is that this driver is different to the one described in the tutorial which is supposed to make a 360 degree rotation in 1600 steps). It works though so that’s good.
Experiment #2: Now this one is a bit more fun. I changed the way speed is assigned very slightly so mapping the values is easier. Then I made the potentiometer control the speed of rotation.
Experiment #3: the potentiometer controls both speed and direction of rotation.
Experiment #4: The potentiometer now acts like a dial that can rotate the motor into one of 10 specific positions. This works fairly well except for the last position when the potentiometer is fully turned and the motor starts jittering back and forth for some reason. Other than that, works reasonably well.
I also tried removing the map and changing the number of steps to 3, which gives me (more or less) 1:1 control between the potentiometer and the motor. The sound it makes is horrible though.
…I mean it’s basic shit but at least I’ve done my homework this time.