For the LED cube, you have to write the correct code to generate the animation. But writing all of those 1s and 0s can be really tedious. To make things easier, use the LED Cube pattern generator to create sequences of animation frames and play them back. Here’s how to use it:
- Click on the gray boxes to turn them orange.This means the corresponding LED will be illuminated in that frame of the animation sequence, once you have uploaded the code to your cube. You can preview the results in an isometric preview window on the right.
- Click on the insert button at the lower right to create a new frame and determine which of its LEDs are turned on.
- When you are happy with your frame, set its duration and click the Apply button.By default, each frame lasts for 100 milliseconds, so 10 frames of animation will take 1 second to play back on your cube.
- Keep going until you’ve created your animation sequence.
- Click the Play button, when you’re ready to preview the animation.The animation will be played at approximately the same speed you’ll see when it’s uploaded to your cube.
- When you are satisfied with the animation, click on the Get code button.This displays the necessary code in a pop-up window.
- Cut and paste the results in the textbox directly into your Arduino sketch!
- Upload your code to your LED cube and watch the three-dimensional show!
No comments:
Post a Comment