Lincoln Cole

Animal Sounds

A fun game for little kids where you tap the buttons to hear animal sounds and then guess which animal it is!

IntermediateProtip12 hours1,502

Things used in this project

Hardware components

Amazon Echo
Amazon Alexa Amazon Echo


Read more


No circuit diagram needed!

I don't have a circuit diagram to show because the application exists purely in code and is available on Alexa devices.



This is my input handler that keeps my buttons active. I keep them live for a minute and then prompt the user that it is still active. They can press any button, and I save the buttons in memory in order of when they were pressed. With this, I don't have to have the button 'wake up' action that is usually recommended to find out which buttons exist in the roll call, but rather I can accept any button being activated at any time with a button press AND register the actual event as a unique animal sound based on a pre-set random generation.
  public static StartInputHandlerDirective buildSingleRecognizerDirective(
      HandlerInput input) {
    Map<String, Recognizer> recognizers = new HashMap<>();
    Recognizer allPressed = PatternRecognizer.builder()
    recognizers.put("all pressed", allPressed);
    Map<String, Event> events = new HashMap<>();
    Event completeEvent = Event.builder()
        .addMeetsItem("all pressed")
    Event failedEvent = Event.builder()
        .addMeetsItem("timed out")
    events.put("complete", completeEvent);
    events.put("failed", failedEvent);
    setOriginatingId(input, input.getRequestEnvelope()
    return StartInputHandlerDirective.builder()


Lincoln Cole

Lincoln Cole

4 projects • 3 followers
An author and Alexa Developer.