compile when I get the message ' setLocked ' was not Declared In This scope



hello, need work keyboard 3 * 4, when compile mesaje ,
 ' not declared in scope

and , tried not work . please .
i leave copy of program .








#include <keypad.h>

char  codigosecreto = '12345';
int   position = 0;
const byte rows = 4; // cuatro filas
const byte cols = 3; // tres columnas

char keys[rows][cols] = {
  {'1', '2', '3'},
  {'4', '5', '6'},
  {'7', '8', '9'},
  {'*', '0', '#'},
};

byte rowpins[rows] = { 1, 2, 3, 4 };      // conectar teclado row0, row1, row2 y row3 estos pines de arduino
byte colpins[cols] = { 5, 6, 7 };         // conectar teclado col"0" , col"1" y col"2" estos pines de arduino .
keypad keypad1 = keypad( makekeymap(keys), rowpins, colpins, rows, cols );

int rojo = 9;
int verde = 10;

void setup () {
  pinmode (rojo, output);
  pinmode (verde, output);
  setlocked(true)

  {
    void loop () {
      char key = keypad.getkey();
      if (key == '*' || key == '#')
      {
        position = 0;
        setlocked(true);
      }
      if (key == codigo secreto [position])
      {
        position ++;
      }

      if (position == 4)
      {
        setlocked(false);
      }

      delay(100);


      void setlocked(int locked) {
        if (locked)
        {
          digitalwrite(redpin, high);
          digitalwrite(greenpin, low);
        }
        else
        {
          digitalwrite(redpin, low);
          digitalwrite(greenpin, high);
        }
      }
    }

try pressing 'ctrl t' in ide

.


Arduino Forum > Using Arduino > Programming Questions > compile when I get the message ' setLocked ' was not Declared In This scope


arduino

Comments

Popular posts from this blog

Valutazione Template - Joomla! Forum - community, help and support

SD Datastring Convention

First use of Arduino Uno : avrdude error on Blink uploading