I’d like to share with you my projects that I’ve written in past. You may use, change it for any purposes.
LI-FI Project : https://github.com/kozmotr/LI-FI-Prototype-mors-
LI-FI POC project which I wrote in 2 weeks, that encodes data using the LEDs on the device and captures and decodes these lights. The project consists of 2 parts, the backend part that encodes the string given as an argument into morse code and turns on the leds accordingly, and the android application(front-end) part that captures these lights and decodes the data. Backend is implemented with C , front-end is implemented with Java/Android/OpenCV.
Backend part using spesific ioctl calls that related that spesific device. You can implement your device with necessary ioctl apis, so project can work without any additional modification.