3dprint:strobo-tumbling-cubes
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| 3dprint:strobo-tumbling-cubes [2026/01/09 07:07] – [3D] ivo | 3dprint:strobo-tumbling-cubes [2026/01/09 07:13] (current) – [Code] ivo | ||
|---|---|---|---|
| Line 8: | Line 8: | ||
| ===== Files ===== | ===== Files ===== | ||
| ==== 3D ==== | ==== 3D ==== | ||
| - | * {{ : | + | * {{ : |
| - | * {{ : | + | * {{ : |
| - | * {{ : | + | * {{ : |
| - | * {{ : | + | * {{ : |
| - | * {{ : | + | * {{ : |
| ==== Code ==== | ==== Code ==== | ||
| + | Used an ESP32 (Doit DevBoard), with Platformio | ||
| <code cpp main.cpp> | <code cpp main.cpp> | ||
| #include < | #include < | ||
| Line 57: | Line 58: | ||
| double dt = ts[tsi]-ts[(tsi+3)& | double dt = ts[tsi]-ts[(tsi+3)& | ||
| dts[tsi] = 0.8*dts[tsi]+0.2*dt; | dts[tsi] = 0.8*dts[tsi]+0.2*dt; | ||
| - | | + | unsigned int w = dts[(tsi+1)& |
| - | for (int i=0; i<4; i++) { | + | |
| - | sum += dts[tsi]; | + | |
| - | } | + | |
| - | //double realStep = dts[(tsi+1)& | + | |
| - | | + | |
| if (w< | if (w< | ||
| delayMicroseconds(w); | delayMicroseconds(w); | ||
| Line 81: | Line 77: | ||
| </ | </ | ||
| ==== Circuit ==== | ==== Circuit ==== | ||
| + | |||
| + | Circuit for driving the 12V LED strip. Not very efficient and inverted logic, so it light up until the microcontroller has booted. But you do with what you have lying around... | ||
| {{ : | {{ : | ||
3dprint/strobo-tumbling-cubes.1767942469.txt.gz · Last modified: by ivo
