From e5b6ad0a604bd5f7c474d82e389f4f7cf62d9ea0 Mon Sep 17 00:00:00 2001 From: Joe Folen Date: Thu, 19 Oct 2023 16:46:04 -0500 Subject: [PATCH] Updated documentation adoc. --- .../inputComponents/pushButton.adoc | 54 ++++++++++++++++--- 1 file changed, 46 insertions(+), 8 deletions(-) diff --git a/micronautpi4j-utils/src/docs/asciidoc/components/inputComponents/pushButton.adoc b/micronautpi4j-utils/src/docs/asciidoc/components/inputComponents/pushButton.adoc index 2bd6a7bf..e26bbd91 100644 --- a/micronautpi4j-utils/src/docs/asciidoc/components/inputComponents/pushButton.adoc +++ b/micronautpi4j-utils/src/docs/asciidoc/components/inputComponents/pushButton.adoc @@ -3,22 +3,60 @@ https://github.com/oss-slu/Pi4Micronaut/edit/develop/micronautpi4j-utils/src/docs/asciidoc/components/inputComponents/pushButton.adoc[Improve this doc] ===== Overview -... +This document provides details of the Push Button circuit, +including its components, assembly instructions, and functionality. ===== Components -... - -===== Assembly Instructions -... +. LED light +. Push button +. 1 x 10Ω resistor +. 1 x 220Ω resistor +. Breadboard +. Jumper wires +. Power source ===== Circuit Diagram -... +Model: + +* Note the 220Ω resistor is for the LED and the 10Ω for the button. + +image::https://docs.sunfounder.com/projects/raphael-kit/en/latest/_images/image152.png[] + + + +Circuit Diagram: + +image::https://docs.sunfounder.com/projects/raphael-kit/en/latest/_images/image303.png[] ===== Functionality -... +A push of the button turns the LED light on and another push turns it off. ===== Troubleshooting -... +. LED not lighting up: Check all connections, ensure the LED is placed correctly, +and check the power source. +. LED is too dim: The resistor value might be too high. Ensure you're using the correct resistors or +adjust according to your power source and LED specifications + +===== YAML Pin Order +The order for declaring the pin for the LED is as follows: + +[source, yaml] +---- +digital-output: + led: + address: 17 +---- +So the LED would be connected to GPIO 17. + +The order for declaring the pin for the push button is as follows: + +[source, yaml] +---- +digital-input: + button-input-3: + address: 18 +---- +So the push button would be connected to GPIO 18. ===== Constructors