Skip to content

Hands-on lecture MS degree course Mobile and Cyber-Physical Systems @unipi

Notifications You must be signed in to change notification settings

AFx3/arduino_fft_spectrum_visualizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Instructions for Running the Real-Time FFT Visualization Application

This guide will walk you through the steps required to set up a virtual environment using venv and run the real-time FFT visualization application.

Prerequisites

Ensure you have the following installed on your system:

  • Python 3.x
  • pip3 (Python package installer)
  • virtualenv package (optional, but recommended for managing virtual environments)

Steps

0. Load the sketch to your Arduino UNO locatend inside 'sketch' folder

cd sketch

1. Set Up a Virtual Environment

Create a virtual environment using venv:

python3 -m venv venv

2. Activate the Virtual Environment

  • On Windows:

    .\venv\Scripts\activate
  • On macOS and Linux:

    source venv/bin/activate

3. Install Required Packages

With the virtual environment activated, install the necessary packages using pip3:

pip3 install -r requirements.txt

4. Connect Your Arduino

Ensure your Arduino is connected to the correct serial port. You may need to modify the serial port setting in the script (e.g., /dev/ttyACM0 for Linux, COM3 for Windows).

5. Run the Application

Execute the Python script to start the real-time FFT visualization:

python3 fft_visualizer.py

7. Deactivate the Virtual Environment

Once you are done, deactivate the virtual environment:

deactivate

Notes

  • Make sure your Arduino is properly programmed to send FFT data to the serial port.
  • Adjust the serial port name in the script to match your system's configuration.
  • The application will prompt you to choose a filter type and, if applicable, a cutoff frequency.
  • FIXED PARAMENTERS BETWEEN THE SKETCH and PYTHON SCRIPT:
    • sampling rate
    • number of samples
    • bauds

About

Hands-on lecture MS degree course Mobile and Cyber-Physical Systems @unipi

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published