Tekko BDSimSimulatorProjects

ডট ম্যাট্রিক্সে মিউজিক ভিজ্যুয়ালাইজারArduino Music Visualizer on a MAX7219 Dot Matrix

Microphone-এর লেভেল ঠিক করে ডট-ম্যাট্রিক্সের নিচের সারিতে ৮ কলামের মধ্যে কয়টা জ্বলবে। LedControl মাত্র ৩টা pin-এ পুরো display চালায়, আর setRow একবারে এক byte লেখে — গান যত জোরে, বার তত লম্বা।

The microphone level picks how many of the 8 columns light in the bottom row of the dot matrix. LedControl runs the whole display off 3 pins, and setRow writes one byte at a time — loud song, tall bar.

▶ ফ্রি চালিয়ে দেখো / Run it free Parts অর্ডার করো (WhatsApp)

সার্কিট ডায়াগ্রাম · Circuit diagram

Arduino Music Visualizer on a MAX7219 Dot Matrix circuit diagram — Arduino Uno, Sound sensor (microphone), LED matrix 8x8 (MAX7219), Jumper wires

যা যা লাগবে · Parts you need

তার লাগানো · Wiring

Sound sensor (microphone) VCC→Arduino Uno 5V
Sound sensor (microphone) GND→Arduino Uno GND
Sound sensor (microphone) AO→Arduino Uno A0
LED matrix 8x8 (MAX7219) VCC→Arduino Uno 5V
LED matrix 8x8 (MAX7219) GND→Arduino Uno GND
LED matrix 8x8 (MAX7219) DIN→Arduino Uno D12
LED matrix 8x8 (MAX7219) CLK→Arduino Uno D11
LED matrix 8x8 (MAX7219) CS→Arduino Uno D10

Code (Arduino C++)

#include <LedControl.h>
// Music visualizer: the microphone's level decides how many of the 8 columns in
// the bottom row of the dot-matrix light up. LedControl drives the whole matrix
// with 3 pins; setRow() writes one row of 8 pixels at a time. Play music (slide
// the Loudness control) and watch the bar dance.
LedControl mx = LedControl(12, 11, 10, 1);
const int mic = A0;

void setup() {
  mx.shutdown(0, false);
  mx.setIntensity(0, 8);
  mx.clearDisplay(0);
  Serial.begin(9600);
}

void loop() {
  int pct = map(analogRead(mic), 100, 970, 0, 100);
  pct = constrain(pct, 0, 100);
  int bars = pct * 8 / 100;                       // 0..8 lit columns
  byte pattern = bars == 0 ? 0 : (0xFF << (8 - bars)) & 0xFF;
  mx.setRow(0, 0, pattern);
  Serial.print("bars="); Serial.println(bars);
  delay(120);
}

আরো project · More projects