-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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]>
- Loading branch information
1 parent
c5074a6
commit dcfeb52
Showing
3 changed files
with
87 additions
and
4 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
components/src/main/java/com/opensourcewithslu/components/controllers/LEDController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.opensourcewithslu.components.controllers; | ||
|
||
import com.opensourcewithslu.outputdevices.LEDHelper; | ||
import com.pi4j.io.gpio.digital.DigitalOutput; | ||
import io.micronaut.http.annotation.Controller; | ||
import io.micronaut.http.annotation.Get; | ||
import jakarta.inject.Named; | ||
|
||
|
||
@Controller("/led") | ||
public class LEDController { | ||
private final LEDHelper ledHelper; | ||
|
||
|
||
public LEDController(@Named("Led")DigitalOutput led){ | ||
this.ledHelper = new LEDHelper(led); | ||
} | ||
|
||
@Get("/LEDOn") | ||
public void checkLed(){ | ||
/*deviceOff method turns on the LED after checking the output. This | ||
will turn on the LED | ||
*/ | ||
|
||
ledHelper.deviceOff(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.