0% found this document useful (0 votes)
5 views6 pages

Arduino Audio Visualizer Code

Arduino code for speech to text conversion displayed on LCD display

Uploaded by

sagar waghchoure
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views6 pages

Arduino Audio Visualizer Code

Arduino code for speech to text conversion displayed on LCD display

Uploaded by

sagar waghchoure
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

#include <LiquidCrystal_I2C.

h>

#include <Wire.h>

char str[34], L = 2;

int

temp = 0, i = 0;

int Pass = 0, p = 0;

int c, x, d;

int LED1 = 6;

int LED2 = 5;

int Li = 17;

int Lii = 1;

int Ri = -1;

int Rii = -1;

//initializethelibrarybyassociatinganyneededLCDinterfacepin

//withthearduinopinnumberitisconnectedto

LiquidCrystal_I2C lcd(0X27 , 16 , 2);

void setup() {

[Link]();

[Link]();

[Link](16, 2);

[Link](0, 0);

[Link]("AUDIO");

[Link](0, 1);
[Link]("SYSTMMM");

delay(1000);

[Link]();

[Link](9600);

pinMode(LED1, OUTPUT);

pinMode(LED2, OUTPUT);

void loop()

if (temp == 1)

//check();

temp = 0;

i = 0;

delay(1000);

for (int i = 0; i <= 31; i++) {

[Link](0, 0);

[Link](Scroll_LCD_Left(""));

[Link](0, 1);

[Link](Scroll_LCD_Left(""));

delay(400);

void serialEvent() {
while ([Link]())

char

inChar = [Link]();

str[i++] = inChar;

delay(10);

for

(p = i + 1; p < 34; p++)

str[i++] = 32;

temp = 1;

[Link](str);

Clear_Scroll_LCD_Left();//Use if the text in the string is changed /different from before

Clear_Scroll_LCD_Right();

[Link](0, 0);

[Link](str);

if (i > 16)

d = 16;

for (x = 0; x <= 17; x++)

[Link](x, 2);

[Link](str[d]);
d++;

delay(2000);

if

(str == "turn on LED")

digitalWrite(LED1, HIGH);

if

(str == "turn off LED")

digitalWrite(LED1, LOW);

//----------------------------------

String Scroll_LCD_Left(String StrDisplay) {

String result;

String StrProcess = "" + StrDisplay + "";

result = [Link](Li, Lii);

Li++;

Lii++;

if

(Li > [Link]()) {

Li = 16;
Lii = 0;

return result;

void Clear_Scroll_LCD_Left() {

Li = 16;

Lii = 0;

//----------------------------------

String Scroll_LCD_Right(String StrDisplay) {

String result;

String StrProcess = "" + StrDisplay + "";

if (Rii < 1) {

Ri = [Link]();

Rii = Ri - 16;

result = [Link](Rii, Ri);

Ri--;

Rii--;

return result;

void Clear_Scroll_LCD_Right() {

Ri = -1;

Rii = -1;

}
//PBLGROUPCODEOFAUDIOVISULIZERGROUP

You might also like