Control Volume With Adafruit Trinket M0

by Instructables_2020 in Circuits > Microcontrollers

546 Views, 0 Favorites, 0 Comments

Control Volume With Adafruit Trinket M0

E2289A2F-9149-41FA-9032-03344D40EE1A.jpeg

Hello. I am a fourth grader, and today we are going to control volume with the Adafruit trinket m0.

Supplies

Adafruit trinket m0 https://www.adafruit.com/product/350

Micro usb sync cable

Coding

51396E24-E1B8-4F83-9A9F-977A36266C8C.jpeg

• Plug the trinket m0 into your computer.

• Navigate to https://maker.makecode.com/ and select Adafruit trinket m0.

• Then, press on new project. Next, go into input and click on touch D4. After that go into input again and press on touch D1.

• Next press on advanced, and then click extensions. Scroll down to keyboard, and click on it.

•After that, (when it's done loading) press on keyboard. Next, click on keyboard function volume up.

• Then, do the same thing but press on keyboard function volume down. After that go into pixel and select four set pixel color blocks.

• Next press on loops, and click on two pause 100 ms.

• After that, click the color on the pixel block, and make two black ones and one green and one red.

• Then, arange them like shown in the photo.

• After that, press the download button on the bottom left. Next, double click the button on the trinket m0. You should see its main pixel turn green. Finally, drag the download onto trinketboot.

Testing

To trigger volume down touch pin D4. To do the opposite touch pin D1.

Enjoy!