Skip to content

add lib #6583

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 12, 2025
Merged

add lib #6583

merged 2 commits into from
Jul 12, 2025

Conversation

X-croot
Copy link
Contributor

@X-croot X-croot commented Jul 12, 2025

RelayXCR

RelayXCR is a simple and lightweight Arduino library for controlling one or more relay modules using digital pins. It supports both active HIGH and active LOW relays, making it flexible for a wide range of relay boards.

Features

  • Supports multiple relay instances
  • Works with both active HIGH and active LOW logic
  • Simple API: on(), off(), toggle(), isOn()
  • Lightweight and easy to integrate

Installation

  1. Download or clone the repository.
  2. Copy the RelayXCR folder into your Arduino libraries/ directory.
  3. Restart the Arduino IDE.

Usage

Include the Library

#include <RelayXCR.h>

Create Relay Objects

RelayXCR relay1(7);          // Active HIGH (default)
RelayXCR relay2(8, false);   // Active LOW

In setup()

void setup() {
  relay1.begin();
  relay2.begin();
}

In loop()

void loop() {
  relay1.on();
  delay(1000);
  relay1.off();
  delay(1000);
  relay2.toggle();
  delay(1000);
}

API Reference

  • begin() – Initializes the relay pin
  • on() – Turns the relay on
  • off() – Turns the relay off
  • toggle() – Switches the relay state
  • isOn() – Returns true if relay is on, false otherwise

Compatibility

  • Works with any Arduino board
  • Tested with HC-SR501 relay modules, Songle relays, and more

License

MIT License


Created by X-croot
Email: [unuvarcan111@gmail.com](mailto:unuvarcan111@gmail.com)

Copy link
Contributor

Hi @X-croot.
Your pull request has been detected as something other than a Library Manager submission.
A maintainer will need to review it before it can be merged.

If you intended to submit a library, please check the instructions and update your pull request if necessary:
https://github.com/arduino/library-registry/blob/main/README.md#instructions

Copy link
Contributor

ERROR: Arduino Lint found errors with https://github.com/X-croot/RelayXCR:

Linting library in RelayXCR
ERROR: Library name RelayXCR not found in the Library Manager index. Library names are not allowed to change after being
       added to the index.                                                                                              
       See: https://github.com/arduino/library-registry/blob/main/FAQ.md#how-can-i-change-a-librarys-name               
       (Rule LP018)                                                                                                     

Linter results for project: 1 ERRORS, 0 WARNINGS

-------------------

Linting sketch in RelayXCR/examples/test

Linter results for project: no errors or warnings

-------------------

Linter results for projects: 1 ERRORS, 0 WARNINGS

Copy link
Contributor

A problem was found with your submission https://github.com/AbdulKus/72x40oled_lib

ERROR: Submission URL is already in the Library Manager index.

@github-actions github-actions bot added the topic: modification Change existing list entry label Jul 12, 2025
Copy link
Contributor

Thanks for your interest in contributing to the Arduino Library Manager index @X-croot
Please resolve the error(s) mentioned in the previous comment.

After resolving the issue, trigger this check again by doing one of the following:

  • Commit the required change to the branch you submitted this pull request from.
  • Comment here, mentioning @ArduinoBot in the comment.

NOTE: It is not necessary to open a new pull request. ❗

More information:
https://github.com/arduino/library-registry/blob/main/README.md#if-the-problem-is-with-the-pull-request

@github-actions github-actions bot requested a review from per1234 July 12, 2025 21:16
@github-actions github-actions bot removed the request for review from per1234 July 12, 2025 21:18
@github-actions github-actions bot added topic: submission Add library to the list and removed topic: modification Change existing list entry labels Jul 12, 2025
@github-actions github-actions bot merged commit ce47116 into arduino:main Jul 12, 2025
11 checks passed
Copy link
Contributor

Your submission has now been accepted! Thanks for your contribution to the Arduino Library Manager index.

The library(s) will be available for installation via Library Manager within a day's time.

You can check the logs from the Library Manager indexer for your library(s) here:
http://downloads.arduino.cc/libraries/logs/github.com/X-croot/RelayXCR/

github-actions bot pushed a commit that referenced this pull request Jul 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: submission Add library to the list
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant