diff --git a/components/src/main/java/com/opensourcewithslu/components/controllers/PIRSensorController.java b/components/src/main/java/com/opensourcewithslu/components/controllers/PIRSensorController.java new file mode 100644 index 00000000..defb9557 --- /dev/null +++ b/components/src/main/java/com/opensourcewithslu/components/controllers/PIRSensorController.java @@ -0,0 +1,60 @@ +package com.opensourcewithslu.components.controllers; + +import com.opensourcewithslu.inputdevices.PIRSensorHelper; +import com.opensourcewithslu.outputdevices.RGBLEDHelper; +import com.opensourcewithslu.utilities.MultipinConfiguration; +import com.pi4j.io.gpio.digital.DigitalInput; +import io.micronaut.http.annotation.Controller; +import io.micronaut.http.annotation.Get; +import jakarta.inject.Named; + +/** + * The PIRSensorController class is used with the PIRSensorHelper class and RGBHelper class to implement a PIR motion sensor with an RGB LED light. + */ +@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) { + 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); + } + else { + rgbledHelper.setColor(green); + } + }); + } + + /** + * Disables the controller by removing the event listener and turning off the RGB LED. + */ + @Get("/disable") + public void disablePIRSensor() { + pirSensorHelper.removeEventListener(); + rgbledHelper.ledOff(); + } + +} \ No newline at end of file diff --git a/components/src/main/java/com/opensourcewithslu/components/controllers/PassiveBuzzerController.java b/components/src/main/java/com/opensourcewithslu/components/controllers/PassiveBuzzerController.java new file mode 100644 index 00000000..66ffb612 --- /dev/null +++ b/components/src/main/java/com/opensourcewithslu/components/controllers/PassiveBuzzerController.java @@ -0,0 +1,97 @@ +package com.opensourcewithslu.components.controllers; + +import com.opensourcewithslu.outputdevices.PassiveBuzzerHelper; +import com.pi4j.io.pwm.Pwm; +import io.micronaut.http.annotation.*; +import jakarta.inject.Named; +import java.io.File; + +@Controller("/passive-buzzer") +public class PassiveBuzzerController { + + private final PassiveBuzzerHelper passiveBuzzerHelper; + + protected int passBuzzFreq = 440; + + protected int passBuzzDC = 50; + + public PassiveBuzzerController(@Named("passive-buzzer") Pwm passiveBuzzerOutput){ + this.passiveBuzzerHelper = new PassiveBuzzerHelper(passiveBuzzerOutput); + } + + /** + * Enables passive buzzer + */ + + @Get("/enable") + public void enablePassiveBuzzer(){ + + passiveBuzzerHelper.passiveBuzzerOn(passBuzzDC, passBuzzFreq); + + } + + /** + * Disables passive buzzer + */ + @Get("/disable") + public void disablePassiveBuzzer(){ + + passiveBuzzerHelper.passiveBuzzerOff(); + + } + + /** + * + * Displays the current frequency of the passive buzzer. + */ + + @Get("/showFreq") + public void passiveBuzzerFreq(){ + + passiveBuzzerHelper.getFrequency(); + + } + + /** + * + * Takes one file arg, function will allow use to set their own frequencies + * to be played by the passive buzzer. In order for the frequencies to be played + * the user must do the following: + * - Place their frequencies into a text file with the frequencies separated by commas + * - use the scp command to copy the file over to the raspberrypi + * - (i.e.: scp C:\Users\CompName\filename.txt name@raspberrypiname.local:/home/CompName) + * - Once file is copied over to the pi use the curl -X POST command to play the file + * - (i.e.: curl -X POST "http://localhost:8080/passive-buzzer/setFreq/filename.txt" + */ + + @Post("/setFreq/{frequenciesFile}") + public void defineFrequency(String frequenciesFile){ + passiveBuzzerHelper.setFrequencies(new File(frequenciesFile)); + } + + /** + * Validates the functionality of the passive buzzer + */ + @Get("/passBuzz") + public void singlePassiveBuzz(){ + passiveBuzzerHelper.passiveBuzzTone(); + } + + /** + * Ensures that the passive buzzer can cycle through different frequencies + */ + @Get("/freqIter") + public void passiveFreqIter(){ + passiveBuzzerHelper.toneIterator(); + } + + /** + * Calls toneSequence function to play a pre-defined song. + */ + @Get("/playPiSeq") + public void playPiTone(){ + + passiveBuzzerHelper.piToneSequence(); + + } +} \ No newline at end of file diff --git a/components/src/main/java/com/opensourcewithslu/components/controllers/UltraSonicSensorController.java b/components/src/main/java/com/opensourcewithslu/components/controllers/UltraSonicSensorController.java new file mode 100644 index 00000000..f0023096 --- /dev/null +++ b/components/src/main/java/com/opensourcewithslu/components/controllers/UltraSonicSensorController.java @@ -0,0 +1,57 @@ +package com.opensourcewithslu.components.controllers; + + +import com.opensourcewithslu.inputdevices.UltraSonicSensorHelper; +import com.pi4j.io.gpio.digital.DigitalInput; +import com.pi4j.io.gpio.digital.DigitalOutput; +import io.micronaut.http.annotation.Controller; +import io.micronaut.http.annotation.Get; +import jakarta.inject.Named; + + +@Controller("/ultraSound") +public class UltraSonicSensorController { + + private final UltraSonicSensorHelper ultraSonicSensorHelper; + + public UltraSonicSensorController(@Named("ultra-sonic-trig") DigitalOutput trig, + @Named("ultra-sonic-echo") DigitalInput echo) { + this.ultraSonicSensorHelper = new UltraSonicSensorHelper(trig,echo); + + } + + + /** + * Enables the ultrasonic sensor + */ + @Get("/enable") + public String enableUltraSonicSensor() { + this.ultraSonicSensorHelper.startMeasuring(); + return "Ultra Sonic Sensor Enabled \nIf the distance is constantly Zero, make sure the sensor field of view is clear \n"; + } + + /** + * Returns distance from object in centimeters + */ + @Get("/distance/cm") + public String getDistanceInCentimeter() { + return this.ultraSonicSensorHelper.getDistanceInCentimeter() + " cm\n"; + } + + /** + * Returns distance from object in meters + */ + @Get("/distance/m") + public String getDistanceInMeter() { + return this.ultraSonicSensorHelper.getDistanceInMeters() + " m\n"; + } + + /** + * Disables ultrasonic sensor + */ + @Get("/disable") + public String disableUltrasoundSensor() { + this.ultraSonicSensorHelper.stopMeasuring(); + return "Ultra Sonic Sensor Disabled"; + } +} diff --git a/components/src/main/java/com/opensourcewithslu/components/controllers/lcdController.java b/components/src/main/java/com/opensourcewithslu/components/controllers/lcdController.java index a53b62e5..343f884f 100644 --- a/components/src/main/java/com/opensourcewithslu/components/controllers/lcdController.java +++ b/components/src/main/java/com/opensourcewithslu/components/controllers/lcdController.java @@ -5,45 +5,66 @@ import com.pi4j.io.i2c.I2CConfig; import io.micronaut.http.annotation.Controller; import io.micronaut.http.annotation.Get; +import io.micronaut.http.annotation.PathVariable; import jakarta.inject.Named; -//tag::ex[] +/** + * Controller for managing LCD1602 display operations via HTTP requests. + */ @Controller("/lcd") public class lcdController { private final LCD1602Helper lcdHelper; - public lcdController(@Named("lcd")I2CConfig i2cConfig, Context pi4jContext){ + public lcdController(@Named("lcd") I2CConfig i2cConfig, Context pi4jContext) { this.lcdHelper = new LCD1602Helper(i2cConfig, pi4jContext); } @Get("/write/{text}") - public void writeData(String text){ + public String writeData(@PathVariable String text) { lcdHelper.writeText(text); + return "Text written to LCD: " + text + "\n"; } @Get("/write/{text}/{line}") - public void writeDataAtLine(String text, int line){ + public String writeDataAtLine(@PathVariable String text, @PathVariable int line) { lcdHelper.writeTextAtLine(text, line); + return "Text written to line " + line + ": " + text + "\n"; } - @Get("/backlight/on") - public void backlightOn(){ - lcdHelper.setBackLight(true); + @Get("/write/{text}/{line}/{pos}") + public String writeDataAtPos(@PathVariable String text, @PathVariable int line, @PathVariable int pos) { + lcdHelper.displayTextAtPos(text, line, pos); + return "Text written at line " + line + ", position " + pos + ": " + text + "\n"; } - @Get("/backlight/off") - public void backlightOff(){ - lcdHelper.setBackLight(false); + @Get("/write/character/{charvalue}") + public String writeCharacter(@PathVariable char charvalue) { + lcdHelper.writeCharacter(charvalue); + return "Character '" + charvalue + "' written to LCD\n"; + } + + @Get("/backlight/{state}") + public String setBacklight(@PathVariable String state) { + boolean isOn = "on".equalsIgnoreCase(state); + lcdHelper.setBackLight(isOn); + return "Backlight turned " + (isOn ? "on" : "off") + "\n"; } @Get("/clear/all") - public void clearDisplay(){ + public String clearDisplay() { lcdHelper.clearDisplay(); + return "Display cleared\n"; } @Get("/clear/{line}") - public void clearLine(int line){ + public String clearLine(@PathVariable int line) { lcdHelper.clearLine(line); + return "Line " + line + " cleared\n"; + } + + @Get("/turnOff") + public String turnOff() { + lcdHelper.turnOff(); + return "Display turned off\n"; } } -//end::ex[] \ No newline at end of file diff --git a/components/src/main/resources/application.yml b/components/src/main/resources/application.yml index 7b1ba504..59b97e31 100644 --- a/components/src/main/resources/application.yml +++ b/components/src/main/resources/application.yml @@ -1,6 +1,7 @@ .micronaut: application: name: components + pi4j: # tag::spi[] spi: @@ -10,8 +11,9 @@ pi4j: baud: 500000 # <4> reset-pin: 25 # <5> # end::spi[] + + # tag::pwm[] pwm: - # tag::pwm[] red-pwm: # <1> name: red # <2> address: 17 # <3> @@ -19,7 +21,6 @@ pi4j: provider: pigpio-pwm # <5> initial: 0 # <6> shutdown: 0 # <7> - # end::pwm[] blue-pwm: name: blue address: 18 @@ -41,22 +42,31 @@ pi4j: provider: pigpio-pwm initial: 0 shutdown: 0 + passive-buzzer: + name: passive-buzzer + address: 17 + pwmType: SOFTWARE + provider: pigpio-pwm + initial: 0 + shutdown: 0 + # end::pwm[] + + # tag::i2c[] i2c: - # tag::i2c[] lcd: # <1> name: lcd # <2> bus: 1 # <3> device: 0x27 # <4> - # end::i2c[] + # end::i2c[] + + # tag::digitalInput[] digital-input: - # tag::digitalInput[] photo-resistor-input: # <.> name: Photo Resistor Input # <.> address: 4 # <.> debounce: 100000 # <.> pull: PULL_DOWN # <.> provider: pigpio-digital-input # <.> - # end::digitalInput[] button-input-1: name: Push Button Input address: 16 @@ -93,16 +103,28 @@ pi4j: pull: PULL_DOWN debounce: 200000 provider: pigpio-digital-input - ### DIGITAL OUTPUTS + pir-sensor: + name: PIR Sensor + address: 13 + pull: PULL_DOWN + debounce: 30000 + provider: pigpio-digital-input + ultra-sonic-echo: + name: UltraSonic Sensor Input + address: 24 + pull: PULL_DOWN + debounce: 3000 + provider: pigpio-digital-input + # end::digitalInput[] + + # tag::digitalOutput[] digital-output: - # tag::digitalOutput[] led: # <1> name: LED Output # <2> address: 17 # <3> shutdown: LOW # <4> initial: LOW # <5> provider: pigpio-digital-output # <6> - # end::digitalOutput[] led2: name: LED Output address: 26 @@ -115,6 +137,14 @@ pi4j: shutdown: LOW initial: HIGH provider: pigpio-digital-output + ultra-sonic-trig: + name: UltraSonic Sensor Output + address: 23 + shutdown: LOW + initial: LOW + provider: pigpio-digital-output + # end::digitalOutput[] + # tag::multiInput[] multi-digital-input: # <.> rotary-encoder: # <.> @@ -125,7 +155,6 @@ pi4j: shutdown: LOW # <.> initial: HIGH # <.> provider: pigpio-digital-input # <.> - # end::multiInput[] rotary-encoder-2: name: Rotary Encoder 2 addresses: 12, 16, 20 @@ -134,6 +163,8 @@ pi4j: shutdown: LOW initial: HIGH provider: pigpio-digital-input + # end::multiInput[] + # tag::multipwm[] multi-pwm: rgb-led: # <.> @@ -143,7 +174,16 @@ pi4j: provider: pigpio-pwm # <.> initials: 0, 0, 0 # <.> shutdowns: 0, 0, 0 # <.> - # end::multipwm[] + rgb-led-2: + name: RGB LED 2 + addresses: 18, 27, 22 + pwmTypes: SOFTWARE, SOFTWARE, SOFTWARE + provider: pigpio-pwm + initials: 0, 0, 0 + shutdowns: 0, 0, 0 + # end::multipwm[] + + # clk: # name: CLK Output # address: 23 diff --git a/pi4micronaut-utils/build.gradle b/pi4micronaut-utils/build.gradle index 01c0554f..a7655821 100644 --- a/pi4micronaut-utils/build.gradle +++ b/pi4micronaut-utils/build.gradle @@ -35,6 +35,8 @@ java { targetCompatibility = JavaVersion.toVersion("17") } +tasks.build.dependsOn tasks.shadowJar + tasks.named('build').configure { dependsOn 'javadoc' copy { @@ -77,7 +79,7 @@ artifacts { publishing { repositories { - maven { //only for users registered in Sonatype after 24 Feb 2021 + maven { name = "OSSRH" credentials { username = project.findProperty('SONATYPE_USERNAME') ?: System.getenv('SONATYPE_USERNAME') @@ -93,7 +95,7 @@ publishing { mavenJava(MavenPublication) { groupId = 'io.github.oss-slu' artifactId = 'pi4micronaut-utils' - version = 'v0.1' + version = 'v1.0' from components.java artifact sourcesJar diff --git a/pi4micronaut-utils/src/docs/asciidoc/Introduction/gettingStarted.adoc b/pi4micronaut-utils/src/docs/asciidoc/Introduction/buildAndRun.adoc similarity index 66% rename from pi4micronaut-utils/src/docs/asciidoc/Introduction/gettingStarted.adoc rename to pi4micronaut-utils/src/docs/asciidoc/Introduction/buildAndRun.adoc index fe39eaae..6ec99014 100644 --- a/pi4micronaut-utils/src/docs/asciidoc/Introduction/gettingStarted.adoc +++ b/pi4micronaut-utils/src/docs/asciidoc/Introduction/buildAndRun.adoc @@ -8,21 +8,13 @@ ifdef::rootpath[] :imagesdir: {rootpath}{imagesdir} endif::rootpath[] -=== Getting Started With Pi4Micronaut! -This section describes how to build and run the jar file from the Pi4Micronaut project on your raspberry pi. - -Note: this is not a tutorial on how to use the Pi4Micronaut library, simply a setup guide. - -==== Prerequisites -. Clone our Github repo onto your system -+ -https://github.com/oss-slu/Pi4Micronaut/tree/main +=== Build and Run the Jar File on Raspberry Pi +This section describes how to build and run the jar file from the Pi4Micronaut project demo on your raspberry pi. ==== Set up Raspberry Pi OS . Start by installing the Raspberry Pi Imager -. To install the Imager, follow this guide by the Raspberry Pi Foundation: -+ -https://www.raspberrypi.com/documentation/computers/getting-started.html#install-using-imager +. To install the Imager, follow this guide by the Raspberry Pi Foundation +https://www.raspberrypi.com/documentation/computers/getting-started.html#install-using-imager[here]. + Note: use the same wifi network for your raspberry pi that your system is connected to . Your configuration should look something like this: @@ -51,10 +43,8 @@ ssh test@raspberrypi-test .. Using the IP address of your Pi: + -Follow the instructions outlined in this article: -+ -https://docs.sunfounder.com/projects/picar-s/en/latest/get_started_with_raspberry_pi.html#get-the-ip-address - +Follow the instructions outlined in this article +https://docs.sunfounder.com/projects/picar-s/en/latest/get_started_with_raspberry_pi.html#get-the-ip-address[here]. ==== Installing Java . First, make sure your Raspberry Pi's package list is up-to-date by running the following commands in your Pi's terminal: @@ -86,53 +76,62 @@ sudo apt-get install pigpio ==== Build and Copy Over Jar File . Open your terminal of choice -. Navigate to the Pi4Micronaut root directory +. Navigate to the project root directory . Enter the following command into the terminal to build the jar file: + [source, bash] ---- ./gradlew build ---- -. The necessary components jar file can be found under "../Pi4Micronaut/components/build/libs/" ++ +image:build.png[] +. The necessary jar file can be found under "Demo_Pi4Micronaut/build/libs/Demo_Pi4Micronaut-0.1-all.jar" ++ +image:Locate_Jar_File.png[] . Once you have navigated to this directory, enter the following command: + [source, bash] ---- -scp components-0.1-all.jar {username}@{hostname}:~ +scp Demo_Pi4Micronaut-0.1-all.jar {username}@{hostname}:~ ---- + -.. Following our configuration from earlier, this would look like +.. Here is an example command, that looks like + [source, bash] ---- -scp components-0.1-all.jar test@raspberrypi-test:~ +scp Demo_Pi4Micronaut-0.1-all.jar test@raspberrypi-test:~ ---- ++ +image:Copying_Jar_File_To_Pi.png[] ==== Almost Done! -. To test if you've set up Pi4Micronaut correctly on your raspberry pi, we have some sample commands for you run. -. Open a new Windows Powershell and ssh into your raspberry pi. +. To test if you've set up everything correctly on your raspberry pi, we have some sample commands for you to run. +. Open a new terminal and ssh into your raspberry pi. . Enter the following command to run the jar file: + [source, bash] ---- -sudo java -jar components-0.1-all.jar +sudo java -jar Demo_Pi4Micronaut-0.1-all.jar ---- + The output should look like this: + -image::running_jar.png[] +image:SSH_to_Pi_And_Run_Jar_File.png[] + With this, a Micronaut localhost server will start running on your machine +. Let's test the https://oss-slu.github.io/Pi4Micronaut/#_led[LED] component which you have setup. + +. After getting everything set up, open up a new terminal and ssh into your pi once more. -. Let's test one of the components. Take a look at our documentation for setting up the LED component: -+ -https://oss-slu.github.io/Pi4Micronaut/#_led -. After getting everything set up, open up a new PowerShell and ssh into your pi once more. . Enter the following command to test the turn on function for an LED light: + -"curl http://localhost:8080/led/ledOn" -. If this command works and the LED has lit up, congratulations! You have successfully built and run one of our components! +[source, bash] +---- +curl http://localhost:8080/led/ledOn +---- + +. If this command works and the LED has lit up, congratulations! You have successfully built and ran one of our components! ==== Enabling Different Communication Protocols . In the Pi4Micronaut library, we have used different communication protocols, such as I2C, SPI, etc. diff --git a/pi4micronaut-utils/src/docs/asciidoc/Introduction/howToUsePi4Micronaut.adoc b/pi4micronaut-utils/src/docs/asciidoc/Introduction/howToUsePi4Micronaut.adoc new file mode 100644 index 00000000..0b5c61cf --- /dev/null +++ b/pi4micronaut-utils/src/docs/asciidoc/Introduction/howToUsePi4Micronaut.adoc @@ -0,0 +1,72 @@ +:imagesdir: img/ + +ifndef::rootpath[] +:rootpath: ../ +endif::rootpath[] + +ifdef::rootpath[] +:imagesdir: {rootpath}{imagesdir} +endif::rootpath[] + + +=== How to use the Pi4Micronaut library + +This section will walk you through the process of creating a basic +Micronaut application and the configuration for developing +with Pi4Micronaut. As a demo, this will include the configuration and sample code. + +==== Creating A Micronaut Project +. Go to Micronaut's website https://micronaut.io/launch/[here]. +. Make sure you have selected Micronaut version 3.10.1 or lower with Java version 17. +. Click Generate Project and download the zip. +. Export the contents of the zip file and open it in IntelliJ or any IDE of your choice. ++ +It should look like: +image:Using_Micronaut.png[] + +==== Add Dependency +. Go to the build.gradle file and find the dependencies. +. Add the Pi4Micronaut dependency to the list. ++ +[source, gradle] +---- +implementation("io.github.oss-slu:pi4micronaut-utils:v1.0:all") +---- ++ +It should look like: +image:Adding_Dependency.png[] + +==== Setup Configuration +. Go to the application.yml file and add the configuration of your circuit setup: ++ +path: Demo_Pi4Micronaut/src/main/resources/application.yml +. Create a new tree in the yml file as shown below. ++ +[source, yaml] +---- +pi4j: + digital-output: + led: + name: LED + address: 17 + shutdown: LOW + initial: LOW + provider: pigpio-digital-output +---- ++ +Here we are specifying a led as a digital output type with name LED, address 17, etc. +For more information on the LED setup guide, see our documentation https://oss-slu.github.io/Pi4Micronaut/#_led[here]. ++ +It should look like: +image:Add_Configuration.png[] + +==== Creating Component Class +. Create a new class in the project's src directory as shown below. ++ +path: Demo_Pi4Micronaut/src/main/java/com.demoPi4Micronaut ++ +This is where you use the implemented LED functions from Pi4Micronaut library. + +. Our example code is: ++ +image:Add_Class.png[] diff --git a/pi4micronaut-utils/src/docs/asciidoc/Introduction/supportedHardware.adoc b/pi4micronaut-utils/src/docs/asciidoc/Introduction/supportedHardware.adoc index ef2d1b2d..e2f51f88 100644 --- a/pi4micronaut-utils/src/docs/asciidoc/Introduction/supportedHardware.adoc +++ b/pi4micronaut-utils/src/docs/asciidoc/Introduction/supportedHardware.adoc @@ -1,4 +1,4 @@ -=== Currently Supported Hardware +== Currently Supported Hardware [.text-right] https://github.com/oss-slu/Pi4Micronaut/edit/develop/micronautpi4j-utils/src/docs/asciidoc/Introduction/supportedHardware.adoc[Improve this doc] @@ -10,7 +10,12 @@ We plan on offering support for many more hardware components in the future. If * Slide Switch * Rotary Encoder * RFID Scanner -* LEDs -* RGB LEDs -* LCDs -* Photosensors \ No newline at end of file +* LED +* RGB LED +* LCD Screen +* Photosensor +* Touch Switch Sensor +* Active Buzzer +* Passive Buzzer +* PIR Motion Sensor +* Ultrasonic Sensor \ No newline at end of file diff --git a/pi4micronaut-utils/src/docs/asciidoc/components/outputComponents/lcd1602.adoc b/pi4micronaut-utils/src/docs/asciidoc/components/outputComponents/lcd1602.adoc index d039c65e..693ba2dc 100644 --- a/pi4micronaut-utils/src/docs/asciidoc/components/outputComponents/lcd1602.adoc +++ b/pi4micronaut-utils/src/docs/asciidoc/components/outputComponents/lcd1602.adoc @@ -14,7 +14,7 @@ endif::rootpath[] https://github.com/oss-slu/Pi4Micronaut/edit/develop/micronautpi4j-utils/src/docs/asciidoc/components/outputComponents/lcdScreen.adoc[Improve this doc] ===== Overview -This section provides details of the LCD1602 (Liquid Crystal Display) circuit, including its components, assembly instructions, and functionality. The LCD1602 is a kind of dot matrix module that can show letters, numbers, and other characters. The number 1602 describes the display: 2 rows with 16 characters per row. +This section provides details of the LCD1602 (Liquid Crystal Display) circuit, including its components, assembly instructions, and functionality. The LCD1602 is a kind of dot matrix module that can show letters, numbers, and other characters. The number 1602 describes the display: 2 rows with 16 characters per row. NOTE: The LCD display only works on the 32 bit version of Raspberry Pi OS. ===== Components . LCD1602 @@ -100,6 +100,11 @@ e. Exit the configuration tool and reboot the Raspberry Pi with the following co $ sudo reboot ................. +3. Make sure you are using the 32 bit version of Raspberry Pi OS. The below command should return `armv71` if running the 32 bit OS. +................. +$ uname -m +................. + ===== YAML LCD1602 uses I2C communication for this circuit and configuration in the application.yml file is as follows [source, yaml] diff --git a/pi4micronaut-utils/src/docs/asciidoc/img/Add_Class.png b/pi4micronaut-utils/src/docs/asciidoc/img/Add_Class.png new file mode 100644 index 00000000..be33a23b Binary files /dev/null and b/pi4micronaut-utils/src/docs/asciidoc/img/Add_Class.png differ diff --git a/pi4micronaut-utils/src/docs/asciidoc/img/Add_Configuration.png b/pi4micronaut-utils/src/docs/asciidoc/img/Add_Configuration.png new file mode 100644 index 00000000..24a27d33 Binary files /dev/null and b/pi4micronaut-utils/src/docs/asciidoc/img/Add_Configuration.png differ diff --git a/pi4micronaut-utils/src/docs/asciidoc/img/Adding_Dependency.png b/pi4micronaut-utils/src/docs/asciidoc/img/Adding_Dependency.png new file mode 100644 index 00000000..77911810 Binary files /dev/null and b/pi4micronaut-utils/src/docs/asciidoc/img/Adding_Dependency.png differ diff --git a/pi4micronaut-utils/src/docs/asciidoc/img/Copying_Jar_File_To_Pi.png b/pi4micronaut-utils/src/docs/asciidoc/img/Copying_Jar_File_To_Pi.png new file mode 100644 index 00000000..e75d1d64 Binary files /dev/null and b/pi4micronaut-utils/src/docs/asciidoc/img/Copying_Jar_File_To_Pi.png differ diff --git a/pi4micronaut-utils/src/docs/asciidoc/img/Locate_Jar_File.png b/pi4micronaut-utils/src/docs/asciidoc/img/Locate_Jar_File.png new file mode 100644 index 00000000..59408200 Binary files /dev/null and b/pi4micronaut-utils/src/docs/asciidoc/img/Locate_Jar_File.png differ diff --git a/pi4micronaut-utils/src/docs/asciidoc/img/SSH_to_Pi_And_Run_Jar_File.png b/pi4micronaut-utils/src/docs/asciidoc/img/SSH_to_Pi_And_Run_Jar_File.png new file mode 100644 index 00000000..6b340cda Binary files /dev/null and b/pi4micronaut-utils/src/docs/asciidoc/img/SSH_to_Pi_And_Run_Jar_File.png differ diff --git a/pi4micronaut-utils/src/docs/asciidoc/img/Using_Micronaut.png b/pi4micronaut-utils/src/docs/asciidoc/img/Using_Micronaut.png new file mode 100644 index 00000000..9e71623f Binary files /dev/null and b/pi4micronaut-utils/src/docs/asciidoc/img/Using_Micronaut.png differ diff --git a/pi4micronaut-utils/src/docs/asciidoc/img/build.png b/pi4micronaut-utils/src/docs/asciidoc/img/build.png new file mode 100644 index 00000000..799e17cb Binary files /dev/null and b/pi4micronaut-utils/src/docs/asciidoc/img/build.png differ diff --git a/pi4micronaut-utils/src/docs/asciidoc/index.adoc b/pi4micronaut-utils/src/docs/asciidoc/index.adoc index b5d18e10..ec4c45d9 100644 --- a/pi4micronaut-utils/src/docs/asciidoc/index.adoc +++ b/pi4micronaut-utils/src/docs/asciidoc/index.adoc @@ -20,12 +20,14 @@ link:javadoc/index.html[API References] include::introduction.adoc[] -include::Introduction/supportedHardware.adoc[] +include::Introduction/howToUsePi4Micronaut.adoc[] -include::Introduction/gettingStarted.adoc[] +include::Introduction/buildAndRun.adoc[] include::Introduction/exampleApplications.adoc[] +include::Introduction/supportedHardware.adoc[] + include::contribute/contributingToLibrary.adoc[] include::contribute/newComponent.adoc[] diff --git a/pi4micronaut-utils/src/docs/javadoc/allclasses-index.html b/pi4micronaut-utils/src/docs/javadoc/allclasses-index.html index 4b00ae42..fef0cb67 100644 --- a/pi4micronaut-utils/src/docs/javadoc/allclasses-index.html +++ b/pi4micronaut-utils/src/docs/javadoc/allclasses-index.html @@ -1,7 +1,7 @@ - + All Classes and Interfaces (pi4micronaut-utils v1.0 API) @@ -9,7 +9,6 @@ - @@ -24,7 +23,7 @@