GithubHelp home page GithubHelp logo

squeezeesp32's Introduction

SqueezeEsp32

Squeezebox player for ESP32 board and ESP8266

Use a vs1053 module or I2S DAC as audio output.

The configuration is define in the file config.h via some #define

#define VS1053_MODULE = VS_1053 #define I2S_DAC_MODULE = I2S DAC

I have try two differents library for the module VS_1053. Set #define ADAFRUIT_VS1053 to switch to the second library. I had some issues with the library so i decide to stay away from but you can do some tests by your side.

Wifi configuration is done via a AP started on the first boot. It use the library https://github.com/bbx10/WiFiManager

Once connected to the network, the player send multicast packet to discovery LMS.

squeezeesp32's People

Contributors

bgiraut avatar markus-be avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

squeezeesp32's Issues

VSCode

Tried to use VS Code. After transferring the sketch ino into main.cpp in PIO, I get these error messages. It may be an easy fix but my C isn't up to mark to figure it out.

It compiles error free in Arduino but not VSCode but I believe that because Arduino is more lax on the syntax.

/src/slimproto.cpp",
"message": "overflow in implicit constant conversion [-Woverflow]",
Ln: 67, Col: 27,

"message": "unused variable 'viBuffer' [-Wunused-variable]",
Ln: 163, Col: 9,

Loop refactoring needed

In general, the loop section should be written in a way that minimize time spent there. This frees up precious processor time needed for other platform management duties, in a non-preemptive multi tasking environment.

A suggestion here specifically is to replace any long delay with a time based condition that checks on every pass of the loop if a delay has been met.

The code below is an example. When the logic enters the if condition, there is a chance that the loop will block for an extended period of time and possibly cause a wdt reset.

   if(LMS_addr[0] == 0)
    {
     Serial.println("Search for LMS server..."); 
     for(int nbSend = 0; nbSend < 10; nbSend++)
      {
       // start UDP server
       //Send udp packet for autodiscovery
       udp.flush();
       udp.beginPacket("255.255.255.255",UDP_PORT);
       udp.printf("e");
       udp.endPacket();
    
       delay(2000);
    
       if(udp.parsePacket()> 0)
        {
        char upd_packet; 
        upd_packet = udp.read();

        if(upd_packet == 'E')
          {
          LMS_addr = udp.remoteIP();
          Serial.print("Found LMS server @ "); 
          Serial.println(LMS_addr); 
          //udp.stop(); 
          break; // LMS found we can go to the next step
          }
        }
       else
        delay(2000);
      }
    }

Compile Errors

Would like to do it the Git way, but not familiar and don't want to risk breaking anything.

Arduino IDE 1.8.19

  1. slimproto.cpp:186:50: warning: trigraph ??! ignored, use -trigraphs to enable [-Wtrigraphs]
    186 Serial.println("Expected command size to big ??!!??");

         Serial.println("Expected command size too big!");		// amended message
    
  2. \slimproto.cpp:332:1: warning: no return statement in function returning non-void [-Wreturn-type]
    325 int slimproto::HandleAudio()
    {
    if(vcDacAudioGen && vcPlayerStat != PauseStatus)
    if(vcDacAudioGen->isRunning()){
    if(!vcDacAudioGen->loop()) vcDacAudioGen->stop();
    }
    return(0) // insert return(0)
    }

  3. \slimproto.cpp:527:9: warning: extra tokens at end of #endif directive [-Wendif-labels]
    526 #endif VS1053_MODULE

    #endif // VS1053_MODULE		// comment out "VS1053_MODULE" tokens
    

Which VS1053 lib do you use?

Hi,
I have tried to compile, but with all VS1053.h file I found on github, i got compile errors.
Which Lib do you use for the VS1053?

Thx

Compiling difficulties

I have added the WiFimanager ( tried both the master and ESP32 branch ) ,the ESP8266Audio, and both the VS1053b libraries. I have also used the example configuration file.
I am not able to get this to compile for an ESP32.

On compiling I get this error:

void write_register(uint8_t _reg, uint16_t _value) const;
SqueezeESP32:109: error: within this context
viplayer.write_register(addr, val);

Am I missing something here?

Memory management refactoring need

With limited memory available on the platform, it is best to minimize de-allocating and favor global memory buyers usage instead. Frequent allocation and freeing of memory buffers might result in memory fragmentation, causing occasional soft watchdog resets and instability.

A first glimpse at the code revealed such an instance in the main loop area. Ideally, the slimproto object should be created as a global instance governed by the status of the connection to a server.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.