Specific formatting of floats and converting them to an array of chars I have an oled display which can only display 4 digits + decimal point.
I need a way to format the number into 4 significant figures;
Then I need to convert that into an array of 5 chars (4 digits and one dp) before I can display them. 

Not sure how to format to correct number of digits or how to convert into a char array. I searched a bit and printf seems to be the solution(?) but I've had no luck with it so far as it spits out all sorts of errors. if you know how to make it work, please can you provide a code snippet which compiles without errors? thanks.
Normally sprintf() would be the solution - however the sprintf() in the AVR LIBC is a cutdown version with no floating point support.

Instead you have to use dtostrf() to get the job done:

dtostrf(val, 6, 4, buffer);


The numbers there are the maximum width of the string (note: you need to take into account any minus sign in that value), and the number of decimal places (6,4 would give you room for "0.0000" but not "-0.0000"). Make sure your buffer is bigger by one byte than your text, since you have to have the trailing NULL character in there to terminate it.

Another (nasty) way would be to go via String (although I would never recommend using String for anything, ever):

String s(val, 4);
const char *buf = s.c_str(); // this points to the internal char buffer.