keyestudio 8x8; "unterminated #ifndef"

I’m trying to work w/ i2c matrices, and failing thus far. Can anyone assist? The libraries should be correctly installed.

The code is simple, taken directly from their webpage:

#include <Wire.h>
#include “Adafruit_LEDBackpack.h”
#include “Adafruit_GFX.h”
#ifndef _BV
#define _BV(bit) (1<<(bit))
Adafruit_LEDBackpack matrix = Adafruit_LEDBackpack();
uint8_t counter = 0;
void setup() {
Serial.begin(9600);
Serial.println(“HT16K33 test”);
matrix.begin(0x70); // pass in the address
}
void loop() {
// paint one LED per row. The HT16K33 internal memory looks like
// a 8x16 bit matrix (8 rows, 16 columns)
for (uint8_t i=0; i<8; i++) {
// draw a diagonal row of pixels
matrix.displaybuffer = _BV((counter+i) % 16) | _BV((counter+i+8) % 16) ;
}
// write the changes we just made to the display
matrix.writeDisplay();
delay(100);
counter++;
*if (counter >= 16) counter = 0; *
}
It won’t compile; generates
_8x8:4: error: unterminated #ifndef
#ifndef _BV
^
exit status 1
unterminated #ifndef

http://www.cplusplus.com/forum/beginner/4064/

Really? 62 posts and you still don't know how to properly post source code? Please read Nick Gammon's post at the top of this Forum about how to properly post source code here using code tags.

The code is simple, taken directly from their webpage:

The web page that you failed to post a link to?

The #ifndef statement has a body and then a #endif statement. You failed to copy (or they failed to include) the #endif statement.

PaulS:
The #ifndef statement has a body and then a #endif statement. You failed to copy (or they failed to include) the #endif statement.

dirtyharry2 forgot it :wink:

They don't have it. I copied it directly. Where ought I add it?

http://www.keyestudio.cc/h-nd-92.html is the original page.

After YOUR #define line.