Introduction: AMSC - Arduino Multimedia and Skype Controller
AMSC - Arduino Multimedia and Skype Controller
* Imagine yourself watching a movie and, out of nowhere, someone calls you on Skype and because of that you get destracted and you need to rewind the movie to concentrate again. That kind of things shouldn´t happen. That´s the reason why I made this program.
Sometimes we all want something to control multimedia apps in a fast and easy way, as knowing the current playing song, pause it to view a video or listen to something else or just control the volume of the app. Now we can! And it also has a menu to display CPU and RAM usage and a Skype menu to make and receive calls! Oh, yes. And it is super easy to make! What could be better?!
So, let´s get started.
* Icon credits:
"Big Foot", by Cristiano Zoucas from www.thenounproject.com
"Traffic Cone", by Dalpat Prajapati from www.thenounproject.com
"Phone", by Icon 54 from www.thenounproject.com
"Arduino Board", by Sonja Grapemind from www.thenounproject.com
Step 1: Preview of Functions
The following information is in AMSC - Help.txt:
1-Buttons: In main menu: 1.VLC Menu 2.PCStats Menu 3.Skype Menu 4.Global play/pause keystroke simulation 5.Toggle LCD LED 6.Configuration In VLC Menu: 1.VLC Play/Pause 2.VLC Previous 3.VLC Next 4.VLC toggle repeat (playlist and song) 5.VLC toggle Shuffle 6.Exit to main menu In PCStats Menu: 1.General Menu 2.Display per CPU core usage 3.Display RAM memory usage 4.Display local IP 5.Nothing 6.Exit to main menu In Skype Menu: 1.Place Call 2.End call 3.Add selected contact to conference call list 4.Clear conference call list 5.Enter Skype call menu 6.Exit to main menu In Configuration 1.Toggle Configuration 2.▲ 3.▼ 4.Nothing 5.Nothing 6.Exit to main menu
1.Adjusts LCD Contrast (in %, steps of 5) 2.Adjusts LCD Brightness (up to 255, steps of 5) 3.Adjusts global date/time display (FD = Full date and time, MD = minimum date and time, H = only time, OFF = display nothing) 4.Adjusts wether to show artist or not. A = automatic. If the track doesn´t have an artist then don´t display it. If the track has it then display it. 0 = ALWAYS OFF. I = ALWAYS ON 5.Adjusts wether to show album or not. 6.Adjusts metadata display mode. "Forward and Backwards" prints the string and, if it is greater than 16 char then it removes the first character until it is 16 char long. After that, it adds the char deleted to print the string back. Ex. "SIXTEEN CHARACTERS" is 18 char long so it would be displayed like this: 1- "SIXTEEN CHARACTE", 2- "IXTEEN CHARACTER", 3- "XTEEN CHARACTERS", 4- "IXTEEN CHARACTER", 5- "SIXTEEN CHARACTE". "Fill" mode prints the string and, if it is greater than 16 char then it fills all the line with white spaces until the string isn´t displayed anymore. 7.Adjusts metadata display time in milliseconds. Is the time before displaying another type of metadata. ONLY affects string thar are less than 16 char. 8.Adjusts track time display in VLC menu. C/R displays current time and remaining time. C/T displays current time and total time.
Step 2: Part List
To build this awesome project you need:
- 1 (One) rotary encoder with a knob. I took mine from an old mouse that was laying around.
- 6 (Six) small through-hole pushbuttons.
- 8 (Eight) 10K ohms resistors.
- 1 (One) 470uF 6V minimum capacitor. You can also use a 330uF cap. This is used to convert PWM to analog to control the LCD contrast.
- 1 (One) BC547/548 NPN transistor (or similar). This is used to control the LED of the LCD.
- 1 (One) Arduino UNO or an Arduino with at least 32KB of flash memory and 2K of RAM memory.
- 1 (One) 16*2 LCD. If it has a backlight LED then it can be controlled with the Arduino.
- A lot of jumper wire.
- A protoboard
- Windows 32/64 bits.
- Python 2.7.11. Make sure is the 32Bits version!
- Arduino IDE. I strongly recommend activating code folding under "File" -> "Options" as it will make it much easier to read the code.
- (Recommended) Notepad++.
- (Recommended) PyCharm Community Edition.
- VLC (needed to control multimedia).
- Skype (needed to make and receive Skype calls).
- Custom made LCD library (modified to take less flash memory space).
- Request library. As that webpage says, you install it by running the command "pip install requests".
- Skype4Py library.
- Psutils library.
- Pywin32 library.
- Pyserial library
Make sure you install the 32 bits version of each library! Otherwise it won´t work!
To install the LCD library unzip the folder and place it in "Documents/Arduino/libraries".
That´s all! We don´t need anything else, so let´s go to step #3!
Step 3: Making the Connections
You need to connect all the components like they are in the diagram. Make sure you connect the capacitor with the right polarity and that you check the pins of the transistor. Not all the transistors have the same pin arrangement. It could be Base, Collector and Emitter, CBE or EBC. The diagram is for a BC548/547. The resistors used with the rotary encoder are pull-up resistors to avoid leaving the pin floating.
After connecting everything just upload the code!
Step 4: The Arduino Sketch, the Python Program and the First Run
The Arduino Sketch is attached in this step. You won´t need to modify anything.
In the Python program you will need to modify the COM port (with the one of your Arduino) and the CPU status code if you don´t have 8 cores.
You will need to properly configure VLC to activate HTTP control. For this go to "Tools" -> "Preferences" and the click on "Show settings: All". Then go to "Interface", "Main interface" and make sure "Web" option is activated and it says "http" in the text box. Finally, go to "Lua" (under "Main interface"), type the password you want under "Lua HTTP" and click on Save.
You will also need to modify the password in the AMSC.py file before the first run.
For the first time you run the program you need to give permission to control Skype with python.exe. A message will appear in the Skype app (see images) and you will be asked to give python permission to control Skype.
After this you are good to go!
Step 5: That´s All!
Now enjoy your new Multimedia and Skype Controller made with an Arduino!
We have a be nice policy.
Please be positive and constructive.