File tree Expand file tree Collapse file tree
pi4micronaut-utils/src/main/java/com/opensourcewithslu Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55import org .slf4j .Logger ;
66import org .slf4j .LoggerFactory ;
77
8+ /**
9+ * Helper for monitoring a reed switch input.
10+ */
811public class ReedSwitchHelper {
912 private static final Logger log = LoggerFactory .getLogger (ReedSwitchHelper .class );
1013
Original file line number Diff line number Diff line change 44import org .slf4j .Logger ;
55import org .slf4j .LoggerFactory ;
66
7+ /**
8+ * Helper for reading thermistor values through an ADC.
9+ */
710public class ThermistorHelper {
811 private static final Logger log = LoggerFactory .getLogger (ThermistorHelper .class );
912 private final Spi spi ; // SPI interface for ADC communication
Original file line number Diff line number Diff line change 66
77import java .util .Map ;
88
9+ /**
10+ * Helper for controlling a four-digit seven-segment display.
11+ */
912public class FourDigitSevenSegmentDisplayHelper {
1013 private static Logger log = LoggerFactory .getLogger (FourDigitSevenSegmentDisplayHelper .class );
1114
Original file line number Diff line number Diff line change @@ -16,9 +16,9 @@ public class LEDHelper {
1616 private final DigitalOutput ledOutput ;
1717
1818 /**
19+ * LEDHelper constructor.
1920 *
20- * LEGHelper constructor.
21- * @param ledOutput An instance of a Pi4J DigitalOutput object.
21+ * @param ledOutput an instance of a Pi4J DigitalOutput object
2222 */
2323 //tag::const[]
2424 public LEDHelper (DigitalOutput ledOutput )
@@ -72,10 +72,9 @@ public void switchState()
7272 }
7373
7474 /**
75+ * Blinks the LED for the specified duration.
7576 *
76- * @param duration blink will take the duration parameter and have the led
77- * blink for that duration.
78- *
77+ * @param duration the duration to blink in milliseconds
7978 */
8079
8180 public void blink (int duration ) {
Original file line number Diff line number Diff line change @@ -62,8 +62,9 @@ public void passiveBuzzerOff(){
6262 }
6363
6464 /**
65+ * Returns the current default frequency for the passive buzzer.
6566 *
66- * Logs the passiveBuzzerFreq to the console
67+ * @return the current default frequency in Hz
6768 */
6869
6970 //tag::method[]
@@ -158,6 +159,11 @@ public void piToneSequence(){
158159 passiveBuzzerOff ();
159160 }
160161
162+ /**
163+ * Sleeps for the specified duration.
164+ *
165+ * @param duration the time to sleep in milliseconds
166+ */
161167 protected void sleep (long duration ){
162168 try {
163169 Thread .sleep (duration ); // Play each frequency for the specified duration
You can’t perform that action at this time.
0 commit comments