ledcontrol library

I am trying to understand libraries.

I am working with the ledcontrol.h library.

I am able to drive a set of four seven segment displays using a max7219 with the following instructions from the library

LedControl lc=LedControl(12,11,10,1); //wake the max7219 lc.shutdown(0,false); // Set the brightness to a medium values // lc.setIntensity(0,3); // and clear the display // lc.clearDisplay(0); lc.setRow(0,0,a[0]................lc.setRow(0,7,a[7]);

this means I have to make each bit of my code relate to each of the seven segments. I understand I can put the max7219 into a decode mode that allows it to read hex and decode it into seven segment information to pass to the display. the datasheet calls this decode and says if I put 00001001 into the register it will perform this function.

If I go to the libraries page in the reference and click on ledcontrol it sends me to a login page (I am already logged in) which then sends me to a blank page when I log in? update -- this happens on internet explorer now for all functions but not on firefox?

Is it possible to turn the decode on with an instruction similar to the ones above so I can send hex data to drive the seven segment displays?

Is it possible to turn the decode on with an instruction similar to the ones above so I can send hex data to drive the seven segment displays?

Have you looked at the source code for the library itself?

Perhaps it was just a quirk when you tried the library page. It seems to be working now (although very slow to load).

for some reason it fails to work in internet explorer but works in firefox? where can I find the source code for the library?

I have looked through the page http://playground.arduino.cc/Main/LedControl is that the reference page for the ledcontrol library? All I can find that I think is relevent are the lines

int i=9 lc.setDigit(0,(byte)i,false);

which when I add it to my program, and try to compile it I get the second line highlighted in yellow and

no matching function for call to 'LedControl:setDigit(int, byte,int)' ?

on the orange bar.

Is there no global instruction that then allows me to send data to the register that will be decoded?

is that the reference page for the ledcontrol library?

Yes.

All I can find that I think is relevent are the lines

int i=9 lc.setDigit(0,(byte)i,false);

Where are you seeing that? The code I see has FOUR arguments - which display, which position on the display, what value to show, and whether or not to light up the decimal point.

where can I find the source code for the library?

You downloaded and installed the library. Only you know where you did that.

PaulS: Where are you seeing that? The code I see has FOUR arguments - which display, which position on the display, what value to show, and whether or not to light up the decimal point.

 lc.shutdown(0,true);
 //and count down silently  
 while(i>1) {
   //data is updated, but not shown


  lc.setDigit(0,(byte)i,false);


   i--;
   delay(1000);
 }
 //when we switch the display on again we have already reached '1'
 lc.shutdown(0,false);
 lc.setDigit(0,(byte)i,false);

} from the power saving mode paragraph of the library you quoted earlier. I must admit I also noticed that a while after posting this and have been playing with the program and using the lcdemo7segment example.

I must admit I must be missing something with libraries, it seems a bit odd to me that either you use someone elses work to include a library or have to download the sketch or source code or whatever you want to call it, disect it to find out what functions you can inplement and then experiment with them until you get what you want.

No doubt when you write a library its functions will be fully documented or at least fully commented examples of the use of all functions will be provided but this is not always the case. Sometimes you have to resort to opening the library files and reading them to discover and understand the functions available.