How to use MS Teams with Arduino Nano | Use Arduino as Keyboard

Have your classes, offices and meetings also shifted to online platforms like Zoom and MS Teams? Well, ours have. And so we had an idea. Let's control MS Teams using Arduino Nano!

In this project we will implement Key Mapping using Arduino Nano. The concept is to cause a trigger or action on desktop/laptop when a switch attached to Arduino Nano is pressed.

For example, when we press the switch connected to digital pin 2, it receives High input which triggers keyboard control CTRL-Shift-C, which is a shortcut for MS Teams to start a call.

Now that we know the concept, let's work on implementation.

Software Implementation

Download AAC Keys Program

The command to be executed on desktop upon button press is transmitted serially through USB connection of Arduino Nano with Laptop. As in the example discussed above, once we press the switch, the corresponding code for CTRL-SHIFT-C will is sent serially from Arduino Nano to the laptop. To make our Desktops USB port act as a Serail port, we will use the program, AAC Keys. Once this program runs, the serial port will read bits (data) send from Arduino Nano to trigger an event. 

Use the following link to download the program:

Arduino Nano Code

The code is pretty simple and short. The new stuff is in void loop (). Continuing our example above:         
As the switch is pressed, pin 2 receives HIGH Voltage, hence Arduino sends the underlined command in the image at left to laptop. 
Where \033 is escape sequence or simply code corresponding to ESCAPE KEY on keyboard. Next, hold holds the key until the next key(s) is typed. And CTRL and Shift being are keyboard buttons. The last key C, in this case, is written with . (dot) symbol. Summing up, in the above code, once the escape sequence command is written, we typed in the command to press and hold CTRL, Shift, and C keys. Which is then transmitted to our Desktop. You can implement any key sequence using \033 and hold.

Hardware Implementation

Circuit Patching

Uploading & Running AAC Keys

Connect Arduino Namo with Laptop and upload the code. Once code is successfully uploaded, run AAC keys. Rember, don't disconnect Arduino Nano from the laptop for the duration of the project. Configure the program selecting your corresponding port and the following settings and press OK. Once done, our Arduino-based MS Teams controller is ready to use.

Note: Don't run the AAC Keys program before uploading the code. Moreover, once the project is completed and Arduino Nano is disconnected, EXIT from AAC Keys program. If the program keeps running USB ports won't function properly causing errors in their normal operation.


To have a look at the project working, click on the following video Demo. You will also find a detailed visual explanation of the concepts discussed above.

For any queries, feel free to comment below. Happy Learning :) 


Popular Posts

How To Make Line Follower Using Three IR Sensor | Arduino Line Following Car

How to Make Traffic Lights Using Arduino Uno | Make Traffic Control System