Giter Site home page Giter Site logo

light-based-image-transmission's Introduction

Light-based Image Transmission

This project involves using two Arduino boards to transmit data using light signals. One Arduino sends binary data to another Arduino via a torch. The receiving Arduino decodes the light signals and reconstructs the original data, which is then converted back into an image using a Python script.

Table of Contents

Components

  • 2 x Arduino Boards (Uno, Nano, etc.)
  • 1 x Torch (LED)
  • 1 x Light Dependent Resistor (LDR)
  • 1 x Computer with Python 3.x installed

Setup

  1. Hardware Setup:

    • Connect the components as shown in the circuit diagrams provided in the arduino_sender.ino and arduino_receiver.ino files.
    • Ensure the torch is appropriately connected to the sender Arduino.
    • Place the LDR in a location where it can detect the light signals from the torch and connect it to the receiver Arduino.
  2. Arduino Code:

    • Upload the arduino_sender.ino code to one Arduino.
    • Upload the arduino_receiver.ino code to the other Arduino.
  3. Python Script:

    • Install the required Python libraries by running: pip install pyserial pillow.
    • Replace 'COMX' in the python_receiver.py script with the actual COM port where the receiver Arduino is connected.
    • Run the Python script using python python_receiver.py.

Usage

  1. Power on both Arduino boards.
  2. Run the Python script on your computer.
  3. Press the button on the sender Arduino to start transmitting the base64-encoded image data via light signals.
  4. The receiver Arduino will detect the light signals and reconstruct the data.
  5. The Python script will decode the received data and display the image.

Demo

Watch the video

References (Source or Inspiration for this Project)

https://projecthub.arduino.cc/saadsaif0333/data-transfer-using-led-light-li-fi-ee33a3

Contributing

Contributions to this project are welcome! If you find any issues or improvements, please feel free to open an issue or submit a pull request.

License

This project is licensed under the MIT License.


Note: This project is designed for educational and experimental purposes. The reliability and performance of the data transmission may vary based on environmental conditions and hardware components. Use this project at your own risk.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.