8x8 matrix led and spark.io

Hi @deiref

How are you compiling your code? On the web IDE or CLI or locally with gcc/make?

You could be running into problems with the Arduino/Spark preprocessor that tries to make C/C++ easier for novice programmers but screws up classes etc.

If that is the problem, you can turn it off with a pragma at the top of your file:

#pragma SPARK_NO_PREPROCESSOR
#include "application.h"

You will have to supply function prototypes and make sure any forward references are in the correct order since you are now using straight C.

@bko - many thanks. Including those two lines at the top of the file and then supplying function prototypes solved the issue.

I was also able to successfully add the 16x8 libraries from Adafruit as those were not included in your library… probably this LED matrix wasn’t around when you made the library, but it’s a nice size as I’m able to fit 3 characters on it.

Yes, I’m using the web IDE.

best,
dan

1 Like