Code #10
-
|
Does the code work for a 4x4 (16 motors)? I tried to implement it in my 4x4 box but it makes my motors move quite erratically and the 'wave' effect does not work so effectively. I did adjust the code as well but no luck. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Yep, the WTD 1.0 code ( https://github.com/aaronse/servo-display/blob/main/src/wtd_1/wtd_1.ino ) with the 'wave' effect can work for 16 motors. CANVAS_WIDTH and DRIVER_COUNT would need to be changed. For folks more familiar with Python, I just shared current WTD 2.0 code at https://github.com/aaronse/servo-display/tree/main/src/wtd_2, the code there has a basic implementation of Tetris. The code isn't polished and fully commented, but have shared anyway, will try to make edits to improve if/when folks ask questions. I encountered erratic jittery servo movement too, this can be frustrating as it could be caused by one or multiple issues. ChatGPT has some decent suggestions https://chatgpt.com/share/67512450-d710-800b-bc2a-0502bc37a7a3, I have a related TODO within the WTD 2.0 Python code... # TODO:P1:PERF/ENERGY Investigate hardware/wiring/software changes for reliable Enable/Disable of PCA9685 drivers.
# Implemented auto disabling "Enable" Pin when display is inactive. Goal was to reduce power/noise
# and extend Servo life. Unfortunately was observing 'glitches' and tiles unexpectedly moving when
# enable pin is powered down. Cause of power down 'glitches' is unknown, not sure whether this is
# an artifact of servos being powered down, and/or PCA9685 enable pin changes, and/or how all the
# enable pin wires are connected to a single Raspberry Pi pin, without any capacitors/resistors/anything
# to isolate/smooth noise.Do you still have the jitters? If just a few of the Servos is jittery, I try swapping for a new/different one. Personally found ~5% of the Miuzei SG90 9g servos I ordered do not work, or do not work well. Am using https://www.amazon.com/gp/product/B072V529YD, started adding info about other parts used to the README.md. Make sure you have decent power supply, and 22AWG or thicker wiring. The ChatGPT topic mentioned above has some good suggestions imo. Also, consider checking out https://forum.v1e.com/t/blue-smoke-n-fire-fun-with-i2c-16-channel-pca9685-servo-board-with-sg90/42481 |
Beta Was this translation helpful? Give feedback.
Yep, the WTD 1.0 code ( https://github.com/aaronse/servo-display/blob/main/src/wtd_1/wtd_1.ino ) with the 'wave' effect can work for 16 motors. CANVAS_WIDTH and DRIVER_COUNT would need to be changed.
For folks more familiar with Python, I just shared current WTD 2.0 code at https://github.com/aaronse/servo-display/tree/main/src/wtd_2, the code there has a basic implementation of Tetris. The code isn't polished and fully commented, but have shared anyway, will try to make edits to improve if/when folks ask questions.
I encountered erratic jittery servo movement too, this can be frustrating as it could be caused by one or multiple issues. ChatGPT has some decent suggestions https://chatgpt.…