Teensy3.1 Keypad

Status
Not open for further replies.

sh_9260

New member
Hello,

i get a Compiler error on Keypad Library version 3.1 :

C:\Users\sh\Desktop\teensy\arduino-1.0.5\libraries\Keypad/Keypad.h:80:27: error: expected class-name before '{' token

any idea ?

Thanks for help
 
Last edited:
Please see:

http://forum.pjrc.com/threads/15136-Please-Post-Code-amp-Details-In-Your-Question!

Without your code and what you're trying to do, most people here can't help much.

However, as a starting point, if you do anything (at all) before #include "Keypad.h" (like including other libraries, or trying to define some constants but introducing small typos), it may cause syntax errors which will confuse the compiler and cause it to report errors later. I'd look at your own sketch first, and any libraries you include before Keypad next.
 
Thank you for your answer,

i change now my code from

#include <Adafruit_NeoPixel.h>
Adafruit_NeoPixel strip = Adafruit_NeoPixel(6, 14, NEO_GRB + NEO_KHZ800);
#include <SdFat.h>
#include <Keypad.h>

to

include <Keypad.h>
#include <Adafruit_NeoPixel.h>
Adafruit_NeoPixel strip = Adafruit_NeoPixel(6, 14, NEO_GRB + NEO_KHZ800);
#include <SdFat.h>


and it works
for whatever reason.
 
Problem Found and fixed

The "Keypad.H" file has the following defination

#ifndef KEY_H
#define KEY_H

the same are also defined in "keylayouts.h" as
#define KEY_H ( 11 | 0x4000 )


I changed the names in Keypad.h to follows and the application compiled.
#ifndef KEYpad_H
#define KEYpad_H

I am checking fo furter implicaions of this change. will let you know ASAP.
Hope this resolves yur issue too.
 
Status
Not open for further replies.
Back
Top