Skip to content

Camera Support #371

Description

@leandrumartin

Add support for a camera component to the Pi4Micronaut library.

Component Behavior

The library should enable capturing images and video. It must provide configuration options for resolution and frame rate; the camera module available in the SunFounder Raphael Kit support 1080p/30 fps, 720p/ 60fps and 640 x480p 60/90 video recording. Inputs include commands to capture photos and start/stop video capture when supported. Outputs are image files and video streams. Special cases to consider include handling initialization errors, module-specific limitations (such as supported formats and resolutions), and loss of connection to the camera.

Acceptance Criteria

Helper Class

A helper class is needed to implement the low-level interactions with the component, and the methods that developers will call when using our library.

  • Class is written in the appropriate subfolder of pi4micronaut-utils/src/main/java/com/opensourcewithslu.
  • Class fully implements functionality for the component.
  • Class logs all important changes in state and behavior.
  • Class handles errors gracefully and provides helpful error messages.

Controller Class

A controller class is needed to provide an example of how developers can use our helper class. This will be used in our documentation.

  • Class is written in the appropriate subfolder of components/src/main/java/com/opensourcewithslu/components/controllers.
  • The pinout needed for wiring up the component is documented in components/src/main/resources/application.yml, following the template set by the rest of the file.
  • Controller class has appropriately named API endpoints to show off all functionality of the component.

Tests

Software unit tests are needed to verify that the helper class functions correctly.

  • Tests are written using the Java JUnit Jupiter framework in the appropriate subfolder of pi4micronaut-utils/src/test/java/com/opensourcewithslu.
  • Test cases are written to validate all implemented behavior.
  • Tests handle edge cases.
  • Tests validate all cases where a method should fail, and that appropriate error messages are provided.
  • Tests validate that appropriate log messages are sent by each relevant method.
  • All tests pass.

Documentation

  • Documentation is written in written as an AsciiDoc file in the appropriate subfolder of pi4micronaut-utils/src/docs/asciidoc/components.
  • Includes component description, including the basic function of the component and a description of all important features of the component.
  • Provides a complete list of needed components and materials for setting up the breadboard circuit.
  • Provides complete detailed instructions for assembling the breadboard circuit.
  • Includes a circuit diagram.
  • Includes a schematic diagram.
  • Includes the GPIO pinout configuration needed for in the application.yml for the breadboard circuit. This should match the relevant parts of the application.yml file in the components project.
  • Includes (via dynamic linking) the example controller in the components project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    New ComponentImplementing new component supportdocumentationImprovements or additions to documentationenhancementNew feature or request

    Projects

    Status
    🏗 In progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions