0% found this document useful (0 votes)
71 views7 pages

Web Radio

This document contains code for an Arduino web radio project. It includes code to connect to WiFi, initialize audio playback over I2S, and define variables to store radio station names and metadata. The setup function determines the number of stations for each genre ("Dance", "Disco", etc.) by iterating through arrays until it finds the "EOF" marker.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
71 views7 pages

Web Radio

This document contains code for an Arduino web radio project. It includes code to connect to WiFi, initialize audio playback over I2S, and define variables to store radio station names and metadata. The setup function determines the number of stations for each genre ("Dance", "Disco", etc.) by iterating through arrays until it finds the "EOF" marker.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Web radio

code
1

• #include "Arduino.h"
• #include <TFT_eSPI.h>
• #include <WiFi.h>
• #include <Audio.h> //https://github.com/schreibfaul1/ESP32-audioI2S
• #include "Trance.h"
• #include "Lounge.h"
• #include "UK.h"
• #include "Talk.h"
• #include "Dance.h"
• #include "Disco.h"
• #include <SoftwareSerial.h> // This is the ESPSoftwareserial Version
https://github.com/plerup/espsoftwareserial/
2
• #define I2S_DOUT 25 // Preset I2S pins on the ESP32
• #define I2S_BCLK 27
• #define I2S_LRC 26

• SoftwareSerial serialBT;

• int CH_Pointer = 0;
• int OLD_Pointer = 0;
• int Volume = 15;
• int action = -1;
• int Genres = 1;
• const String Spc = " ";
• String Str = Spc;
3
• String Str1;
• int Sizeof;
• int SizeofTrance;
• int SizeofDance;
• int SizeofDisco;
• int SizeofLounge;
• int SizeofTalk;
• int SizeofUK;
4

• #define blue 0x5D9B


• #define darkred 0xA041

• TFT_eSPI tft = TFT_eSPI(); // Invoke Custom Library


• Audio audio;

• String ssid = "********";


• String password = "********";
5
• void setup() {
• Serial.begin(115200);
• int i = 0;
• while (Dance_Stations[i] != "EOF") {
• i++;
• }
• SizeofDance = i;
• i = 0;
• while (Disco_Stations[i] != "EOF") {
• i++;
• }
• SizeofDisco = i;
• i = 0;
• while (Lounge_Stations[i] != "EOF") {
• i++;
• }
6
• SizeofLounge = i;
• i = 0;
• while (Talk_Stations[i] != "EOF") {
• i++;
• }
• SizeofTalk = i;
• i = 0;
• while (Trance_Stations[i] != "EOF") {
• i++;
• }
• SizeofTrance = i;
• i = 0;
• while (UK_Stations[i] != "EOF") {
• i++;
• }

You might also like