Wiring Forum
Programming Questions & Help >> Programs >> arduino library in wiring

Message started by mako on 11/20/09 at 19:03:22

Title: arduino library in wiring
Post by mako on 11/20/09 at 19:03:22
hi, im trying to use the followint libraries from arduino, in wiring

#include <Password.h>
#include <Keypad.h>
#include <LiquidCrystal.h> (for 4 bits)

im very new, so just copy and paste the libraries from arduino into the wiring folder, but hey,,,, it doesnt work,
then checked them the *.h and *.cpp

- what do i have to do to make the libraries work?,

Title: Re: arduino library in wiring
Post by barragan on 11/20/09 at 19:44:03
please pack them or point me to them, IŽll check them out and see what are the changes needed.
hbarragan [at] uniandes.edu.co

Title: Re: arduino library in wiring
Post by mako on 11/21/09 at 10:47:04
Hi Barragan
Awesome job tnx,
this are the libraries,
they are working on my arduino sketch, but I need to use them with wiring to be able to use more pins,

- keypad:

- password: already in the arduino n wiring libraries (dont know if below program will work)

- LiquidCrystal: already in the wiring, but not in 4 bit mode (I saw in this forum some one doing some thing for this, but didnt publish the library)

This is the software, for a security system (but messages in a lcd 4 bits):

#include <Password.h>
#include <Keypad.h>

Password password = Password( "1234" );

const byte ROWS = 4; // Four rows
const byte COLS = 4; //  columns
// Define the Keymap
char keys[ROWS][COLS] = {
// Connect keypad ROW0, ROW1, ROW2 and ROW3 to these Arduino pins.
byte rowPins[ROWS] = { 7, 6, 5, 4 };// Connect keypad COL0, COL1 and COL2 to these Arduino pins.
byte colPins[COLS] = { 12, 11, 10, 8 };

// Create the Keypad
Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );

#define ledPin 13

void setup(){

  digitalWrite(ledPin, HIGH);   // sets the LED on
  keypad.addEventListener(keypadEvent); //add an event listener for this keypad

void loop(){

//take care of some special events
void keypadEvent(KeypadEvent eKey){
  switch (keypad.getState()){
    case PRESSED:
     Serial.print("Pressed: ");
     switch (eKey){
       case '*': guessPassword(); break;
       case '#': password.reset(); break;

void guessPassword(){
     Serial.print("Guessing password... ");
     if (password.evaluate()){
          Serial.print("n'est bien");

Title: Re: arduino library in wiring
Post by barragan on 11/23/09 at 17:06:27
hi Mako, both Keypad and Passwd work well with Wiring with no changes, just drop the folders for both libraries inside the Wiring/libraries folder, are you in a mac or Windows?

Wiring Forum » Powered by YaBB 2.5 AE!
YaBB Forum Software © 2000-2010. All Rights Reserved.