Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Instruction Guide 128x64 OLED with Song Status and Spectrum Display on Raspberry Pi
That's it, I got only the spectrum and bitrate to show on the small screen when playing. (all other infos are on the bigger screen)
here is what I changed, if anyone cares.

sudo nano /home/pi/mpd_oled/main.cpp

commented out everything but draw_spectrum and draw_text (for bitrate)
Spectrum height changed from 32 to 50
bitrate moved under spectrum, centered, 50,56

void draw_spect_display(ArduiPi_OLED &display, const display_info &disp_info)
{
  const int H = 8;  // character height
  const int W = 6;  // character width
  draw_spectrum(display, 0, 0, SPECT_WIDTH, 50, disp_info.spect);
//  draw_connection(display, 128-2*W, 0, disp_info.conn);
//  draw_triangle_slider(display, 128-5*W, 1, 11, 6, disp_info.status.get_volume());
  if (disp_info.status.get_kbitrate() > 0)
    draw_text(display, 50, 56, 4, disp_info.status.get_kbitrate_str());

//  int clock_offset = (disp_info.clock_format < 2) ? 0 : -2;
//  draw_time(display, 128-10*W+clock_offset, 2*H, 2, disp_info.clock_format);

//  vector<double> scroll_origin(disp_info.scroll.begin()+2,
//                               disp_info.scroll.begin()+4);
//  draw_text_scroll(display, 0, 4*H+4, 20, disp_info.status.get_origin(),
//      scroll_origin, disp_info.text_change.secs());

//  vector<double> scroll_title(disp_info.scroll.begin(),
//                              disp_info.scroll.begin()+2);
//  draw_text_scroll(display, 0, 6*H, 20, disp_info.status.get_title(),
//      scroll_title, disp_info.text_change.secs());

//  draw_solid_slider(display, 0, 7*H+6, 128, 2,
//      100*disp_info.status.get_progress());
}

For Spectrum to show on the entire width of the screen, sudo nano /home/pi/mpd_oled/display.cpp was modified on line 47, "width" became 128.
int total_bar_pixes = 128-(num_bars-1)*gap;

then run

Code:
cd mpd_oled
PLAYER=MOODE make
sudo bash install.sh
Reply


Messages In This Thread
RE: 128x64 OLED with Song Status and Spectrum Display on Raspberry Pi - by Alaini93 - 12-05-2020, 04:21 AM
RE: help me - by ghera78 - 02-28-2020, 08:01 AM
RE: help me - by ghera78 - 02-28-2020, 01:17 PM

Forum Jump: