Tutorials
Home > Learn > YKRUD2 Setup Guide
YKRUD2 SETUP GUIDE
To get started with the YKRUD2 board follow these steps:
1
Configure Raspberry Pi
2
Connect YKRUD2 board
3
Test it
CONFIGURE THE RASPBERRY PI

To configure Raspberry Pi system to interact with YKRUD2 you need to:

Getting the YKRUD2 Linux scripts

Start by downloading the YKRUD2_Linux_Scripts.zip package, which contains the scripts, available from the YKRUD2 product page.

After download extract the files to a folder of your choosing. In this setup ~/bin folder is used.

$ mkdir ~/bin
$ unzip YKRUD2_Linux_Scripts.zip -d ~/bin/

Configuring the GPIOs

YKRUD2 uses GPIO 17 and 18 to control the RasPi soft-switching and these have to be correctly configured in RasPi operating system.

For more information on the Raspberry Pi GPIOs refer to this page.

To configure the GPIOs the gpio_setup.sh bash script should be executed.

The GPIOs should be configured automatically during the boot process. To ensure this add the following line to the /etc/rc.local script in your system.

bash /home/user_name/bin/gpio_setup.sh

Setting up the listener script

The listener script will handle the interaction with YKRUD2 and trigger the poweroff Linux command when required. It will periodically monitor the YKRUD2 Out GPIO to check if the shutdown command has been triggered by the user (through the pressing of the push button in YKRUD2 board). If so, it will execute a confirmation communication protocol with YKRUD2 and if everything is OK it will issue the Linux poweroff command.

To setup the listener the ykrud2.sh script should be executed. This script should be called during the boot process. To achieve this add the following line to /etc/rc.local file.

bash /home/user_name/bin/ykrud2.sh &
CONNECT THE YKRUD2 BOARD

To connect the YKRUD2 board to Raspberry Pi just insert it into the GPIOs header as shown in the image bellow.

Finally plug the 5V power to the YKRUD2 board as shown in the picture bellow.

TEST IT

With everything connected, just press the push-button to power up the Raspberry Pi. The LED will start blinking and once the boot process is complete the LED will stop blinking and stay continuously lighted.

To do a soft shutdown of the Raspberry just press once the push button. The LED will blink, halt for a short while and then it will start blinking again. If the LED suddenly stops blinking and stay continuously ON or OFF, press the push button again. Once the Raspberry Pi is off it will wait a short while and then it will cut the power to the Raspberry Pi board. At this point the YKRUD2 LED will turn off, but the YKRUD2 board is still powered on and working waiting for a press of the push button to power on the Raspberry Pi board triggering the boot process again.

For additional support, you can reach us through the form in our support page.

For more information and resources for the YKRUD2 board please visit the product page.

This site uses cookies to enhance your experience. By continuing to browse the site you accept their use. To find out more read our cookies policy.
Not logged @YEPKIT
Need an account? Register here!
Forgot Password? Recover here!
€ Euro
$ US Dollar
£ British Pound
$ Australian Dollar
$ Canadian Dollar