Jump to content

kukov

Members
  • Content Count

    6
  • Joined

  • Last visited

About kukov

  • Rank
    Noob Class

Profile Information

  • Location
    Bucharest
  1. can somebody put a tutorial how to install eclipse + mspgcc for windows, or some instructions. Thanks
  2. kukov

    Keypad library

    uploaded the file for quick download for the developer and modify . made my code to read a keypad , if anybody interested here is the code for simple 3x3 keypad,rezistor attached to colums onst int COL[] = {P1_5,P1_4,P1_3}; const int ROW[] = { P1_6,P1_7,P1_0}; char keys[3][3] = { {'1','2','3'}, {'4','5','6'}, {'7','8','9'} }; void setup() { Serial.begin(9600); for (int v=0;v<3;v++) { pinMode(COL[v], INPUT); } for (int j=0;j<3;j++) { pinMode(ROW[j],OUTPUT); digitalWrite(ROW[j],LOW); } } void loop() { for(int w=0;w<3;w++) { digitalWrite(ROW[w],HIGH); for(int x=0;x<3;x++) { if(digitalRead(COL[x])==HIGH) { delay(150); Serial.println(keys[w][x]); } } digitalWrite(ROW[w],LOW); } } and here is a for a 16X2 lcd + keypad. press and show on lcd #include <LiquidCrystal.h> LiquidCrystal lcd(P2_0, P2_1, P2_2, P2_3, P2_4, P2_5); const int COL[] = {P1_5,P1_4,P1_3}; const int ROW[] = { P1_6,P1_7,P1_0}; char keys[3][3] = { {'1','2','3'}, {'4','5','6'}, {'7','8','9'} }; int row=0; int s=0; void setup() { for (int v=0;v<3;v++) { pinMode(COL[v], INPUT); } for (int j=0;j<3;j++) { pinMode(ROW[j],OUTPUT); digitalWrite(ROW[j],LOW); } lcd.begin(16, 2); } void loop() { for(int w=0;w<3;w++) { digitalWrite(ROW[w],HIGH); for(int x=0;x<3;x++) { if(digitalRead(COL[x])==HIGH) {delay(150); row++; lcd.print(keys[w][x]); if((row==16) && (s==0)) { row=0; s=1; lcd.setCursor(0, s); lcd.print(keys[w][x]); } if((row==16) && (s==1)) { row=0; s=0; lcd.clear(); lcd.print(keys[w][x]); } } } digitalWrite(ROW[w],LOW); } } keypad.zip
  3. kukov

    Keypad library

    sure. here is the location http://playground.arduino.cc/Main/KeypadTutorial
  4. kukov

    Keypad library

    C:\Users\robert\Documents\Energia\Libraries\keypad the location of the library.i am running 09, where can i download 08? 08 is better than 09?
  5. hello can somebody help me with the keypad libary. this my code ,nothing modified except the pins /* @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] = {P1_6,P1_7,P2_2,P1_0}; //connect to the row pinouts of the keypad byte colPins[COLS] = {P1_5,P1_4,P1_3}; //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); } } and here is the error C:\Users\robert\Documents\Energia\libraries\keypad\Keypad.cpp: In member function 'void Keypad::initializePins()': C:\Users\robert\Documents\Energia\libraries\keypad\Keypad.cpp:238:17: error: lvalue required as left operand of assignment C:\Users\robert\Documents\Energia\libraries\keypad\Keypad.cpp:238:40: error: lvalue required as increment operand also can i use rst,test and xin,xout as inputs?
×
×
  • Create New...