The LED Blink application is a project that allows the user to control the blinking of an LED using an SMD board and an RGB module. This project is designed for simplicity, making it an ideal starting point for those wishing to experience the SMD hardware control using the SMD libraries.

Project Key Components

  1. SMD Board

    The SMD board acts as a bridge between the script and the RGB module. It is responsible for interpreting the commands sent by the script and translating them into actions that toggle the RGB module.

  2. RGB Module

    The RGB module is designed to emit different colors, allowing users to experiment with different lighting effects.

  3. SMD Libraries

    The SMD library is at the heart of the application. It communicates with the SMD board using a specific communication protocol, sending commands to turn the RGB LED on or off, adjust the color, or set a specific blinking pattern.

Project Key Features

  • Detailed Control over LED

    The user can easily control the RGB module's LED colors by simply using the necessary function of SMD libraries. The LED on the module can emit all RGB color values.

Project Wiring Diagram

Getting Started

  1. Hardware Setup:

    • Connect the SMD board to the PC or Arduino board using USB gateway module or Arduino gateway module.

    • Connect the RGB module to the SMD board using an RJ-45 cable.

    • Make sure that the SMD board is powered and all connections are correct.

  2. Run the Script:

    • Run the script on your computer. This will establish communication with the SMD board and initiate control of the RGB module.

  3. Experiment and Customize:

    • Explore different blinking patterns, change the color of the RGB LED to suit your preferences.

Project Codes

from import *

SerialPort = "COM3"     # Serial port of the USB gateway module
baudrate = 115200       # Baud rate of communication
ID = 0                  # ID of the SMD board
rgb_module_id = 1       # ID of the RGB module

master = Master(SerialPort, baudrate)       # Defines the USB gateway module
master.attach(Red(ID))                      # Gives acces to the SMD of specified ID

while True:
    master.set_rgb(ID, rgb_module_id, 255, 0, 0)        # Numbers are correspond to the R - G - B color values
    time.sleep(0.5)                                     # Value can be changed to see how the blinking frequency changes
    master.set_rgb(ID, rgb_module_id, 0, 0, 0)          # Sets all colors to zero, meaning turning the RGB LED off
    time.sleep(0.5)                                     # Value can be changed to see how the blinking frequency changes

Last updated