Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #221 Joss Paper #222

Closed
wants to merge 66 commits into from
Closed
Show file tree
Hide file tree
Changes from 63 commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
e9d836d
PIR sensor implementation Issue #166 (#181)
joefol Mar 6, 2024
93b426e
Fixed Integration Bugs (#187)
ruthvikm Mar 13, 2024
0b2c4e5
Fixed javadoc errors (#189)
ruthvikm Mar 13, 2024
470c828
Javadoc errors (#190)
ruthvikm Mar 13, 2024
375d03a
Passive Buzzer Implementation (#182)
adelgadoj3 Mar 13, 2024
456cc0d
Adoc Updates (#188)
joefol Mar 14, 2024
6d69089
Fixes LCD - closes issue #116 (#184)
SwindleA Mar 14, 2024
b978c70
outlined ultrasound sensor component (#185)
jyanev Mar 14, 2024
26c0345
Updating develop (#193)
ruthvikm Mar 14, 2024
45c121d
Revert "Updating develop (#193)" (#194)
ruthvikm Mar 14, 2024
4613396
updating develop to avoid conflicts
ruthvikm Mar 14, 2024
60a96ca
Merge pull request #195 from oss-slu/upd_dev
ruthvikm Mar 14, 2024
d2180d7
added documentation for ultrasonic sensor
jyanev Mar 18, 2024
582af01
Starting touch switch documentation
joefol Mar 18, 2024
fb7e973
added updated circuit images
joefol Mar 18, 2024
3f5bb2f
fixed issues w documentation
jyanev Mar 18, 2024
038e646
Merge pull request #205 from oss-slu/issue-196-new
jyanev Mar 18, 2024
b97a303
Merge branch 'develop' into issue_199
joefol Mar 18, 2024
66cdf0f
further updates to touch switch documentation
joefol Mar 18, 2024
e9591fc
further further updates to touch switch documentation
joefol Mar 20, 2024
82edf5b
final updates to touch switch adoc
joefol Mar 20, 2024
30877d6
final final updates to touch switch adoc
joefol Mar 20, 2024
0b73782
addresses yml change in adoc
joefol Mar 21, 2024
299dcf2
Fixed unsatisfied dependency
ruthvikm Mar 21, 2024
08ca073
grammar fix
ruthvikm Mar 21, 2024
143469a
Merge pull request #206 from oss-slu/issue_199
ruthvikm Mar 21, 2024
6d86563
Merge branch 'develop' into dependency_fix
ruthvikm Mar 21, 2024
9eae67e
Merge pull request #213 from oss-slu/dependency_fix
ruthvikm Mar 21, 2024
befac3b
Architecture diagram update. Issue 209 (#215)
joefol Mar 23, 2024
f86dd92
deleted sections 4,5 from documentation; added descriptions for i2c, …
jyanev Mar 23, 2024
6829291
197 active buzzer documentation (#214)
adelgadoj3 Mar 25, 2024
ac620b3
Passive Buzzer Documentation (#208)
adelgadoj3 Mar 25, 2024
117775e
PIR Sensor Documentation- fixes issue #200 (#216)
SwindleA Mar 27, 2024
311fc53
added desc for debounce in digitalinput adoc
jyanev Mar 27, 2024
857cac7
Fixes #211 Blink Functionality for LED (#220)
adelgadoj3 Apr 3, 2024
2bdcc5d
Created basis for JOSS submission.
adelgadoj3 Apr 3, 2024
9b60709
updated issue-201; made changes to adocs
jyanev Apr 3, 2024
5836618
added notes for what needs to be done in the paper
SwindleA Apr 5, 2024
11f2ec5
draft paper
SwindleA Apr 8, 2024
89e368b
updated component adocs
jyanev Apr 8, 2024
5c7f2fb
Merge branch 'develop' into issue-201
jyanev Apr 8, 2024
71bbcdf
fixed typos
jyanev Apr 8, 2024
afaf83d
Merge branch 'issue-201' of https://github.com/oss-slu/Pi4Micronaut i…
jyanev Apr 8, 2024
5effdd8
fixed typos
jyanev Apr 8, 2024
85afcc7
corrections to adocs
jyanev Apr 9, 2024
3cc178c
small edits to adocs
jyanev Apr 9, 2024
d823dc0
Config Workflow Diagram in adoc. Issue #210 (#219)
joefol Apr 10, 2024
ddd821f
final updates to adocs
jyanev Apr 10, 2024
b441892
Merge branch 'develop' into issue-201
ruthvikm Apr 10, 2024
70719f0
Fixed few documentation bugs
ruthvikm Apr 10, 2024
46a3c14
Fixed few more bugs
ruthvikm Apr 10, 2024
809603b
added info for components
ruthvikm Apr 10, 2024
59cc447
adjusted TOC width
ruthvikm Apr 10, 2024
d3c7778
draft of paper
SwindleA Apr 10, 2024
056e7f0
Merge pull request #218 from oss-slu/issue-201
jyanev Apr 10, 2024
4e0aa2e
paper draft 2.23472
SwindleA Apr 10, 2024
9951e24
fixed rfid adoc (#226)
ruthvikm Apr 10, 2024
6a7b461
draft 3 of paper
SwindleA Apr 17, 2024
cbf2934
paper draft with bib file
SwindleA Apr 17, 2024
8147b26
Merge branch 'develop' into 221-joss-paper
SwindleA Apr 17, 2024
01a2369
typo in bib. removed comments in paper
SwindleA Apr 17, 2024
fcc7454
paper: added more detail on pi4micronaut, adjusted the authors, added…
SwindleA Apr 18, 2024
fa66787
listed links as bullet points,add mention of examples,added thanks to…
SwindleA Apr 18, 2024
d5c25ad
draft progress
SwindleA Apr 29, 2024
7c7d030
resolved dr.holdener comments
SwindleA May 6, 2024
c859ed1
added architecture diagram
SwindleA May 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ out/
.classpath
.factorypath
*@*
Workflow.png
Workflow_Diagram.png
Pi4Micronaut_logo.png
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ The existence of Pi4Micronaut is justified by the need for a robust, scalable, a
- [API Reference](https://oss-slu.github.io/Pi4Micronaut/javadoc/index.html)

### Architecture Diagram
![Pi4Micronaut.png](Workflow.png)
![Pi4Micronaut.png](Workflow_Diagram.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)
Expand Down
Binary file removed Workflow.png
Binary file not shown.
Binary file added Workflow_Diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import io.micronaut.http.annotation.Get;
import jakarta.inject.Named;

//tag::ex[]
@Controller("/active-buzzer")
public class ActiveBuzzerController {

Expand Down Expand Up @@ -37,7 +38,7 @@ public void disableActiveBuzzer(){
}

/**
* Emits an beep sound from the active buzzer.
* Emits a beep sound from the active buzzer.
*/
@Get("/beepTone")
public void playBeepTone(){
Expand Down Expand Up @@ -65,4 +66,5 @@ public void morseCodeTest(){

activeBuzzerHelper.morseCodeTone();
}
}
}
//end::ex[]
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import io.micronaut.http.annotation.Get;
import jakarta.inject.Named;

//tag::ex[]
@Controller("/led")
public class LEDController {
private final LEDHelper ledHelper;
Expand All @@ -28,4 +29,10 @@ public void ledOff(){
public void switchState(){
ledHelper.switchState();
}

@Get("/blink/{duration}/")
public void blink(int duration){
ledHelper.blink(duration);
}
}
//end::ex[]
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.opensourcewithslu.inputdevices.PIRSensorHelper;
import com.opensourcewithslu.outputdevices.RGBLEDHelper;
import com.opensourcewithslu.utilities.MultipinConfiguration;
import com.opensourcewithslu.utilities.MultiPinConfiguration;
import com.pi4j.io.gpio.digital.DigitalInput;
import io.micronaut.http.annotation.Controller;
import io.micronaut.http.annotation.Get;
Expand All @@ -11,33 +11,28 @@
/**
* The PIRSensorController class is used with the PIRSensorHelper class and RGBHelper class to implement a PIR motion sensor with an RGB LED light.
*/

//tag::ex[]
@Controller("/pirSensor")
public class PIRSensorController {

private final PIRSensorHelper pirSensorHelper;

private final RGBLEDHelper rgbledHelper;

/**
* The PirSensorController constructor.
* @param pirSensor A Pi4J DigitalInput object.
* @param rgbLed A MultiPinConfiguration object.
*/
public PIRSensorController(@Named("pir-sensor")DigitalInput pirSensor,
@Named("rgb-led-2")MultipinConfiguration rgbLed) {
public PIRSensorController(@Named("pir-sensor") DigitalInput pirSensor, @Named("rgb-led-2") MultiPinConfiguration rgbLed) {
this.pirSensorHelper = new PIRSensorHelper(pirSensor);
this.rgbledHelper = new RGBLEDHelper(rgbLed);
}

/**
* Enables the PIR sensor by adding an event listener which sets the RGB LED to red when movement is detected and green otherwise.
*/
@Get("/enable")
public void enablePIRSensor() {

int[] red = {255,0,0};
int[] green = {0,255,0};

pirSensorHelper.addEventListener(e -> {
if (pirSensorHelper.isMoving) {
rgbledHelper.setColor(red);
Expand All @@ -47,7 +42,6 @@ public void enablePIRSensor() {
}
});
}

/**
* Disables the controller by removing the event listener and turning off the RGB LED.
*/
Expand All @@ -56,5 +50,5 @@ public void disablePIRSensor() {
pirSensorHelper.removeEventListener();
rgbledHelper.ledOff();
}

}
}
//end::ex[]
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import jakarta.inject.Named;
import java.io.File;

//tag::ex[]
@Controller("/passive-buzzer")
public class PassiveBuzzerController {

Expand Down Expand Up @@ -94,4 +95,5 @@ public void playPiTone(){
passiveBuzzerHelper.piToneSequence();

}
}
}
//end::ex[]
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.opensourcewithslu.components.controllers;

import com.opensourcewithslu.inputdevices.RotaryEncoderHelper;
import com.opensourcewithslu.utilities.MultipinConfiguration;
import com.opensourcewithslu.utilities.MultiPinConfiguration;
import io.micronaut.http.annotation.Controller;
import io.micronaut.http.annotation.Get;
import jakarta.inject.Named;
Expand All @@ -11,7 +11,7 @@
public class RotaryEncoderController {
private final RotaryEncoderHelper encoderHelper;

public RotaryEncoderController(@Named("rotary-encoder")MultipinConfiguration rotaryEncoder){
public RotaryEncoderController(@Named("rotary-encoder") MultiPinConfiguration rotaryEncoder){
this.encoderHelper = new RotaryEncoderHelper(rotaryEncoder);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import io.micronaut.http.annotation.Get;
import jakarta.inject.Named;

//tag::ex[]
@Controller("/touchSwitch")
public class TouchSwitchController {

Expand Down Expand Up @@ -37,4 +38,5 @@ public void enableTouchSwitch() {
public void disableTouchSwitch() {
touchSwitchHelper.removeEventListener();
}
}
}
//end::ex[]
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import jakarta.inject.Named;


//tag::ex[]
@Controller("/ultraSound")
public class UltraSonicSensorController {

Expand Down Expand Up @@ -55,3 +56,4 @@ public String disableUltrasoundSensor() {
return "Ultra Sonic Sensor Disabled";
}
}
//end::ex[]
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
/**
* Controller for managing LCD1602 display operations via HTTP requests.
*/
//tag::ex[]
@Controller("/lcd")
public class lcdController {
private final LCD1602Helper lcdHelper;
Expand All @@ -37,10 +38,10 @@ public String writeDataAtPos(@PathVariable String text, @PathVariable int line,
return "Text written at line " + line + ", position " + pos + ": " + text + "\n";
}

@Get("/write/character/{charvalue}")
public String writeCharacter(@PathVariable char charvalue) {
lcdHelper.writeCharacter(charvalue);
return "Character '" + charvalue + "' written to LCD\n";
@Get("/write/character/{charValue}")
public String writeCharacter(@PathVariable char charValue) {
lcdHelper.writeCharacter(charValue);
return "Character '" + charValue + "' written to LCD\n";
}

@Get("/backlight/{state}")
Expand Down Expand Up @@ -68,3 +69,4 @@ public String turnOff() {
return "Display turned off\n";
}
}
//end::ex[]
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.opensourcewithslu.components.controllers;

import com.opensourcewithslu.outputdevices.RGBLEDHelper;
import com.opensourcewithslu.utilities.MultipinConfiguration;
import com.opensourcewithslu.utilities.MultiPinConfiguration;
import io.micronaut.http.annotation.Controller;
import io.micronaut.http.annotation.Get;
import jakarta.inject.Named;
Expand All @@ -11,7 +11,7 @@
public class rgbController {
private final RGBLEDHelper rgbledHelper;

public rgbController(@Named("rgb-led") MultipinConfiguration rgbLed){
public rgbController(@Named("rgb-led") MultiPinConfiguration rgbLed){
this.rgbledHelper = new RGBLEDHelper(rgbLed);
}

Expand Down
56 changes: 9 additions & 47 deletions components/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,34 +14,13 @@ pi4j:

# tag::pwm[]
pwm:
red-pwm: # <1>
name: red # <2>
address: 17 # <3>
pwmType: SOFTWARE # <4>
provider: pigpio-pwm # <5>
initial: 0 # <6>
shutdown: 0 # <7>
blue-pwm:
name: blue
address: 18
pwmType: SOFTWARE
provider: pigpio-pwm
initial: 0
shutdown: 0
green-pwm:
name: green
address: 27
pwmType: SOFTWARE
provider: pigpio-pwm
initial: 0
shutdown: 0
active-buzzer:
name: active-buzzer
address: 17
pwmType: SOFTWARE
provider: pigpio-pwm
initial: 0
shutdown: 0
active-buzzer: # <1>
name: active-buzzer # <2>
address: 17 # <3>
pwmType: SOFTWARE # <4>
provider: pigpio-pwm # <5>
initial: 0 # <6>
shutdown: 0 # <7>
passive-buzzer:
name: passive-buzzer
address: 17
Expand Down Expand Up @@ -165,7 +144,7 @@ pi4j:
provider: pigpio-digital-input
# end::multiInput[]

# tag::multipwm[]
# tag::multiPWM[]
multi-pwm:
rgb-led: # <.>
name: RGB LED # <.>
Expand All @@ -181,22 +160,5 @@ pi4j:
provider: pigpio-pwm
initials: 0, 0, 0
shutdowns: 0, 0, 0
# end::multipwm[]

# end::multiPWM[]

# clk:
# name: CLK Output
# address: 23
# debounce: 500
# pull: PULL_UP
# shutdown: LOW
# initial: HIGH
# provider: pigpio-digital-input
# dt:
# name: DT Output
# address: 24
# debounce: 500
# pull: PULL_UP
# shutdown: LOW
# initial: HIGH
# provider: pigpio-digital-input
31 changes: 31 additions & 0 deletions joss/paper.bib
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
@article{Jolles,
author = {Jolles, Jolle W.},
journal = {Methods in Ecology and Evolution},
title = {Broad‐scale applications of the Raspberry Pi: A Review and guide for Biologists.},
year = {2021},
pages = {1562-1579},
volume = {12},
doi = {10.1111/2041-210X.13652}

}

@article{Longley,
author = {Longley, Matthew, et al.},
journal = {PeerJ},
title = {An open source device for operant licking in rats.},
year = {2017},
volume = {5},
doi = {10.7717/peerj.2981.}
}


@article{Shah,
author ={ Shah, Neel P., and Priyang Bhatt},
journal ={International Journal of Advanced Research in Computer Science},
title = {Greenhouse Automation and Monitoring System Design and Implementation},
year = {2017},
pages = {468-471},
volume = {8},
doi = {10.26483/ijarcs.v8i9.4981}

}
Loading
Loading