Skip to content

galitianu/two_button_blink

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Two-Button LED Blink Driver for Raspberry Pi

This is a simple Linux kernel module that uses two GPIO buttons to control the blink frequency of an LED on a Raspberry Pi.

Features

  • Uses GPIO buttons to increase or decrease the LED blink frequency
  • Implements a polling mechanism using a kernel thread
  • Adjustable blink frequency
  • Works on Raspberry Pi 2B (tested with GPIO18 for LED, GPIO23 and GPIO24 for buttons)

Requirements

  • Raspberry Pi 2B (or similar device with GPIO support)
  • Linux kernel with module support
  • Build tools (make, gcc, linux-headers package for your kernel)

Installation

1. Clone the repository:

git clone https://github.com/galitianu/two_button_blink.git
cd two-button-led-driver

2. Build the module:

make

3. Load the module:

sudo insmod two_button_blink.ko

4. Check if the device is registered:

dmesg | grep "two_button_blink"

5. Test functionality:

  • Press the increment button (GPIO23) to increase blink frequency
  • Press the decrement button (GPIO24) to decrease blink frequency

To see frequency changes being registered in real time, use sudo dmesg -wH

Unloading the Module

To remove the module, run:

sudo rmmod two_button_blink

License

This project is licensed under the GPLv2 license.

Author

Andrei Galitianu

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published