collapse

* Posts Recentes

+ LASERs por dropes
[20 de Junho de 2025, 16:01]


Cerca eléctrica por SerraCabo
[14 de Junho de 2025, 23:26]


Alguém arranja motores? por almamater
[10 de Junho de 2025, 22:34]


Condensador 4.7uF 0603 por brunus
[09 de Junho de 2025, 15:52]


Lenovo IdeaPad 3 Não liga por jm_araujo
[07 de Maio de 2025, 19:10]


Identificar Diodo Zenner por filjoa
[01 de Maio de 2025, 23:07]


Meu novo robô por dropes
[18 de Março de 2025, 14:51]


JBL partybox On-The-Go por almamater
[21 de Fevereiro de 2025, 23:32]


Talking Reverse Engineering with an Absolute Legend! por SerraCabo
[13 de Fevereiro de 2025, 09:56]


Motoserra Stihl 120C por brunus
[11 de Fevereiro de 2025, 16:29]

Autor Tópico: Arduino Uno+miniEngine 1+easydriver+lcd keypad shield (camer) why error code???  (Lida 6073 vezes)

0 Membros e 1 Visitante estão a ver este tópico.

Offline nicolas_wel

  • Mini Robot
  • *
  • Mensagens: 1
hallo!
Why this error code?



code
/*

    See www.openmoco.org for more information

    (c) 2011 Airic Lenz
   
    The 1st version of this code, dealing with core functionalities,
    was heavily inspired by the OpenMoCo Engine by C.A. Church
    and is basically based on it. Thank you for your great work!
   
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

*/



// ===================================================================================
void camera_focus() {
 
  // enpower the focus pin
  digitalWrite(FOCUS_PIN, HIGH);
 
  // remember the starting time
  action_start_time = millis();
 
  // set the "i am focussing" flag to on
  action_status |= B01000000;   
 
}


// ===================================================================================
// this function does not close the focus line because it will be handled in the
// function camera_shoot - called directly after this methode
void camera_stop_focus() {
 
  // toggle the "i am focussing" flag to off B01000000
  bitClear(action_status, 6);
 
 // now shoot the camera
 camera_shoot();
}



// ===================================================================================
void camera_shoot() {
 
  // close or open the focus line while shooting (relevant for shootimg behavior of different camera brands)
  if (camera_status & B10000000) {
    digitalWrite(FOCUS_PIN, HIGH);
  } else {
    digitalWrite(FOCUS_PIN, LOW);
  }
   
  // enpower the camera pin
  digitalWrite(CAMERA_PIN, HIGH);
 
  // remember the starting time
  action_start_time = millis();
 
  // set the "i am exposing" flag to on
  action_status |= B00010000;   
 
}


// ===================================================================================
// blocking function for test shots
void camera_shoot(long exposure) {
 
  camera_shoot();
 
  delay(exposure);
 
  // depower the camera pin
  digitalWrite(CAMERA_PIN, LOW);
  // depower the focus pin
  digitalWrite(FOCUS_PIN, LOW);
   
  // toggle the "i am exposing" flag to off B00010000
  bitClear(action_status, 4);
}


// ===================================================================================
void camera_stop_shoot() {
 
 
  // depower the camera pin
  digitalWrite(CAMERA_PIN, LOW);
  // depower the focus pin
  digitalWrite(FOCUS_PIN, LOW);
 
 
  // toggle the "i am exposing" flag to off B00010000
  bitClear(action_status, 4);
 
  // increment the shoot counter
  camera_shoot_count++;
 
  // check if we reached the maximum shot number
  if ( (camera_shot_max != 0) &&
       (camera_shoot_count >= camera_shot_max) ) {
   
    stop_program();
 
    // print a message: "Max camera shot limit reached!";
    print_message(97, 96, 3);
 
    return;
  }
   
  // if we want to have a past exposure time than start it now
  // if we are not in continuous mode
  if (!(action_status & B10000000)) {
   
    // do the next step in the cycle
    camera_start_post();
  }
}


// ===================================================================================
void camera_start_post() {
 
  // set the past exposure flag
  if (camera_exp_post > 0) {
    action_status |= B00000100; 
 
  // otherwise start the motor phase
  } else {
   
    motor_start();
   
  }
}

// ===================================================================================
void camera_stop_post() {
 
 // clear camera post delay bit
 bitClear(action_status, 2);
 
 // and start the motor
 motor_start();
 
}


ERROR MESSAGES
mE_camera.ino: In function 'void camera_focus()':
mE_camera:32: error: 'FOCUS_PIN' was not declared in this scope
mE_camera:35: error: 'action_start_time' was not declared in this scope
mE_camera:38: error: 'action_status' was not declared in this scope
mE_camera.ino: In function 'void camera_stop_focus()':
mE_camera:49: error: 'action_status' was not declared in this scope
mE_camera.ino: In function 'void camera_shoot()':
mE_camera:61: error: 'camera_status' was not declared in this scope
mE_camera:62: error: 'FOCUS_PIN' was not declared in this scope
mE_camera:64: error: 'FOCUS_PIN' was not declared in this scope
mE_camera:68: error: 'CAMERA_PIN' was not declared in this scope
mE_camera:71: error: 'action_start_time' was not declared in this scope
mE_camera:74: error: 'action_status' was not declared in this scope
mE_camera.ino: In function 'void camera_shoot(long int)':
mE_camera:88: error: 'CAMERA_PIN' was not declared in this scope
mE_camera:90: error: 'FOCUS_PIN' was not declared in this scope
mE_camera:93: error: 'action_status' was not declared in this scope
mE_camera.ino: In function 'void camera_stop_shoot()':
mE_camera:102: error: 'CAMERA_PIN' was not declared in this scope
mE_camera:104: error: 'FOCUS_PIN' was not declared in this scope
mE_camera:108: error: 'action_status' was not declared in this scope
mE_camera:111: error: 'camera_shoot_count' was not declared in this scope
mE_camera:114: error: 'camera_shot_max' was not declared in this scope
mE_camera:117: error: 'stop_program' was not declared in this scope
mE_camera:120: error: 'print_message' was not declared in this scope
mE_camera.ino: In function 'void camera_start_post()':
mE_camera:139: error: 'camera_exp_post' was not declared in this scope
mE_camera:140: error: 'action_status' was not declared in this scope
mE_camera:145: error: 'motor_start' was not declared in this scope
mE_camera.ino: In function 'void camera_stop_post()':
mE_camera:154: error: 'action_status' was not declared in this scope
mE_camera:157: error: 'motor_start' was not declared in this scope


HELP HELP HELP!!


StarRider

  • Visitante
Re: Arduino Uno+miniEngine 1+easydriver+lcd keypad shield (camer) why error code???
« Responder #1 em: 13 de Fevereiro de 2014, 21:32 »
Hum ... será  que existe um ditado Anglo-Saxónico correspondente ao tal da "agua de malvas" ...  ;D  ;D  ;D

Peço desculpa mas não consegui resistir ;)

Abraços,
PA


Offline Nunito

  • Mini Robot
  • *
  • Mensagens: 923
Re: Arduino Uno+miniEngine 1+easydriver+lcd keypad shield (camer) why error code???
« Responder #2 em: 13 de Fevereiro de 2014, 22:16 »
No Comment!

Offline dropes

  • Mini Robot
  • *
  • Mensagens: 2.273
Re: Arduino Uno+miniEngine 1+easydriver+lcd keypad shield (camer) why error code???
« Responder #3 em: 14 de Fevereiro de 2014, 00:20 »
Hum ... será  que existe um ditado Anglo-Saxónico correspondente ao tal da "agua de malvas" ...  ;D  ;D  ;D

Vai ver o erro também é o mesmo...  ???