Play WAV Files
Use this Propeller C - Simple Devices tutorial to learn how to set up a speaker to play audio from your SD card, and even to control playback volume using a PING))) distance sensor.
Use this Propeller C - Simple Devices tutorial to learn how to set up a speaker to play audio from your SD card, and even to control playback volume using a PING))) distance sensor.
Formatting audio to be compatible with your Propeller C or Spin projects is simple with Audacity; just follow this guide for step-by-step instructions.
Make some noise with this helpful guide on creating audio with Audacity that you can use with your Propeller C or Spin projects.
Want to make some noise with your Propeller C or Spin project? Visit our sound library for helpful resources like step-by-step audio recording and formatting instructions, ready-to-use WAV downloads, and a list of external free audio websites.
The AB-IR-Remote-WAV application uses the simpletools and abdrive (or abdrive360) libraries, which may be familiar to you already. It also uses the wavplayer library to play the audio files, and sirc to decode the infrared signals received from the remote controller.
A detailed comment block (all the lines between /* and */) helps other people know what is needed to use the application code, and what to expect from it in action.
BlocklyProp blocks for generating audio. See each block for board type compatibility.
Let's take a look at the code. You can adapt KittyBot to work with different sensors, and use your own WAV files to make different noises.
The KittyBot project includes the following 4 libraries (see below code).
If you're using the KittyBot program for the ActivityBot 360° Robot, its fourth library #include shown below will be abdrive360 not abdrive. Every other part of this program should look the same regardless of which ActivityBot you use.
So far, this tutorial has shown how to print text and draw shapes directly on the OLED display with a series of blocks. You can also display bitmap images stored on an SD card. This is easy if you are using the Propeller Activity Board WX, which has a microSD card slot built in.
Don't like cats? Or perhaps you just want to try out some different sounds?
The Polite ActivityBot is a variation of the same code base, with different WAV files for the three behaviors. Instead of meowing, purring, and hissing, Polite ActivityBot uses its words to nicely request that you move out of its way.
Download the Polite ActivityBot code