Posts

Showing posts with the label python

Spectrum analyzer using python

Image
Spectrum analyzer using Python with the interface of ESP8266.The Designed Analyzer takes the input Time Domain signals and outputs the Frequency Domain signals with the usage of the FFT Algorithm. Aurdino code :  const int x=1024; // 2^13 int data[x]; void setup() {   Serial.begin(115200); } void loop()  {     for(int i=0;i<x;i++)     {       data[i]=analogRead(A0);     }     for(int i=0;i<x;i++)     {      Serial.println(data[i]);      }   delay(5000);   } Python code for spectrum analyser: from time import sleep from vpython import* import math as m import cmath as cm import serial import matplotlib.pyplot as plt c1=canvas(background=color.black,width=1800,height=600) class Circle:     def __init__(self,X=0,Y=0,Color=color.red,Radius=1,Rate=25):         self.circle=curve(color=Color,radius=0.02)         self.X=X...