MediaTek Audio Recorder

by Just4Fun Media in Circuits > Arduino

3096 Views, 43 Favorites, 0 Comments

MediaTek Audio Recorder

Presentation3.jpg
photo-2015-10-30, 1:05 PM.jpg
photo-2015-10-30, 1:05 PM.jpg

This is a simple project to learn about using the MediaTek LinkIt's Headphone Port royal plat music.

For this project you will need:
- A Solderless Bread Board
- Jumper Wires
- A LED
- A Push Button Switch
Optional - micro SD card to save sound files

Check Out Our Other Accounts! Like, Subscribe, and Follow to keep up to date with our latest projects. :-)

Just4Fun Media Facebook Just4Fun Media Instagram Just4Fun Media Youtube Just4Fun Media Twitter Just4Fun Media Tumblr Just4Fun Media Website

Test the Standard State of Your Switch

photo-2015-10-30, 1:05 PM.jpg
photo-2015-10-30, 1:05 PM.jpg
photo-2015-10-30, 1:05 PM.jpg
photo-2015-10-30, 1:05 PM.jpg
photo-2015-10-30, 1:05 PM.jpg
photo-2015-10-30, 1:05 PM.jpg
Usually the standard state of your switch can be found in the data sheet. Since I salvaged this limit switch off of an old printer I made sure to test it first.

To test the switch you simply need to connect it in series with an LED and connect it to a low voltage source on the LinkIt. My switch had a standard ON state. This will become more important when you begin coding.

Wiring

photo-2015-10-30, 1:05 PM.jpg
photo-2015-10-30, 1:05 PM.jpg
photo-2015-10-30, 1:05 PM.jpg
photo-2015-10-30, 1:05 PM.jpg
photo-2015-10-30, 1:05 PM.jpg
photo-2015-10-30, 1:05 PM.jpg
photo-2015-10-30, 1:05 PM.jpg
photo-2015-10-30, 1:05 PM.jpg
Run a jumper wire from the digital ground pin (Black), and an LED driver pin (Red) to two rows on the board. Place the long leg of the LED into the positive row and the short leg into the ground row.

Run two jumpers from two different digital pins (one will be programmed as hot) and connect your switch between them.

The MediaTek LinkIt is designed to work with 2 or 3 wire 3.5mm microphones (Hot, Ground or Left, Right, Ground). If you are using a 4 wire microphone (usually with control buttons) you may need an adapter or only partially insert it into the headphone Jack.

Programming

Format a micro SD card into FAT format. Then save the files as .mp3 files directly onto the SD card.

To play an audio file on the LinkIt One simply format the SD card and directly place all of the sound files onto it.

Use the code below the trigger the sound file (replace the "001.mp3" with the desired exposure length, and the second delay with the desired time between photos).

NOTE: the first "delay" time MUST be longer than exposure time, otherwise the camera will not close the shutter until the program has finished running.

LAudio.setVolume(3);
LAudio.playFile( storageSD,(char*)"001.mp3"); //Length of exposure in seconds change file name to suit

Serial.println("1 Second Exposure Triggered");

delay(1000); //Length of Exposure

delay(1000); //Delay Between Photos

Use the "void loop()" command to keep the code repeating. If desired you can also add a loop counter to take only a certain number of photos.

Testing

photo-2015-10-30, 1:05 PM.jpg
photo-2015-10-30, 4:28 PM.jpg

To start or stop recording simply press the switch once.

I am hoping to eventually add a playback or monitor feature to ensure that the microphone is properly recording (before listening to blank mp3's on your computer ;-)

Have a great day! Any suggestions or ideas are welcome in the comments.