Skip to content

Commit

Permalink
Update develop (#173)
Browse files Browse the repository at this point in the history
* Update README.md

* Merging develop into main (#87)

* Completes #47 (#73)

* allow setting led color via hex value

* set controller endpoint for setting RGB via hex

* fixed spacing error in url for hex converter with frequencies

---------

Co-authored-by: Adrian Swindle <[email protected]>

* Added documentation for RGB LED circuit guide. Issue 74 (#79)

* Added location for RGB LED circuit guide.

* Added diagrams and link for hardware setup

* Addresses requested changes

* Changed default frequency to 200

---------

Co-authored-by: ruthvikm <[email protected]>

---------

Co-authored-by: jyanev <[email protected]>
Co-authored-by: Adrian Swindle <[email protected]>
Co-authored-by: Joe Folen <[email protected]>

* Completes Issue #71 (#72)

* adding a new component adoc file

* started outlining the things needed for a new component and controller example

* more notes on new components

The document is just notes at this point. It will need to be cleaned up
once we learn more about the framework.

* outline of how to add new component

The outline is more clean than before but still lacks precise
information. Will need to double check if all the appropriate steps are
there and get the specific information.

* completed outlining how to add a new componenet in the documentation

* updated workflows for main (#90)

* updated workfkows for main

* reverted changes in build-library-jar.yml

* test for documentation error unresolve directive

* reverting changes from last fix attempt

* changed included paths to go all the way back to the root before going back down to the file

* Completes Issue 83 and fixes bug with PushButtonController. (#84)

* Completes #47 (#73)

* allow setting led color via hex value

* set controller endpoint for setting RGB via hex

* fixed spacing error in url for hex converter with frequencies

---------

Co-authored-by: Adrian Swindle <[email protected]>

* Added start for Push Button documentation. Issue 83.

* Added start for Push Button documentation. Issue 83.

* Fixed bug with push button controller and updated YML.

* Updated documentation adoc.

---------

Co-authored-by: jyanev <[email protected]>
Co-authored-by: Adrian Swindle <[email protected]>

* Slide switch Documentation (#94)

* slide switch documentation and cirucuit image

* set default frequencies in rgbhelper to be 200

* Issue 54 - Added Contributor License Agreement (#70)

* added draft of Contributer License Agreement for Pi4J

* added draft of Contributer License Agreement for Pi4J

* Configured CLA and added documentation #issue-54

* added contributingToLibrary

* Fixes issue-54

* Fixes issue-54

* Final Fix issue-54

---------

Co-authored-by: ruthvikm <[email protected]>

* Documentation for rotary encoder. Issue 98 (#100)

* Started updating documentation. Issue 98

* Continuing on issue 98

* Added diagram and finished doc

* Added assembly instructions

* Added info about value returned

* Need to improve LED documentation (#102)

* Need to improve and add further information for this doc

* Updated the file with the requested changes. Still need to include the path for the controller.

* Made the requested changes to the .adoc file (Testing section with curl commands) & added path for the controller. Also created the LEDController.java file in the controllers directory.

* Provided the requested changes: bullet points, omegas, and corrected image path. Added a second method to the LEDController to take care of Led2. Added LED_circuit.png to the img file.

* Reverted change made to LEDController. Previously added a check for Led2, now removed.

* Deleted the :omega: variable at the top of the .adoc. Incorporated the preferred syntax for the image.

* Fixed the path for the image in the circuit diagram section.

* Changed led to LEDOn to resolve issue

---------

Co-authored-by: Ruthvik Mannem <[email protected]>

* Testing image for rotary encoder (#105)

* RFID documentation (#101)

* Initial outline of RFID documentaion

Still need to test the circuit, add a circuit diagram, and outline how
to test the circuit.

* Example commands for rfidscanner

* fix slide switch png

* added rfid circuit image

* added assembly instructions, troubleshooting, and functionalities sections

* added assembly instructions, functionality, and troubleshooting sections

* renamed images folder back to img

---------

Co-authored-by: Ruthvik Mannem <[email protected]>

* Fixing image issue in gh_pages (#106)

* Testing image for rotary encoder

* Copying img directory to gh-pages

* Fixing Image issue in gh_pages (#107)

* Testing image for rotary encoder

* Copying img directory to gh-pages

* updated asciidoc-build

* Fixing Image issue in gh_pages (#108)

* Testing image for rotary encoder

* Copying img directory to gh-pages

* updated asciidoc-build

* reverting back changes

* Fixes gh-pages image issue (#110)

* reverted changes to asciidoc-build.yml

* Fixed gh-pages images

* added controller endpoints for ledoff and switch state (#117)

* created outline for LCD documentation (#103)

* Update lcdScreen.adoc

Signed-off-by: jyanev <[email protected]>

* Update lcdScreen.adoc

Signed-off-by: jyanev <[email protected]>

* Update lcdScreen.adoc

Signed-off-by: jyanev <[email protected]>

* Add files via upload

Signed-off-by: jyanev <[email protected]>

* Update lcdScreen.adoc

Signed-off-by: jyanev <[email protected]>

* Update lcdScreen.adoc

Signed-off-by: jyanev <[email protected]>

* Update lcdScreen.adoc

Signed-off-by: jyanev <[email protected]>

* Update lcdScreen.adoc

Signed-off-by: jyanev <[email protected]>

* Update lcdScreen.adoc

Signed-off-by: jyanev <[email protected]>

* Update lcdScreen.adoc

Signed-off-by: jyanev <[email protected]>

* Update lcdScreen.adoc

Signed-off-by: jyanev <[email protected]>

* Update lcdScreen.adoc

Signed-off-by: jyanev <[email protected]>

* Update lcdScreen.adoc

Signed-off-by: jyanev <[email protected]>

* Update lcdScreen.adoc

Signed-off-by: jyanev <[email protected]>

* Update lcdScreen.adoc

Signed-off-by: jyanev <[email protected]>

* Update lcdScreen.adoc

Signed-off-by: jyanev <[email protected]>

* Update lcdScreen.adoc

Signed-off-by: jyanev <[email protected]>

* Update lcdScreen.adoc

Signed-off-by: jyanev <[email protected]>

* Update lcdScreen.adoc

Signed-off-by: jyanev <[email protected]>

* Update lcdScreen.adoc

Signed-off-by: jyanev <[email protected]>

* Update lcdScreen.adoc

Signed-off-by: jyanev <[email protected]>

* Update lcdScreen.adoc

Signed-off-by: jyanev <[email protected]>

* Update lcdScreen.adoc

Signed-off-by: jyanev <[email protected]>

* Update lcdScreen.adoc

Signed-off-by: jyanev <[email protected]>

* Update lcdScreen.adoc

Signed-off-by: jyanev <[email protected]>

* Update lcdScreen.adoc

Signed-off-by: jyanev <[email protected]>

* Update lcdScreen.adoc

Signed-off-by: jyanev <[email protected]>

* Update lcdScreen.adoc

Signed-off-by: jyanev <[email protected]>

* Update lcdScreen.adoc

Signed-off-by: jyanev <[email protected]>

* Update lcdScreen.adoc

Signed-off-by: jyanev <[email protected]>

* Update lcdScreen.adoc

Signed-off-by: jyanev <[email protected]>

* Update lcdScreen.adoc

Signed-off-by: jyanev <[email protected]>

* Update lcdScreen.adoc

Signed-off-by: jyanev <[email protected]>

* Update lcdScreen.adoc

Signed-off-by: jyanev <[email protected]>

* Delete micronautpi4j-utils/src/docs/asciidoc/img/lcd-circuit.png

Signed-off-by: jyanev <[email protected]>

* Add files via upload

Signed-off-by: jyanev <[email protected]>

* Update lcdScreen.adoc

Signed-off-by: jyanev <[email protected]>

* added yaml section

---------

Signed-off-by: jyanev <[email protected]>
Co-authored-by: Joe Folen <[email protected]>
Co-authored-by: ruthvikm <[email protected]>

* fixes issue 111 (#122)

* Fixes #119 (#123)

* Made preliminary changes for easier readability.

* No further changes, attempts to modify doc further yielded undesirable format. Current file has been improved from the original for clarity.

* Fixes 127 (#130)

* Resolved table of contents and image improvements, image does need to black rather than white.

* Resolved white bar on bottom. Resolved improve doc link. Added a placeholder image with black background.

* Clarity changes

* Additional clarity.

* Final image and whitespace reductions

* Pi4Micronaut Logo

* Possibly resolved issue with content becoming hidden behind header

* Removed unused, commented code.

* Update issue templates (#131)

* Update issue templates

Create a Bug report and New feature request templates

* Configured issue-templates

* Cleaning up code (#138)

* LED controller and helper updates

* input devices controller and helper updates

* output devices controller and helper and MultiCompController updates

* addresses lambda changes

* addresses RGBLED controller and helper comments

* addresses rotary encoder changes

* Creating JavaDocs - Closes Issue #129 (#139)

* start on javadocs

* updates to javadoc

* finished javadoc for the helper classes

* javadoc generated files, open index.html in browser to view

* javadoc comments added to the utility files

* first full draft of javadocs

* filled out remaining javadoc, remaining errors are due to micronait annotation

* second versino of javadoc

* added link to api reference

* fixed api reference link

Signed-off-by: Adrian Swindle <[email protected]>

---------

Signed-off-by: Adrian Swindle <[email protected]>

* Created workflow to publish javadoc to gh-pages (#145)

* Javadoc publish (#147)

* Created workflow to publish javadoc to gh-pages

* testing workflow

---------

Signed-off-by: Ruthvik Mannem <[email protected]>

* reverting build changes (#149)

* added adoc for setting up pi4m on raspberry pi (#141)

* added getting starting asciidoc for getting pi4micronaut working with raspberry pi

* asciidoc for setting up raspberry pi

* updated gettingStarted adoc

* updated gettingStarted.adoc to close issue-133

* updated gettingStarted.adoc to close issue-133 + added new images

* added gettingStarted.adoc to index.adoc

* Touch Switch Implementation Issue 144 (#152)

* begin implementing touch switch helper and controller

* added yml changes and initController method changes

* added disableController method changes

* testing changes for touch switch

* added removeEventListener

* adding javadoc comments for touch switch helper

---------

Co-authored-by: Ruthvik Mannem <[email protected]>
Co-authored-by: ruthvikm <[email protected]>

* Ready for Release (#159)

* Active Buzzer (#160)

* Link to Buzzer issue. Helper and Controller classes have been tested and functionality is verified.

* Resolved javadoc comments and messages. Removed errant commented code. Tested and verified functionality on pi with jdk 17

* Fixed comments in both files. Comments didn't provide an accuarate description.

* Fixed the comment at the top of the file so it will be recognized as a javadoc comment.

* issue-80 added light sensor compatibility (#168)

* added light sensor compatibility

* added PhotoResistor helper class

---------

Co-authored-by: Ruthvik Mannem <[email protected]>

* Readme changes Issue 121 (#169)

* Readme changes

* Readme changes with architecture diagram

* fixed links in readme

* Update README.md (#170)

Signed-off-by: Ruthvik Mannem <[email protected]>

* updated develop

---------

Signed-off-by: jyanev <[email protected]>
Signed-off-by: Adrian Swindle <[email protected]>
Signed-off-by: Ruthvik Mannem <[email protected]>
Co-authored-by: Greih Murray <[email protected]>
Co-authored-by: jyanev <[email protected]>
Co-authored-by: Adrian Swindle <[email protected]>
Co-authored-by: Joe Folen <[email protected]>
Co-authored-by: adelgadoj3 <[email protected]>
  • Loading branch information
6 people authored Feb 26, 2024
1 parent c8d1fdb commit ff726d3
Show file tree
Hide file tree
Showing 200 changed files with 12,708 additions and 1,028 deletions.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/new-feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: New Feature request
about: Suggest an idea or feature for this project
labels: enhancement
---

**You would like to implement a new component? If yes, please provide all the necessary details** \
A clear configuration of the component and its working principle. Ex. It uses PWM
- GPIO pins that are used by this component.
- Circuit diagram if available
- Any additional chips are used. Ex: It uses ADC0834

**Is your feature request related to a problem? Please describe.** \
A clear and concise description of what the problem is. Ex: I have a problem with LED [...]

**Describe the solution you'd like** \
A clear and concise description of what you want to happen.

**Additional context** \
Add any other context or screenshots about the feature request here.
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/report-a-bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Report a Bug
about: Create a report to help us improve
labels: bug
---

**Describe the bug** \
A clear and concise description of what the bug is.

**What component are you facing this issue with?** \
The component details and what functionality causes this issue

**To Reproduce** \
Steps to reproduce the behavior: For example
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. Run the component '....'
5. See error

**Expected behavior** \
A clear and concise description of what you expected to happen.

**Screenshots** \
If applicable, add screenshots to help explain your problem.

**Additional context** \
Add any other context about the problem here.
7 changes: 4 additions & 3 deletions .github/workflows/asciidoc-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ name: build adocs
on:
push:
branches:
- main
- develop
- yamlDocs

jobs:
adoc_build:
runs-on: ubuntu-latest
name: Asciidoctoring the docs to pretty HTML!
name: ASCII DOC build
steps:
- name: Checkout code
uses: actions/checkout@v2
Expand All @@ -22,5 +23,5 @@ jobs:
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
publish_branch: gh-pages
publish_dir: ./micronautpi4j-utils/build/docs/asciidoc/
publish_dir: ./pi4micronaut-utils/build/docs/asciidoc/

66 changes: 33 additions & 33 deletions .github/workflows/build-library-jar.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,51 @@
name: Build and Release Library
on:
on:
push:
branches:
-master
- main
pull_request:
branches:
-master
branches:
- main
jobs:
build-library:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
- name: Change wrapper permissions
run: chmod +x micronautpi4j-utils/gradlew
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: build
build-root-directory: micronautpi4j-utils/
- name: Execute Gradle build
working-directory: micronautpi4j-utils
run: ./gradlew shadowJar
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
- name: Change wrapper permissions
run: chmod +x pi4micronaut-utils/gradlew
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: build
build-root-directory: pi4micronaut-utils/
- name: Execute Gradle build
working-directory: pi4micronaut-utils
run: ./gradlew shadowJar
publish-jar:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
needs: build-library
steps:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
needs: build-library
steps:
- uses: actions/checkout@v3
- name: Set up Java
uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '17'
distribution: 'adopt'
cache: 'gradle'
- name: Change wrapper permissions
run: chmod +x micronautpi4j-utils/gradlew
run: chmod +x pi4micronaut-utils/gradlew
- name: Publish Library
working-directory: micronautpi4j-utils
working-directory: pi4micronaut-utils
env:
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }}
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.PGP_SECRET }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.PGP_PASSPHRASE }}
run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository --no-daemon
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
GPG_KEY: ${{ secrets.GPG_KEY }}
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
run: ./gradlew clean publish --info
14 changes: 9 additions & 5 deletions .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@ name: Java CI
run-name: ${{ github.actor }} pushed changes 🚀
on:
push:
branches:
- main
- develop
pull_request:
branches:
-develop
- main
- develop

jobs:
build:
Expand All @@ -18,15 +22,15 @@ jobs:
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '17'
distribution: 'adopt'
- name: Change wrapper permissions
run: chmod +x micronautpi4j-utils/gradlew
run: chmod +x pi4micronaut-utils/gradlew
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: build
build-root-directory: micronautpi4j-utils/
build-root-directory: pi4micronaut-utils/
- name: Execute Gradle build
working-directory: micronautpi4j-utils
working-directory: pi4micronaut-utils
run: ./gradlew build
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ out/
.classpath
.factorypath
*@*
Workflow.png
Pi4Micronaut_logo.png

19 changes: 19 additions & 0 deletions CLA.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Pi4Micronaut Individual Contributor License Agreement

By signing below, you accept and agree to the following terms and conditions for Your present and future Contributions submitted to the Pi4Micronaut project. In return, Pi4Micronaut shall not use Your Contributions in a way that is contrary to the public benefit or inconsistent with the Apache License v. 2.0. Except for the license granted herein to Pi4Micronaut and recipients of software distributed by Pi4Micronaut, You reserve all right, title, and interest in and to Your Contributions.

1. Definitions. "You" (or "Your") shall mean the copyright owner or legal entity authorized by the copyright owner that is making this Agreement with Pi4Micronaut. For legal entities, the entity making a Contribution and all other entities that control, are controlled by, or are under common control with that entity are considered to be a single Contributor. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "Contribution" shall mean any original work of authorship, including any modifications or additions to an existing work, that is intentionally submitted by You to Pi4Micronaut, for inclusion in, or documentation of, any of the products owned, sponsored or managed by Pi4Micronaut (the "Work"). For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to Pi4Micronaut, its employees or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, Pi4Micronaut for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by You as "Not a Contribution."

2. Grant of Copyright License. Subject to the terms and conditions of this CLA, You hereby grant to Pi4Micronaut and to recipients of software distributed by Pi4Micronaut a perpetual, worldwide, non- exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute Your Contributions and such derivative works.

3. Grant of Patent License. Subject to the terms and conditions of this CLA, You hereby grant to Pi4Micronaut and to recipients of software distributed by Pi4Micronaut a perpetual, worldwide, non- exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by You that are necessarily infringed by Your Contribution(s) alone or by combination of Your Contribution(s) with the Work to which such Contribution(s) was submitted. If any entity institutes patent litigation against You or any other entity (including a cross-claim or counterclaim in a lawsuit) alleging that your Contribution, or the Work to which you have contributed, constitutes direct or contributory patent infringement, then any patent licenses granted to that entity under this Agreement for that Contribution or Work shall terminate as of the date such litigation is filed.

4. You represent that you are legally entitled to grant the above license. If your employer(s) has rights to intellectual property that you create that includes your Contributions, you represent that you have received permission to make Contributions on behalf of that employer, that your employer has waived such rights for your Contributions to Pi4Micronaut, or that your employer has executed a separate Corporate CLA with Pi4Micronaut.

5. You represent that each of Your Contributions is Your original creation (see section 7 for submissions on behalf of others). You represent that Your Contribution submissions include complete details of any third-party license or other restriction (including, but not limited to, related patents and trademarks) of which you are personally aware and which are associated with any part of Your Contributions.

6. You are not expected to provide support for Your Contributions, except to the extent You desire to provide support. You may provide support for free, for a fee, or not at all. Unless required by applicable law or agreed to in writing, You provide Your Contributions on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON- INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE.

7. Should You wish to submit work that is not Your original creation, You may submit it to Pi4Micronaut separately from any Contribution, identifying the complete details of its source and of any license or other restriction (including, but not limited to, related patents, trademarks, and license agreements) of which you are personally aware, and conspicuously marking the work as "Submitted on behalf of a third-party: [named here]".

8. You agree to notify Pi4Micronaut of any facts or circumstances of which you become aware that would make these representations inaccurate in any respect.
Binary file added Pi4Micronaut_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
53 changes: 45 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,53 @@
## Micronaut 3.7.2 Documentation
![Pi4Micronaut-Header](Pi4Micronaut_logo.png)

- [User Guide](https://docs.micronaut.io/3.7.2/guide/index.html)
- [API Reference](https://docs.micronaut.io/3.7.2/api/index.html)
- [Configuration Reference](https://docs.micronaut.io/3.7.2/guide/configurationreference.html)
- [Micronaut Guides](https://guides.micronaut.io/index.html)
## Overview

---
Pi4Micronaut is an innovative Java library crafted for developers who aim to build Internet of Things (IoT) applications leveraging the Raspberry Pi platform. This software is designed to run directly on the Raspberry Pi, providing an interface between the high-level Micronaut framework and the low-level hardware control provided by Pi4J. It serves as a vital tool for Java developers who wish to create sophisticated IoT solutions that interact with various sensors and electronic components. By abstracting the complexity of hardware interactions, Pi4Micronaut allows developers to focus on crafting business logic and features, making it easier to bring IoT applications from concept to deployment rapidly.

- [Shadow Gradle Plugin](https://plugins.gradle.org/plugin/com.github.johnrengelman.shadow)
The existence of Pi4Micronaut is justified by the need for a robust, scalable, and efficient way to bridge the gap between enterprise-grade software and the physical world of hardware. It is particularly valuable for projects that demand both the high-performance, microservices-oriented capabilities of the Micronaut framework and the versatile hardware interaction that the Raspberry Pi offers. Whether it's for home automation, industrial monitoring, or educational purposes, Pi4Micronaut empowers developers to deliver reliable and sophisticated IoT applications that can run headless on a Raspberry Pi or be managed remotely, providing convenience, control, and customization to the end-users.

### Information

- **Source Code:** <https://github.com/oss-slu/Pi4Micronaut/>
- **Client** Jeff Brown - Unity Foundation
- **Current Tech Lead:** [Ruthvik Mannem](https://github.com/ruthvikm)
- **Developers:**
- [Adrian Swindle](https://github.com/SwindleA) (capstone)
- [Alex Delgado](https://github.com/adelgadoj3) (capstone)
- [Joe Folen](https://github.com/joefol) (capstone)
- [John Yanev](https://github.com/jyanev) (capstone)
- [Greih Murray](https://github.com/GreihMurray) (alumni)
- [Austin Howard](https://github.com/austinjhoward) (alumni)
- [Traison Diedrich](https://github.com/traison-diedrich) (alumni)
- [Sinuo Liu](https://github.com/liusinuo2000) (alumni)

- **Start Date:** August 2022
- **Adoption Date:** August 2022
- **Technologies Used:**
- Java
- Micronaut Framework
- Pi4J Library
- **Type:** IOT (Raspberry Pi)
- **License:** [Apache License 2.0](https://opensource.org/license/apache-2-0/)

## Feature http-client documentation

## Pi4Micronaut
- [Link to Pi4Micronaut Documentation](https://oss-slu.github.io/Pi4Micronaut/)
- [API Reference](https://oss-slu.github.io/Pi4Micronaut/javadoc/index.html)

### Architecture Diagram
![Pi4Micronaut.png](Workflow.png)

## Micronaut 3.7.3
- [Micronaut 3.7.3 User Guide](https://micronaut-projects.github.io/micronaut-docs-mn3/3.7.3/guide/index.html)
- [Micronaut Guides](https://docs.micronaut.io/latest/guide/index.html)
- [Micronaut HTTP Client documentation](https://docs.micronaut.io/latest/guide/index.html#httpClient)

## Pi4J 2.4.0
- [Pi4j Documenttion](https://pi4j.com/documentation/)

## Shadow Gradle 7.1.2
- [Shadow Gradle Plugin](https://plugins.gradle.org/plugin/com.github.johnrengelman.shadow)

## Pi4Micronaut Contributor License Agreement
- [Link to CLA](CLA.md)
Binary file added Workflow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions components/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id("com.github.johnrengelman.shadow") version "7.1.2"
id("io.micronaut.application") version "3.0.2"
id("io.micronaut.application") version "3.7.3"
}

version = "0.1"
Expand All @@ -14,16 +14,16 @@ dependencies {
annotationProcessor "io.micronaut:micronaut-inject-java"
annotationProcessor "io.micronaut:micronaut-validation"
implementation("io.micronaut:micronaut-validation")
implementation project(":micronautpi4j-utils")
implementation project(":pi4micronaut-utils")
}


application {
mainClass.set("com.opensourcewithslu.components.Application")
}
java {
sourceCompatibility = JavaVersion.toVersion("11")
targetCompatibility = JavaVersion.toVersion("11")
sourceCompatibility = JavaVersion.toVersion("17")
targetCompatibility = JavaVersion.toVersion("17")
}

micronaut {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
package com.opensourcewithslu.components.controllers;

import com.opensourcewithslu.outputdevices.ActiveBuzzerHelper;
import com.pi4j.io.pwm.Pwm;
import io.micronaut.http.annotation.Controller;
import io.micronaut.http.annotation.Get;
import jakarta.inject.Named;

@Controller("/active-buzzer")
public class ActiveBuzzerController {

private final ActiveBuzzerHelper activeBuzzerHelper;

public ActiveBuzzerController(@Named("active-buzzer") Pwm activeBuzzerOutput){
this.activeBuzzerHelper = new ActiveBuzzerHelper(activeBuzzerOutput);
}

/**
* Enables the active buzzer
*/
@Get("/enable")
public void enableActiveBuzzer(){

activeBuzzerHelper.activeBuzzerOn();

}

/**
* Disables the active buzzer
*/

@Get("/disable")
public void disableActiveBuzzer(){

activeBuzzerHelper.activeBuzzerOff();

}

/**
* Emits an beep sound from the active buzzer.
*/
@Get("/beepTone")
public void playBeepTone(){

activeBuzzerHelper.beep();

}

/**
* Emits an intermittent tone from the active buzzer for a duration of 20 seconds.
* 10 seconds of sound and 10 seconds of silence
*/
@Get("/intermittentTone")
public void playIntermittentTone(){

activeBuzzerHelper.intermittentTone();

}

/**
* Tests the active buzzer by emitting the word "pi" in morse code.
*/
@Get("/morseCode")
public void morseCodeTest(){

activeBuzzerHelper.morseCodeTone();
}
}
Loading

0 comments on commit ff726d3

Please sign in to comment.