Published using Google Docs
MIT App Inventor: Cow Bell
Updated automatically every 5 minutes

MIT App Inventor: CowBell App

Create an app that plays a cowbell sound!

Open https://ai2.appinventor.mit.edu in your browser. You will need to set up an account to get started.

Create a new project and give it a name -- no spaces or special characters, though.

You should see a screen similar to this with an area to design your app. Follow the instructions below to create and test your app.

  1. Add a Button
  1. Drag a Button from User Interface (Palette in far left column) to the phone screen
  2. Under Properties (far right column), change Text to “Shake the Bell”
  1. Add Sound
  1. Drag a Sound component from Media (under Palette on far left) to the phone screen. This is a non-visible component so will display under the phone
  2. Under Properties (far right column), select Upload File under source. Select the cowbells.ogg file from the desktop.
  1. Write the Code
  1. Click the Blocks button (upper right above Properties) to switch to the coding screen
  2. Under Blocks (far left), select Button1 and drag the [when Button1.Click] block to the center
  3. Under Blocks, select Sound1 and drag the [call Sound1.Play] block and snap it together with Button1.Click. Your code should look like this:

  1. Test Your App
  1. Open the MIT App Inventor Companion app on your
    phone or tablet
  2. Select AI Companion from the Connect menu
  3. Scan the QR code or enter the text code
  4. Wait while the app connects to your device, then click the button when it’s ready to hear your cowbell ring!

App Enhancements: