1) Learning the Hardware
In order to play custom sounds, you need to have a Micro SD Card. It comes with a MicroSD and adapter.
If getting sound files from the computer you need to put the MicroSD inside the SD adapter so it will fit into your computer or standard card reader. It is important that the prongs are both pointing in the same direction as shown.
To Place into your computer place the MicroSD completely inside the SD adapter correctly and place the assembly into the computer as shown.
After you add the files, then remove the MicroSD card from the SD adapter and place into robot. IMPORTANT: Insert card all the way in with your nail, until your hear card “click”. Also, reboot robot by TURNING OFF AND ON ROBOT
2) How to Play a Sound from the Memory Card
Add in the code “call sound.play(#)” Where instead of #, put the number of the sound file that you are wanting to play.
Important: Only put the actual number and not the p#.
3) Recording a Custom Sound
Required Lesson Materials:
- Learn about how to input music or sound files from Audicity into Aseba, ultimately into Thymio so that it can be played in Thymio.
- Download and Install Audacity.
- Optional: Download and Install Soundflower for Mac to record sound directly from computer
- Create sound file by watching the Instructional video
- Refer to this project example for code to play a sound file.
How to Record Sound Directly from Computer to Audacity with a Mac
Step 1: Configure Soundflower
Click the Apple menu to Open System Preferences on your Mac, select Sounds, switch to the Output tab and set Soundflower (2ch) as the device for sound output. Open the Soundflowerbed app (you can find it through Spotlight) and it will add a Flower item to your menu bar. Click the flower and set Built-in Output for Soundflower 2ch.
Step 2: Configure Audacity
Go to Audacity> Preferences
Switch to the devices tab and select Soundflower (2ch) as the Recording device. Next switch to the Recording tab and select Software Playthrough. You will then be able to listen to the audio while it’s getting recorded inside Audacity. Click OK to save your preferences.
You are now all set to record system audio on your Mac. Play the audio inside any app, switch to Audacity and hit the record button. When you are done, just export the audio as an MP3 file and return your Mac’s sound settings to the original state (set Output as Internal Speakers or Line Out).
Order a sound card from us, we will include a folder full of sound files for you to use with Thymio!
Troubleshooting a Custom Sound that isn’t playing on Thymio
- If the sound file plays then the code is wrong
- Check your code, making sure the sound file is called after the “if statement” and before the ‘end”
- If the robot just makes a beep noise then the sound was not properly recorded and/or loaded onto the memory card. To test that this is true, call a sound that you know works on the memory card like call sound.play(22)
- If so, rewatch the video on how to create a custom sound and carefully follow all instructions