Ok.. Nub here,
I got my rotary encoder to count and reset.. Thanks for all the suggestions..
Now I can't get the Keypad to work.. I have loaded the Keypad example sketchs from the Arduino software but I get errors each time I try to compile the script..
I notice the #include <keypad.h> is grayed out..Other sketches like LCD TEST have the #include <LiquidCrystal.h> in yellow and they work..
I have attempted to add the keypad library to my Arduino/Libraries folder.. It shows that it's there with the Key.h, keypad.cpp and key.h files as well..
What am I missing (besides patience and hair(pulling it out))?
This is the code I'am using.. Right from the included library
/* @file HelloKeypad.pde
|| @version 1.0
|| @author Alexander Brevig
|| @contact alexanderbrevig@gmail.com
||
|| @description
|| | Demonstrates the simplest use of the matrix Keypad library.
|| #
*/
#include <Keypad.h>
const byte ROWS = 4; //four rows
const byte COLS = 3; //three columns
char keys[ROWS][COLS] = {
{'1','2','3'},
{'4','5','6'},
{'7','8','9'},
{'*','0','#'}
};
byte rowPins[ROWS] = {5, 4, 3, 2}; //connect to the row pinouts of the keypad
byte colPins[COLS] = {8, 7, 6}; //connect to the column pinouts of the keypad
Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );
void setup(){
Serial.begin(9600);
}
void loop(){
char key = keypad.getKey();
if (key){
Serial.println(key);
}
}
The errors I get are:
HelloKeypad:23: error: 'Keypad' does not name a type
HelloKeypad.ino: In function 'void loop()':
HelloKeypad:30: error: 'keypad' was not declared in this scope
This is whats in my keypad folder:
KEYPAD
Key.h
Keypad.cpp
Keypad.h
Keypad_in_the_works
Keypad_in_the_works.ino
libraries
Keypad.cpp
Keypad.h
CustomKeypad
DynamicKeypad
EventKeypad
HelloKeypad
HelloKeypad3
loopCounter
MultiKey
readme.txt
Seconds_since_reset
CustomKeypad
CustomKeypad.ino
DynamicKeypad
EventKeypad
HelloKeypad
HelloKeypad3
Any help for this Nub would be appreciated