Skip to content

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.

License

Notifications You must be signed in to change notification settings

strumberr/lavalamp-RNG

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages