How to Make a Piano on TinkerCad

by aubrey16 in Circuits > Assistive Tech

462 Views, 0 Favorites, 0 Comments

How to Make a Piano on TinkerCad

Screenshot 2021-02-03 at 19.29.30.png

Use TinkerCad to make this.

The White Keys

Screenshot 2021-02-03 at 19.28.01.png

This piece of code is how to make the white keys on a piano. First, go to the math section and get out 5 "Set Variable to...". You are going to make the first one's variable width and set it to 5. The second variable is going to be length and you have to set it to 50. Make the third variable height and set it to 5. Lastly, make the fourth one "j" and set it to -10 and then set "I" the last variable to -15. The next step is get out a box from the shape section and set the width, length, and height by going to the data section and drag the variables width, length, and height that you set earlier. This will make them automatically what we set them to be earlier. Next grab the move block from the modify section and make the z-axis I x width and the x-axis height x 11. Then in the math section add a change a variable by a number and change I by 1. Lastly for the white keys, add a repeat function and make it repeat 26 times.

The Brown Keys and Brown Body Minus the Legs.

Screenshot 2021-02-03 at 19.28.21.png

Add a box and set the width to width / 2, length to length / 2, and the height just to height from the data section. Add the move command and set the x-axis to J x width / 2, the y-axis to length / 4, and the z-axis to height x 12. Then add the change variable command and change J by 2. Put a repeat command infront of the box command and it will automatically attach around all of those commands. Add a repeat command and set it to 3 but, it is a different one than before and it goes after the one we put before. Add a third repeat command after that one and set it also to 3. Add a box command and set the width to width / 2, the length to length / 2, and the height is just going to be the height. Add a move command and set the X-axis to j x width / 2, the Y-Axis to length / 4, and the Z-axis to height x 12. The change J by 2. Add another repeat command of 3. Add a box and set the width to width / 2, the length to length / 2, and the height to height. The add a move command and set the X-axis to J + 2 x width / 2, the Y-axis to length / 4, and the Z-axis to height x 12. Then, change J by 2, and then add another change variable command and change J by 4.

For the brown case around the piano add another box and set the width to width / 2, the length to length / 4, and the height to height. Add a move command and set the X-axis to -19 x width / 2, set the Y-axis to length / 4, and and set the height to height x 11. Add another box and set it the width to 135, the length to 100, and the height to 5. Add a move command and set the X-axis to 15, the Y-axis to 30, and the Z-axis to 47. Add another box and make the width 135, the length 65, and the height to 25. Lastly, add a move command and set the X-axis to 15, and the Y-axis to 48, and the Z-axis to 60.

The Legs

Screenshot 2021-02-03 at 19.28.32.png

We have to create a new object because other wise the keys would all mesh together so it would no longer look like a keyboard. So add the new object command from the modify section. Add 4 create variable commands. The first one is leg size and you are going to set it to 6, the second one is height and set it to 45, the third one is width and set it to 100, and the last one is depth and set it to 100. Add a box and set the width, length, and height using the data section and make them width, depth, and height. Add a move command and set the Z-axis to leg size. Add another box and make it a hole, set the width to width using the data section, the length to depth - leg size x 2, and set the height to height. Add another box and make it a hole, set the width to width - leg size x 2, the length to depth, and the height to height. Add a create group command. Lastly, add a move command and make the X-axis 10, the Y-axis 30, and the Z-axis height / 2 - 0.