logo-mobile

ROHM

ROHM
Menu
  • Arduino –
  • Raspberry Pi –
  • Trending –
  • Others –
  • About –
  • Contact –

Arduino

Can Arduino make USB devices? Creating devices on Arduino Pro Micro (Leonardo)

DevicePlus Editorial Team
Published by DevicePlus Editorial Team at March 16, 2020
Categories
  • Arduino
Tags

create USB devices on Arduino Pro Micro

This article was translated to English, and was originally published for deviceplus.jp.

In this article, I’d like to try out a variety of things that can be done, such as a “device plus” way using that function!

Instructable recipe
Est time:60分
Necessary parts

  • Arduino main console (Arduino Pro Micro)
  • Breadboard
  • Volume resistor (10KΩ)
  • Wood

Table of contents

  1. Adjust the volume for the device
  2. Let’s make a case
  3. Conclusion

1. Adjust the volume for the device

Whenever I’m working on a computer, I often work while playing music. However, I often have problems adjusting the volume. Since the volume button is on the keyboard for note PCs, that problem can be easily solved by just pressing it. However, for desktops, since that button doesn’t exist, it’s a little more difficult.

Take Windows as an example; you have to click on the speaker icon at the bottom right of the screen to change the volume; or, use the volume adjustment on each playback software. This time, to solve this annoyance, I’ll create a device where you can easily change the volume!

Arduino Pro Micro

The Arduino Pro Micro will also be used this time. I’ll continue using this.

Well, I thought about making it, but as I was looking things up for this article, I discovered quite a lot that I need to get off my chest. For Windows, you can actually turn up the volume with “Win” + “PageUP” on the keyboard, and turn it down with “Win” + “PageDown.”

However, the “Win” key and “PageUP” and “PageDown” are far away from each other, so you have to use both hands. Above all else, I want to control the volume with a knob. For that reason alone, I’ll try to make this device.

How to adjust the volume from Arduino

Although we already introduced this before, let’s think about a keyboard command on Arduino for adjusting the volume.

This time, if the volume resistance rotates, simply acquire the state and try to implement it by increasing and decreasing the volume. Since we won’t know what the current value is through this method, finer adjustments will be difficult. However, there shouldn’t be any problems with quick rotations, so let’s give it a shot!

Arduino Pro Micro

The volume can be adjusted on Windows by combining the keys highlighted on the picture. This key is sent to Arduino Pro Micro as a virtual key command.

Since we adjusted the volume, let’s also set up the volume resistor for the parts. The circuit is simple; detect the value of the volume resistance with the analog input (A0 pin), and try to send the key to the Windows side according to the increase or decrease of the value.

Arduino Pro Micro adjusting volume

Adjust the volume for the program

In the conditional statement, _pos-2)> ain is a program that sends a key if the resistance value is larger or smaller than the previous state. Although there have been cases where the numerical value fluctuated slightly, such as + -1 to 3 even though the volume resistance hadn’t been touched, here it is set to + -2 so that it doesn’t malfunction even if the resistance value fluctuates.

Arduino Pro Micro volume control

If we turn on the volume knob, then the sound on Windows should also change! Now, working on a computer has become even more comfortable!

2. Let’s make a case

Since it seems a bit empty by itself, let’s make a case to put it in. I picked up this block of wood at my local goods store at a reasonable price. All you need now is an electric drill to attach the volume resistor.

Arduino Pro Micro on off switch

Attach an ON/OFF switch.

Arduino Pro Micro drill hole

Drill a hole that fits your Arduino, and place the parts inside.

Arduino Pro Micro solder together

You can solder directly onto the Arduino, but since I want to use it again, I left some space in between.

After that, place the Arduino inside the hole and you’re all set. Let’s check if it still works.

It works! Now, that looks a lot different from your usual Arduino, right?

Conclusion

In today’s article, we created a volume adjustment device based upon Arduino Pro Micro. By applying keyboard shortcut keys or mouse operations, you can create a device that specializes in specific processes for games or for completing simple tasks. Give it a try and see what you can make.

DevicePlus Editorial Team
DevicePlus Editorial Team

Check us out on Social Media

  • Facebook
  • Twitter

Recommended Posts

  • Can Arduino make USB devices? Try using the HID function with Arduino Pro Micro (Leonardo)Can Arduino make USB devices? Try using the HID function with Arduino Pro Micro (Leonardo)
  • The Basics Of Arduino: Prepping The ArduinoThe Basics Of Arduino: Prepping The Arduino
  • The Basics of Arduino: Adjusting LED BrightnessThe Basics of Arduino: Adjusting LED Brightness
  • USB Volume Control with ArduinoUSB Volume Control with Arduino
  • How to control an Arduino from a Windows computerHow to control an Arduino from a Windows computer
  • Using Arduino with Parts and Sensors – Solar Powered Arduino (Part 1)Using Arduino with Parts and Sensors – Solar Powered Arduino (Part 1)
Receive update on new postsPrivacy Policy

Recommended Tutorials

  • How to integrate an RFID module with Raspberry Pi How to integrate an RFID module with Raspberry Pi
  • How to Use the NRF24l01+ Module with Arduino How to Use the NRF24l01+ Module with Arduino
  • How to Run Arduino Sketches on Raspberry Pi How to Run Arduino Sketches on Raspberry Pi
  • Setting Up Raspberry Pi as a Home Media Server Setting Up Raspberry Pi as a Home Media Server

Recommended Trends

  • SewBot Is Revolutionizing the Clothing Manufacturing Industry SewBot Is Revolutionizing the Clothing Manufacturing Industry
  • All About The Sumo Robot Competition And Technology All About The Sumo Robot Competition And Technology
  • 5 Interesting Tips to Calculating the Forward Kinematics of a Robot 5 Interesting Tips to Calculating the Forward Kinematics of a Robot
  • Go Inside the Drones That Are Changing Food Delivery Go Inside the Drones That Are Changing Food Delivery
Menu
  • Arduino –
    Arduino Beginner’s Guide
  • Raspberry Pi –
    Raspberry Pi Beginner's Guide
  • Trending –
    Updates on New Technologies
  • Others –
    Interviews / Events / Others

Check us out on Social Media

  • Facebook
  • Twitter
  • About
  • Company
  • Privacy Policy
  • Terms of Service
  • Contact
  • Japanese
  • 简体中文
  • 繁體中文
Don’t Forget to Follow Us!
© Copyright 2016-2023. Device Plus - Powered by ROHM
© 2023 Device Plus. All Rights Reserved. Muffin group

istanbul escort istanbul escort istanbul escort