Coding serial monitor output to 7 segment display

You may follow this tutorial to show your accelerometer data on a 4-digit cc-type multiplexed display unit using SevSeg.h Library.

1. The Schematic
cc4drxy
Figure-1:

2. Test Sketch to show 1234 on the display unit of Fig-1

#include<SevSeg.h>
SevSeg sevSeg;           //create object sevSeg

int numberToShow = 1234;

void setup()
{
 byte segDPins[] = {8, 9, 10, 11, 12, 13, 6, 7};  //DPin8 = seg-a, …, DPin-7 = seg-p
 byte ccDPins[] = {2, 3, 4, 5};          //DPin-2 = cc0, DPin-2 = cc1, ...
 sevSeg.begin(COMMON_CATHODE, 4, ccDPins, segDPins, false, false, false, true);
 sevSeg.setNumber(numberToShow, 0, LOW);
}

void loop()
{
 sevSeg.refreshDisplay();
}

3. To read details on the SevSeg.h Library functions (particularly on showing number with decimal point), you may consult this tutorial.