Giter VIP home page Giter VIP logo

lavalamp-rng's Introduction

Generating random values from a lava lamp

This project showcases how to use a Raspberry Pi and a computer on the same local network to generate random numbers based on the blobs of a lava lamp.

Requirements

  • A Raspberry Pi with a camera module
  • A computer running on the same network as the Raspberry Pi
  • Python 3.x installed on both devices
  • OpenCV installed on the computer
pip install picamera2
pip install opencv-python

Raspberry Pi Setup

Run the following Python script on your Raspberry Pi to stream video from the camera module. The script sets up an HTTP server to serve the MJPEG stream.

Raspberry Pi Code

Computer Setup

Run the provided Python script on your computer to connect to the Raspberry Pi's video stream, process the video frames, and generate random numbers based on the lava lamp's visuals.

Computer Code

Usage

  1. Ensure both the Raspberry Pi and the computer are connected to the same local network.
  2. Run the Raspberry Pi script first to start the video stream.
  3. Run the computer script to connect to the video stream and process the frames.
  4. The computer script will display the video frames, process them, and generate random numbers.

Note

  • The Raspberry Pi script will print the IP address of the device. Use this IP address in the computer script to connect to the video stream.
  • The computer script uses OpenCV to process the video frames, so make sure OpenCV is installed.

lavalamp-rng's People

Contributors

strumberr avatar

Watchers

 avatar

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.