merci
+17
nezumi
skas23
Krispies
deathflyer
Naudnaud
freeman83
Necrozia
obelix21
ZeTsUnAmY
blevanaks
Les Choux
maxdarkdog
ju76
DJABA
MISTER DEE
ptimaicosto
csbrico
21 participants
Bombe Airsoft
DJABA- Messages : 11
Date d'inscription : 31/07/2012
Age : 44
Localisation : LIOMER
- Message n°26
Re: Bombe Airsoft
c est bon sa marche nickel chez moi
merci
merci
maxdarkdog- ecrou or
- Messages : 507
Date d'inscription : 29/12/2011
Age : 38
Localisation : Strasbourg
- Message n°27
Re: Bombe Airsoft
tu a utilisé quel système?DJABA a écrit:c est bon sa marche nickel chez moi
merci
DJABA- Messages : 11
Date d'inscription : 31/07/2012
Age : 44
Localisation : LIOMER
- Message n°28
Re: Bombe Airsoft
j ai utilisé un arduino duemilanove
maxdarkdog- ecrou or
- Messages : 507
Date d'inscription : 29/12/2011
Age : 38
Localisation : Strasbourg
- Message n°29
Re: Bombe Airsoft
ah jpensait pour l'inflammateur
pic-pac- ecrou or
- Messages : 663
Date d'inscription : 20/06/2011
Age : 43
Localisation : Issoire (63)
- Message n°30
Re: Bombe Airsoft
Nickel djaba c'est cool
ju76- vis rouillée
- Messages : 24
Date d'inscription : 05/01/2013
Age : 42
Localisation : Seine maritime
- Message n°31
Re: Bombe Airsoft
J'utilise arduino uno et probleme avec le code:
byte rowPins[ROWS] = {A1, A2, A3, A4}; //connect to the row pinouts of the keypad
error: 'A1' was not declared in this scope In function 'void loop()':
#include <Keypad.h>
#include <LiquidCrystal.h>
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(8, 9, 10, 11, 12, 13);
// set up the LCD's number of columns and rows:
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] = {A1, A2, A3, A4}; //connect to the row pinouts of the keypad
byte colPins[COLS] = {5, 6, 7}; //connect to the column pinouts of the keypad
Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );
//Define all the bomb states
#define READY 0
#define ARMED 1
#define DISARMED 2
#define DETONATED 3
#define speakerPin 2
int second=30, minute=1, hour=0; // declare time variables
int bombState=0; //0 = Ready, 1 = Armed, 2 = Disarmed, 3 = detonated
int repeat=0;//flag to prevent repeat of getArmCode();
int repeatAdm=0; //flag to prevent repeat of getAadminCode();
int repeatDisarm=0;//flag to prevent repeat of getDisarmCode();
int repeatBuzzer=0;//flag to prevent buzzer from running multiple times.
int repeatTimerEdit=0;//flag to prevent repeat of timer edit function
//int speakerPin = 2;//pin that the piezo buzzer is connected to.
int blinkArmed = 0; // flag for blink text
int blinkDisarmed = 0; // flag to blink disarmed msg
int nbBlinkDisarmed = 6; // flag for number of blink disarmed msg (real number of blink = nbBlinkDisarmed / 2)
long previousTime = 0;//holds previous time in ms
long previousDelay = 0;//holds previous time in ms since buzzer was active
long interval = 60000;//60 second delay
char hour_str[4]; // For Convert int in char
char minute_str[4]; // For Convert int in char
char second_str[4]; // For Convert int in char
char timeInt_str[0]; // For Convert int in char
char newcode_str[0];
char newarmcode_str[0];
char newdisarmcode_str[0];
char ArmCode[] = "123456";//code to arm the bomb
char disarmCode[] = "123456";//code to disarm the bomb
char adminCode[] = "123456";//code to change timer
char ENTER_KEY = '#';
char CANCEL_KEY = '*';//stores the cancel key variable.
char timeSetKey = '*';//key to press to set the code.
void setup()
{lcd.begin(16, 2);
lcd.clear();
lcd.setCursor(2, 0 );
lcd.print( "Bombe Factice" );
lcd.setCursor( 3, 1 );
lcd.print( "GOOD GAME" );
delay(2000);
lcd.setCursor( 2, 0 );
lcd.print( "Bombe Factice" );
lcd.setCursor( 3, 1 );
lcd.print( "BY PIC-PAC" );
delay(2000);
lcd.clear();
////backlightOn();
//blinkCursor();
//stopVscroll();
pinMode(speakerPin, OUTPUT);//sets the output pin for the piezo buzzer
}
void loop(){
switch (bombState) {
lcd.clear();
/***********************************************************
*Ready state prepares bomb, waits for arm code to be input
*
************************************************************/
case READY:
int resultOfGetArmCode;
lcd.clear();
lcd.setCursor(0, 0 );
delay(100);
//showCursor();
//blinkCursor();
lcd.print("Enter ArmCode :"); //Notify user of status.
resultOfGetArmCode = getArmCode();
if (resultOfGetArmCode == 1) {
lcd.clear();
lcd.setCursor(0, 0 );
delay(100);
lcd.print("Correct");
delay(500);
lcd.clear();
bombState = ARMED; //Start countdown
}//Close getArmCode(); = true
if (resultOfGetArmCode == 0) { //if code fails print "Incorrect"
tryAgainMsg();
}// Close getArmCode(); = false.
break;
/**************************************************
*Armed state. Countdown starts, waits for pushbutton to be pressed.
*If button is pressed, wait for code from keypad.
***************************************************/
case ARMED:
{
char disarmKey = keypad.getKey();
if (disarmKey == '#') {
char reslutOfDisarm;
lcd.clear();
lcd.setCursor(0, 0 );
delay(100);
lcd.print("Enter DisarmCode"); //if disarm button is pressed, ask user to input code.
reslutOfDisarm = getDisarmCode();
if (reslutOfDisarm == true) {
lcd.clear();
bombState = DISARMED; //and set bombState to disarmed.
break;
} //close getDisarmCode(); = True
if (reslutOfDisarm == false) {
tryAgainMsg();
byte rowPins[ROWS] = {A1, A2, A3, A4}; //connect to the row pinouts of the keypad
error: 'A1' was not declared in this scope In function 'void loop()':
#include <Keypad.h>
#include <LiquidCrystal.h>
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(8, 9, 10, 11, 12, 13);
// set up the LCD's number of columns and rows:
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] = {A1, A2, A3, A4}; //connect to the row pinouts of the keypad
byte colPins[COLS] = {5, 6, 7}; //connect to the column pinouts of the keypad
Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );
//Define all the bomb states
#define READY 0
#define ARMED 1
#define DISARMED 2
#define DETONATED 3
#define speakerPin 2
int second=30, minute=1, hour=0; // declare time variables
int bombState=0; //0 = Ready, 1 = Armed, 2 = Disarmed, 3 = detonated
int repeat=0;//flag to prevent repeat of getArmCode();
int repeatAdm=0; //flag to prevent repeat of getAadminCode();
int repeatDisarm=0;//flag to prevent repeat of getDisarmCode();
int repeatBuzzer=0;//flag to prevent buzzer from running multiple times.
int repeatTimerEdit=0;//flag to prevent repeat of timer edit function
//int speakerPin = 2;//pin that the piezo buzzer is connected to.
int blinkArmed = 0; // flag for blink text
int blinkDisarmed = 0; // flag to blink disarmed msg
int nbBlinkDisarmed = 6; // flag for number of blink disarmed msg (real number of blink = nbBlinkDisarmed / 2)
long previousTime = 0;//holds previous time in ms
long previousDelay = 0;//holds previous time in ms since buzzer was active
long interval = 60000;//60 second delay
char hour_str[4]; // For Convert int in char
char minute_str[4]; // For Convert int in char
char second_str[4]; // For Convert int in char
char timeInt_str[0]; // For Convert int in char
char newcode_str[0];
char newarmcode_str[0];
char newdisarmcode_str[0];
char ArmCode[] = "123456";//code to arm the bomb
char disarmCode[] = "123456";//code to disarm the bomb
char adminCode[] = "123456";//code to change timer
char ENTER_KEY = '#';
char CANCEL_KEY = '*';//stores the cancel key variable.
char timeSetKey = '*';//key to press to set the code.
void setup()
{lcd.begin(16, 2);
lcd.clear();
lcd.setCursor(2, 0 );
lcd.print( "Bombe Factice" );
lcd.setCursor( 3, 1 );
lcd.print( "GOOD GAME" );
delay(2000);
lcd.setCursor( 2, 0 );
lcd.print( "Bombe Factice" );
lcd.setCursor( 3, 1 );
lcd.print( "BY PIC-PAC" );
delay(2000);
lcd.clear();
////backlightOn();
//blinkCursor();
//stopVscroll();
pinMode(speakerPin, OUTPUT);//sets the output pin for the piezo buzzer
}
void loop(){
switch (bombState) {
lcd.clear();
/***********************************************************
*Ready state prepares bomb, waits for arm code to be input
*
************************************************************/
case READY:
int resultOfGetArmCode;
lcd.clear();
lcd.setCursor(0, 0 );
delay(100);
//showCursor();
//blinkCursor();
lcd.print("Enter ArmCode :"); //Notify user of status.
resultOfGetArmCode = getArmCode();
if (resultOfGetArmCode == 1) {
lcd.clear();
lcd.setCursor(0, 0 );
delay(100);
lcd.print("Correct");
delay(500);
lcd.clear();
bombState = ARMED; //Start countdown
}//Close getArmCode(); = true
if (resultOfGetArmCode == 0) { //if code fails print "Incorrect"
tryAgainMsg();
}// Close getArmCode(); = false.
break;
/**************************************************
*Armed state. Countdown starts, waits for pushbutton to be pressed.
*If button is pressed, wait for code from keypad.
***************************************************/
case ARMED:
{
char disarmKey = keypad.getKey();
if (disarmKey == '#') {
char reslutOfDisarm;
lcd.clear();
lcd.setCursor(0, 0 );
delay(100);
lcd.print("Enter DisarmCode"); //if disarm button is pressed, ask user to input code.
reslutOfDisarm = getDisarmCode();
if (reslutOfDisarm == true) {
lcd.clear();
bombState = DISARMED; //and set bombState to disarmed.
break;
} //close getDisarmCode(); = True
if (reslutOfDisarm == false) {
tryAgainMsg();
pic-pac- ecrou or
- Messages : 663
Date d'inscription : 20/06/2011
Age : 43
Localisation : Issoire (63)
- Message n°32
Re: Bombe Airsoft
voila un petit fichier zip avec mes 2 projets pour ceux qui en aurait besoin
http://dl.free.fr/n17Tjs5wr
ou
http://7b85vo.1fichier.com/arduino.zip
tenez nous au jus de votre avancé!!!!!
http://dl.free.fr/n17Tjs5wr
ou
http://7b85vo.1fichier.com/arduino.zip
tenez nous au jus de votre avancé!!!!!
Dernière édition par pic-pac le Jeu 19 Sep - 21:28, édité 1 fois
pic-pac- ecrou or
- Messages : 663
Date d'inscription : 20/06/2011
Age : 43
Localisation : Issoire (63)
- Message n°33
Re: Bombe Airsoft
Yop je viens de voir une erreur sur mon schéma le buzzer n'est pas connecté sur la pâte 2 de l'ATMEGA mais sur la pâte 4
pic-pac- ecrou or
- Messages : 663
Date d'inscription : 20/06/2011
Age : 43
Localisation : Issoire (63)
- Message n°34
Re: Bombe Airsoft
Coucou je viens vous donner mon nouveau code que j'ai remis à jour avec l'option fil à couper
!!!!ATTENTION LES POSITIONS DES SORTIES ONT ÉTÉS MODIFIES !!!!
- Code:
/******************************************************************************************
* Airsoft C4 Prop by Joshua Burgess
* v3 modify by PIC-PAC
* 19/09/2013
*******************************************************************************************/
/******************************************************************************************
*
* TO DO
* plus rien pour l'instant
*******************************************************************************************/
#include <Keypad.h>
#include <LiquidCrystal.h>
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(8, 9, 10, 11, 12, 13);
// set up the LCD's number of columns and rows:
int boom;
int ouf;
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] = {A0, A1, A2, A3}; //connect to the row pinouts of the keypad
byte colPins[COLS] = {A4, A5, 7}; //connect to the column pinouts of the keypad
Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );
//Define all the bomb states
#define READY 0
#define ARMED 1
#define DISARMED 2
#define DETONATED 3
#define speakerPin 0
int second=30, minute=1, hour=0; // declare time variables
int bombState=0; //0 = Ready, 1 = Armed, 2 = Disarmed, 3 = detonated
int repeat=0;//flag to prevent repeat of getArmCode();
int repeatAdm=0; //flag to prevent repeat of getAadminCode();
int repeatDisarm=0;//flag to prevent repeat of getDisarmCode();
int repeatBuzzer=0;//flag to prevent buzzer from running multiple times.
int repeatTimerEdit=0;//flag to prevent repeat of timer edit function
//int speakerPin = 2;//pin that the piezo buzzer is connected to.
int blinkArmed = 0; // flag for blink text
int blinkDisarmed = 0; // flag to blink disarmed msg
int nbBlinkDisarmed = 6; // flag for number of blink disarmed msg (real number of blink = nbBlinkDisarmed / 2)
long previousTime = 0;//holds previous time in ms
long previousDelay = 0;//holds previous time in ms since buzzer was active
long interval = 60000;//60 second delay
char hour_str[4]; // For Convert int in char
char minute_str[4]; // For Convert int in char
char second_str[4]; // For Convert int in char
char timeInt_str[0]; // For Convert int in char
char newcode_str[0];
char newarmcode_str[0];
char newdisarmcode_str[0];
char boom_str[0];
char ouf_str[0];
char continui1;
char continui2;
char ArmCode[] = "123456";//code to arm the bomb
char disarmCode[] = "123456";//code to disarm the bomb
char adminCode[] = "123456";//code to change timer
char ENTER_KEY = '#';
char CANCEL_KEY = '*';//stores the cancel key variable.
char timeSetKey = '*';//key to press to set the code.
void setup()
{
pinMode(5, OUTPUT);
//les cables doivent tous etre branchés sur la sortie 5
pinMode(1, INPUT);
pinMode(2, INPUT);
pinMode(3, INPUT);
pinMode(4, INPUT);
// On passe les cables au niveau haut
digitalWrite(5, HIGH);
lcd.begin(16, 2);
lcd.clear();
lcd.setCursor(2, 0 );
lcd.print( "Bombe Factice" );
lcd.setCursor( 3, 1 );
lcd.print( "GOOD GAME" );
delay(2000);
lcd.setCursor( 2, 0 );
lcd.print( "Bombe Factice" );
lcd.setCursor( 3, 1 );
lcd.print( "BY PIC-PAC" );
delay(2000);
lcd.clear();
pinMode(speakerPin, OUTPUT);//sets the output pin for the piezo buzzer
}
void loop(){
switch (bombState) {
lcd.clear();
/***********************************************************
*Ready state prepares bomb, waits for arm code to be input
*
************************************************************/
case READY:
int resultOfGetArmCode;
lcd.clear();
lcd.setCursor(0, 0 );
delay(100);
//showCursor();
//blinkCursor();
lcd.print("Enter ArmCode :"); //Notify user of status.
resultOfGetArmCode = getArmCode();
if (resultOfGetArmCode == 1) {
lcd.clear();
lcd.setCursor(0, 0 );
delay(100);
lcd.print("Correct");
delay(500);
lcd.clear();
bombState = ARMED; //Start countdown
}//Close getArmCode(); = true
if (resultOfGetArmCode == 0) { //if code fails print "Incorrect"
tryAgainMsg();
}// Close getArmCode(); = false.
break;
/**************************************************
*Armed state. Countdown starts, waits for pushbutton to be pressed.
*If button is pressed, wait for code from keypad.
***************************************************/
case ARMED:
{
continuite1();
continuite2();
continui1 = continuite1();
continui2 = continuite2();
if (continui1 == false) {
bombState = DETONATED; //and set bombState to disarmed.
break;
}
if (continui2 == true) {
bombState = DISARMED; //and set bombState to disarmed.
break;
}
char disarmKey = keypad.getKey();
if (disarmKey == '#') {
char reslutOfDisarm;
lcd.clear();
lcd.setCursor(0, 0 );
lcd.print("Enter DisarmCode"); //if disarm button is pressed, ask user to input code.
reslutOfDisarm = getDisarmCode();
if (reslutOfDisarm == true) {
lcd.clear();
bombState = DISARMED; //and set bombState to disarmed.
break;
} //close getDisarmCode(); = True
if (reslutOfDisarm == false) {
tryAgainMsg();
if (second >= 15) {
second = second - 15;
}
else {
if (minute == 0 && hour == 0) {
second=1; //detonate.
}
if (minute > 0) {
second = 60 - (15 - second);
minute = minute - 1;
}
if (hour > 0 && minute == 0) {
second = 60 - (15 - second);
minute = 59;
hour = hour - 1 ;
}
}
} //close getDisarmCode(); = false
} //close if
}
countdown(); //if disarm key has not been pressed, continue countdown.
break;
/**************************************************************
*DISARMED. Counter stopped, displays "bomb disarmed"
*
**************************************************************/
case DISARMED:
int blinkDisarmFlag;
blinkDisarmFlag = 0;
//hideCursor();
for (nbBlinkDisarmed; nbBlinkDisarmed > 0; nbBlinkDisarmed--){ // blink msg
if (blinkDisarmFlag == 1){
lcd.setCursor(2, 0 );
lcd.print("BOMB DISARMED"); //bomb has been disarmed, inform user.
lcd.setCursor(2, 1 );
lcd.print("GOOD JOB TEAM");
delay(1000);
lcd.setCursor(2, 0 );
lcd.print("GOOD JOB TEAM"); //bomb has been disarmed, inform user.
lcd.setCursor(2, 1 );
lcd.print("BOMB DISARMED");
delay(9000);
asm volatile (" jmp 0");
blinkDisarmFlag = 0;
}
else{
lcd.clear();
delay(1000);
blinkDisarmFlag = 1;
}
} // end blink
break;
/*******************************************************
*Detonated. activate buzzer for 8 beeps, then 1 long.
*Print "Have A Nice Day. to LCD.
********************************************************/
case DETONATED:
if (repeatBuzzer == 0) { //make sure buzzer for loop has not already been run.
digitalWrite(speakerPin, HIGH);//turn on buzzer
lcd.clear();
lcd.setCursor(0, 0 );
lcd.print("BOOOOOOOOOOOOOOM"); //loop message informing user of bomb detonation.
http://lcd.setCursor(0, 1 );
http://lcd.print("Have A Nice Day"); //loop message informing user of bomb detonation.
delay(5000);//wait 5 seconds
digitalWrite(speakerPin, LOW);//turn off buzzer
repeatBuzzer = 1;//set flag to prevent code from looping again.
}
else {
http://lcd.setCursor(0, 0 );
http://lcd.print("BOOOOOOOOOOOOOOM"); //loop message informing user of bomb detonation.
lcd.setCursor(0, 1 );
lcd.print("Have A Nice Day"); //loop message informing user of bomb detonation.
delay(9000);
asm volatile (" jmp 0");
}
}//closes switch
}//closes loop
/*void software_Reset()
{
}*/
/***********************************************************
* Main countdown timer *
* countdown() *
************************************************************/
void countdown(){
static unsigned long lastTick = 0; // set up a local variable to hold the last time we decremented one second
static unsigned long currentMillis = 0;
// (static variables are initialized once and keep their values between function calls)
// decrement one second every 1000 milliseconds
if (second > 0) {
if (millis() - lastTick >= 1000) {
lastTick = millis();
second--;
serialOutput();
}
}
// decrement one minute every 60 seconds
if (minute > 0) {
if (second <= 0) {
minute--;
second = 60; // reset seconds to 60
}
}
// decrement one hour every 60 minutes
if (hour > 0) {
if (minute <= 0) {
hour--;
minute = 60; // reset minutes to 60
}//closes if
}//closes if
//the code below beeps the siren once every minute.
currentMillis = millis();
if (currentMillis - previousTime > interval)
{
previousTime = currentMillis;
previousDelay = currentMillis;
digitalWrite(speakerPin, HIGH);//turn on buzzer
}
if (currentMillis - previousDelay > 100) {//100ms chirp duration
digitalWrite(speakerPin, LOW);//turn off buzzer
}
} //close countdown();
/***********************************************************************
* getArmCode(); *
* Grabs the code to arm the bomb from the keypad. *
* *
************************************************************************/
boolean getArmCode(){
// returns true when all PW keys are pressed in sequence
// returns false when number of keys in pW pressed but don't exactly match the PW
// CANCEL_KEY erases all previous digits input
int count=0; // how many keys we have
int matchCount=0; // how many keys match
lcd.setCursor(0, 1 );
if(repeat == 0){
for(count=0, matchCount=0; count < sizeof(ArmCode)-1; count++){
char key;
char key_str[0]; // Define as string
do{
key = keypad.getKey();
delay (100);
}
while(key == '\0');
key_str[0] = key;
lcd.print(key_str);
if (key == timeSetKey && repeatTimerEdit == 0){
// ***************** MOD HERE ********************* ============> Random codes for arm & disarm
timerSet();
return 2;
}
if(key == ArmCode[count]) {
matchCount++;
}
else if(key == CANCEL_KEY){
count=0;
matchCount=0;
return 0;
}
}//close for loop
}//close repeat flag check
// here when the same number of keys pressed as characters in the PW
if(matchCount == count) {
repeat=1;
return 1;
}
else {
return 0;
}
}//close getArmCode();
/**********************************************************************
* continuite(); *
* continuité sur les fils. *
* *
***********************************************************************/
boolean continuite1(){
// si le fil d'explosion est coupé :
if (digitalRead(boom) == LOW) {
return false; // on renvoie 0
}
else {
return true;
}
}
boolean continuite2(){
// si le fil de désamorçage est coupé :
if (digitalRead(ouf) == LOW) {
return true; // on renvoie 1
}
else {
return false;
}
}
/**********************************************************************
* getDisarmCode(); *
* Gets disarm code from keypad. *
* *
***********************************************************************/
boolean getDisarmCode(){
// returns true when all PW keys are pressed in sequence
// returns false when number of keys in pW pressed but don't exactly match the PW
// CANCEL_KEY erases all previous digits input
int count=0; // how many keys we have
int matchCount=0; // how many keys match
long disarmTime = millis()+7000L;//7000 instead of 15000 b/c of added delays making total 30s
lcd.setCursor(0, 1 );
//showCursor();
//blinkCursor();
if(repeatDisarm == 0){
for(count=0, matchCount=0; count < sizeof(disarmCode)-1; count++){
char key;
char key_str[0]; // Define as string
do{
if(disarmTime < millis()){ //if 15 seconds have passed, bail out
break;
}
key = keypad.getKey();
delay (100);
}
while(key == '\0');
key_str[0] = key;
lcd.print(key_str);
if(key == disarmCode[count]) {
matchCount++;
}
else if(key == CANCEL_KEY){
count=0;
matchCount=0;
return false;
}
if(disarmTime < millis()) {
return false;
break;
}
}// close for loop
} //close repeat flag check
// here when the same number of keys pressed as characters in the PW
if(matchCount == count) {
repeatDisarm=1;
return true;
}
else {
return false;
}
}//close getDisarmCode();
/**********************************************************************
* getAdminCode(); *
* Gets admin code from keypad. *
* *
***********************************************************************/
boolean getAdminCode(){
// returns true when all PW keys are pressed in sequence
// returns false when number of keys in pW pressed but don't exactly match the PW
// CANCEL_KEY erases all previous digits input
int count=0; // how many keys we have
int matchCount=0; // how many keys match
lcd.setCursor(0, 1 );
for(count=0, matchCount=0; count < sizeof(adminCode)-1; count++){
char key;
char key_str[0]; // Define as string
do{
key = keypad.getKey();
delay (100);
}
while(key == '\0');
// itoa(key, key_str,10);
key_str[0] = key;
lcd.print(key_str);
// lcd.print(itoa(key, key_str,16));
if(key == adminCode[count]) {
matchCount++;
}
else if(key == CANCEL_KEY){
count=0;
matchCount=0;
return false;
}
}// close for loop
// here when the same number of keys pressed as characters in the PW
if(matchCount == count) {
return true;
}
else{
return false;
}
// Do nothing if pwd is false / Parent function send tryAgin msg
}//close getAdminCode();
/*********************************************************************
* Timer edit function *
* *
* *
**********************************************************************/
void timerSet(){
lcd.clear();
lcd.print("Enter AdminCode");
char resultOfGetAdmCode;
resultOfGetAdmCode = getAdminCode();
if (resultOfGetAdmCode == true){
char timeInt;
char newcode;
char newarmcode;
char newdisarmcode;
char menupage;
int newadmincode;
lcd.clear();
lcd.setCursor(0, 0 );
lcd.print("1.Admin 2.Time");
lcd.setCursor(0, 1 );
lcd.print("3.Arm 4.Disarm");
delay (2000);
lcd.clear();
lcd.setCursor(0, 0 );
lcd.print("3.Arm 4.Disarm");
lcd.setCursor(0, 1 );
lcd.print("5.Wire");
do{
menupage = keypad.getKey();
}
while(menupage == '\0' || menupage == '*' || menupage == '0' || menupage > '5');
switch(menupage) {
case '1': // Edit admin code
lcd.clear();
lcd.setCursor(0, 0 );
lcd.print("new admin code :");
lcd.setCursor(0, 1 );
do{
newcode = keypad.getKey();
delay (100);
}
while(newcode == '\0');
newcode_str[0] = newcode;
lcd.print(newcode_str);
adminCode[0] = newcode_str[0];
newadmincode = (newcode - '0') * 10;//get first digit and convert to int
do{
newcode = keypad.getKey();
delay (100);
}
while(newcode == '\0');
newcode_str[0] = newcode;
lcd.print(newcode_str);
adminCode[1] = newcode_str[0];
newadmincode = (newcode - '0') + newadmincode;//get second digit.
do{
newcode = keypad.getKey();
delay (100);
}
while(newcode == '\0');
newcode_str[0] = newcode;
lcd.print(newcode_str);
adminCode[2] = newcode_str[0];
newadmincode = (newcode - '0') + newadmincode;//get 3rd digit.
do{
newcode = keypad.getKey();
delay (100);
}
while(newcode == '\0');
newcode_str[0] = newcode;
lcd.print(newcode_str);
adminCode[3] = newcode_str[0];
newadmincode = (newcode - '0') + newadmincode;//get 4th digit.
do{
newcode = keypad.getKey();
delay (100);
}
while(newcode == '\0');
newcode_str[0] = newcode;
lcd.print(newcode_str);
adminCode[4] = newcode_str[0];
newadmincode = (newcode - '0') + newadmincode;//get 5th digit.
do{
newcode = keypad.getKey();
delay (100);
}
while(newcode == '\0');
newcode_str[0] = newcode;
lcd.print(newcode_str);
adminCode[5] = newcode_str[0];
newadmincode = (newcode - '0') + newadmincode;//get 6th digit.
//newcode = 'L';
lcd.clear();
lcd.setCursor(0, 0 );
lcd.print("NEW ADMINCODE");
lcd.setCursor(0, 1 );
lcd.print(adminCode);
delay(5000);
lcd.clear();
break;
case '3': // Edit armcode
lcd.clear();
lcd.setCursor(0, 0 );
lcd.print("new armcode :");
lcd.setCursor(0, 1 );
do{
newarmcode = keypad.getKey();
delay (100);
}
while(newarmcode == '\0');
newarmcode_str[0] = newarmcode;
lcd.print(newarmcode_str);
ArmCode[0] = newarmcode_str[0];
newarmcode = (newarmcode - '0') * 10;//get first digit and convert to int
do{
newarmcode = keypad.getKey();
delay (100);
}
while(newarmcode == '\0');
newarmcode_str[0] = newarmcode;
lcd.print(newarmcode_str);
ArmCode[1] = newarmcode_str[0];
newarmcode = (newarmcode - '0') + newarmcode;//get second digit.
do{
newarmcode = keypad.getKey();delay (100);
}
while(newarmcode == '\0');
newarmcode_str[0] = newarmcode;
lcd.print(newarmcode_str);
ArmCode[2] = newarmcode_str[0];
newarmcode = (newarmcode - '0') + newarmcode;//get 3rd digit.
do{
newarmcode = keypad.getKey();
delay (100);
}
while(newarmcode == '\0');
newarmcode_str[0] = newarmcode;
lcd.print(newarmcode_str);
ArmCode[3] = newarmcode_str[0];
newarmcode = (newarmcode - '0') + newarmcode;//get 4th digit.
do{
newarmcode = keypad.getKey();
delay (100);
}
while(newarmcode == '\0');
newarmcode_str[0] = newarmcode;
lcd.print(newarmcode_str);
ArmCode[4] = newarmcode_str[0];
newarmcode = (newarmcode - '0') + newarmcode;//get 5th digit.
do{
newarmcode = keypad.getKey();
delay (100);
}
while(newarmcode == '\0');
newarmcode_str[0] = newarmcode;
lcd.print(newarmcode_str);
ArmCode[5] = newarmcode_str[0];
newarmcode = (newarmcode - '0') + newarmcode;//get 6th digit.
//newcode = 'L';
lcd.clear();
lcd.setCursor(0, 0 );
lcd.print("NEW ARMCODE");
lcd.setCursor(0, 1 );
lcd.print(ArmCode);
delay(5000);
lcd.clear();
break;
case '4': // Edit disarmcode
lcd.clear();
lcd.setCursor(0, 0 );
lcd.print("new disarmcode :");
lcd.setCursor(0, 1 );
do{
newdisarmcode = keypad.getKey();
delay (100);
}
while(newdisarmcode == '\0');
newdisarmcode_str[0] = newdisarmcode;
lcd.print(newdisarmcode_str);
disarmCode[0] = newdisarmcode_str[0];
newdisarmcode = (newdisarmcode - '0') * 10;//get first digit and convert to int
do{
newdisarmcode = keypad.getKey();
delay (100);
}
while(newdisarmcode == '\0');
newdisarmcode_str[0] = newdisarmcode;
lcd.print(newdisarmcode_str);
disarmCode[1] = newdisarmcode_str[0];
newdisarmcode = (newdisarmcode - '0') + newdisarmcode;//get second digit.
do{
newdisarmcode = keypad.getKey();
delay (100);
}
while(newdisarmcode == '\0');
newdisarmcode_str[0] = newdisarmcode;
lcd.print(newdisarmcode_str);
disarmCode[2] = newdisarmcode_str[0];
newdisarmcode = (newdisarmcode - '0') + newdisarmcode;//get 3rd digit.
do{
newdisarmcode = keypad.getKey();
delay (100);
}
while(newdisarmcode == '\0');
newdisarmcode_str[0] = newdisarmcode;
lcd.print(newdisarmcode_str);
disarmCode[3] = newdisarmcode_str[0];
newdisarmcode = (newdisarmcode - '0') + newdisarmcode;//get 4th digit.
do{
newdisarmcode = keypad.getKey();
delay (100);
}
while(newdisarmcode == '\0');
newdisarmcode_str[0] = newdisarmcode;
lcd.print(newdisarmcode_str);
disarmCode[4] = newdisarmcode_str[0];
newdisarmcode = (newdisarmcode - '0') + newdisarmcode;//get 5th digit.
do{
newdisarmcode = keypad.getKey();
delay (100);
}
while(newdisarmcode == '\0');
newdisarmcode_str[0] = newdisarmcode;
lcd.print(newdisarmcode_str);
disarmCode[5] = newdisarmcode_str[0];
newdisarmcode = (newdisarmcode - '0') + newdisarmcode;//get 6th digit.
//newcode = 'L';
lcd.clear();
lcd.setCursor(0, 0 );
lcd.print("NEW DISARMCODE");
lcd.setCursor(0, 1 );
lcd.print(disarmCode);
delay(5000);
lcd.clear();
break;
case '5': //fil a couper
lcd.clear();
lcd.setCursor(0, 0 );
lcd.print("Choose Wire BOOM");
do{
boom = keypad.getKey();
}
while(boom == '\0' || boom < '0' || boom > '4');
boom_str[0] = boom;
boom = atoi (boom_str);
lcd.setCursor(0, 1 );
lcd.print(boom);
delay (2000);
lcd.clear();
lcd.setCursor(0, 0 );
lcd.print("Choose Wire OUF");
do{
ouf = keypad.getKey();
}
while(ouf == '\0' || ouf < '0' || ouf > '4');
ouf_str[0] = ouf;
ouf = atoi (ouf_str);
lcd.setCursor(0, 1 );
lcd.print(ouf);
delay (2000);
break;
case '2': // Timer
lcd.clear();
lcd.print("Enter xx Hours");
lcd.setCursor(0, 1 );
do{
timeInt = keypad.getKey();
}
while(timeInt == '\0' || timeInt < '0' || timeInt > '6');
timeInt_str[0] = timeInt;
lcd.print(timeInt_str);
hour = (timeInt - '0') * 10;//get first digit and convert to int
do{
timeInt = keypad.getKey();
}
while(timeInt == '\0');
timeInt_str[0] = timeInt;
lcd.print(timeInt_str);
hour = (timeInt - '0') + hour;//get second digit.
delay(800);
lcd.clear();
timeInt = 'L';
// ------------------------------------------------------------------
lcd.print("Enter xx Minutes");
lcd.setCursor(0, 1 );
do{
timeInt = keypad.getKey();
}
while(timeInt == '\0' || timeInt < '0' || timeInt > '6');
timeInt_str[0] = timeInt;
lcd.print(timeInt_str);
while (timeInt < '0' || timeInt > '6'){
timeInt = keypad.getKey();
}
minute = (timeInt - '0') * 10;//get first digit and convert to int
do{
timeInt = keypad.getKey();
}
while(timeInt == '\0');
minute = (timeInt - '0') + minute;//get second digit.
timeInt_str[0] = timeInt;
lcd.print(timeInt_str);
delay(800);
lcd.clear();
timeInt = 'L';
// ------------------------------------------------------------------
lcd.print("Enter xx Seconds");
lcd.setCursor(0, 1 );
do{
timeInt = keypad.getKey();
}
while(timeInt == '\0' || timeInt < '0' || timeInt > '6');
timeInt_str[0] = timeInt;
lcd.print(timeInt_str);
while (timeInt < '0' || timeInt > '6'){
timeInt = keypad.getKey();
}
second = (timeInt - '0') * 10;//get first digit and convert to int
do{
timeInt = keypad.getKey();
}
while(timeInt == '\0');
second = (timeInt - '0') + second;//get second digit.
timeInt_str[0] = timeInt;
lcd.print(timeInt_str);
delay(800);
lcd.clear();
timeInt = 'L';
lcd.print("Time set :");
lcd.setCursor(0, 1 );
itoa (hour, hour_str, 10);
itoa (minute, minute_str, 10);
itoa (second, second_str, 10);
lcd.print(hour_str);
lcd.print(":");
lcd.print(minute_str);
lcd.print(":");
lcd.print(second_str);
delay(2000);
// ---------------------- Put randomize here --------------------------
repeatTimerEdit = 1;
}//end of getAdminCode == true
if(resultOfGetAdmCode == false){
tryAgainMsg();
// Do nothing if pwd is false / Parent function send tryAgin msg
}
lcd.clear();
}//end of timer edit function
}
/****************************************************************
* serialOutput(); *
* prints the values of the timer over the serial connection *
* and onto the LCD *
*****************************************************************/
void serialOutput() {
itoa (hour, hour_str, 10);
itoa (minute, minute_str, 10);
itoa (second, second_str, 10);
if(bombState != DISARMED){
lcd.setCursor(0, 0 );
delay(20);
if (blinkArmed == 0){
lcd.print("!! ARMED !!");
blinkArmed=1;
}
else {
lcd.print("!! !!");
blinkArmed=0;
}
lcd.setCursor(0, 1 );
lcd.print("Time = ");
if (hour <=9) {
lcd.print("0");
lcd.print(hour_str); // the hour, sent to the screen in decimal format
}
else{
lcd.print(hour_str);
}
lcd.print(":"); // a colon between the hour and the minute
if (minute <=9) {
lcd.print("0");
lcd.print(minute_str); // the minute, sent to the screen in decimal format
}
else{
lcd.print(minute_str);
}
lcd.print(":"); // a colon between the minute and the second
if (second <=9) {
lcd.print("0");
lcd.print(second_str); // the minute, sent to the screen in decimal format
}
else{
lcd.print(second_str);
}
//termination condition
}
if (second == 0 && minute == 0 && hour == 0) {
lcd.clear();
bombState = DETONATED; //clear LCD and set bomb state to "detonated" when timer runs out
}
if (bombState == DISARMED) {
lcd.clear();
}
}//close serialOutput();
void tryAgainMsg(){
lcd.clear();
//hideCursor();
delay(100);
lcd.print("T");
delay(150);
lcd.print("r");
delay(150);
lcd.print("y");
delay(150);
lcd.print(" ");
delay(150);
lcd.print("a");
delay(150);
lcd.print("g");
delay(150);
lcd.print("a");
delay(150);
lcd.print("i");
delay(150);
lcd.print("n");
delay(150);
lcd.print(" ");
delay(150);
lcd.print("!");
delay(1000);
}
void incorrectMsg(){
lcd.clear();
delay(100);
lcd.print("I");
delay(350);
lcd.print("n");
delay(350);
lcd.print("c");
delay(350);
lcd.print("o");
delay(350);
lcd.print("r");
delay(350);
lcd.print("r");
delay(350);
lcd.print("e");
delay(350);
lcd.print("c");
delay(350);
lcd.print("t");
delay(1000);
}
//END of bomb program.
DJABA- Messages : 11
Date d'inscription : 31/07/2012
Age : 44
Localisation : LIOMER
- Message n°35
Re: Bombe Airsoft
Salut
J ai testé l'option de fils a coupé et je n'arrive pas à le faire fonctionner
Comment fonctionne-t-il ?
Merci
J ai testé l'option de fils a coupé et je n'arrive pas à le faire fonctionner
Comment fonctionne-t-il ?
Merci
ju76- vis rouillée
- Messages : 24
Date d'inscription : 05/01/2013
Age : 42
Localisation : Seine maritime
- Message n°36
Re: Bombe Airsoft
Bon je reste sur la premiere version.
Faut que je trouve le buzzer qui va bien.
J'ai pas encore testé les inflammateur va falloir que je vois ca.
Faut que je trouve le buzzer qui va bien.
J'ai pas encore testé les inflammateur va falloir que je vois ca.
pic-pac- ecrou or
- Messages : 663
Date d'inscription : 20/06/2011
Age : 43
Localisation : Issoire (63)
- Message n°37
Re: Bombe Airsoft
J'ai fais des tests hier, le code que j'ai donné fonctionnait avec ma pile usager, mais avec ma pile neuve il ne fonctionnait pas.
Comme je ne m'avoue pas vaincue par un ordinateur j'ai trouvé la solution il faut donc tout simplement brancher un fil sur le +5V au lieu de la sortie 5 (car elle ne sort pas assez de jus et passe la bombe en booooooom)
Il faut donc un fil qui sort du +5V et qui est relié aux 4 fils qui sortent des sorties 1, 2, 3, 4
!!!!! ATTENTION J'AI DÉCALÉ LES SORTIE ENTRE LA PREMIÈRE ET LA 2ème VERSION !!!!!!
Je vous ferais un schéma un peu plus tard.
Comme je ne m'avoue pas vaincue par un ordinateur j'ai trouvé la solution il faut donc tout simplement brancher un fil sur le +5V au lieu de la sortie 5 (car elle ne sort pas assez de jus et passe la bombe en booooooom)
Il faut donc un fil qui sort du +5V et qui est relié aux 4 fils qui sortent des sorties 1, 2, 3, 4
!!!!! ATTENTION J'AI DÉCALÉ LES SORTIE ENTRE LA PREMIÈRE ET LA 2ème VERSION !!!!!!
Je vous ferais un schéma un peu plus tard.
pic-pac- ecrou or
- Messages : 663
Date d'inscription : 20/06/2011
Age : 43
Localisation : Issoire (63)
- Message n°38
Re: Bombe Airsoft
et voila ce que j'ai fait après quelques heures de travail
et voila une fois fini
Du coup je suis content de mon travail j'aime bien la gueule que ça lui donne, par la suite je vais rajouter le mode d'emploi dans le couvercle et surement des sigles radioactif ou autres pour faire un peu de décoration.
et voila une fois fini
Du coup je suis content de mon travail j'aime bien la gueule que ça lui donne, par la suite je vais rajouter le mode d'emploi dans le couvercle et surement des sigles radioactif ou autres pour faire un peu de décoration.
ju76- vis rouillée
- Messages : 24
Date d'inscription : 05/01/2013
Age : 42
Localisation : Seine maritime
- Message n°39
Re: Bombe Airsoft
J'aime bien sympa!!!
pic-pac- ecrou or
- Messages : 663
Date d'inscription : 20/06/2011
Age : 43
Localisation : Issoire (63)
- Message n°40
Re: Bombe Airsoft
Et voila le schéma remis a jour avec le nouveau code
Les 4 fils en gris sont les fils à couper, à vous de voir comment les brancher tous sur le le +5v soit vous tirez un seul câble soit vous en tirez 4.
Personnellement j'ai branché le fil du +5V sur toutes les bornes d'un bornier d'enceinte et les 4 autres fils de l'autre coté
Le bornier d'enceinte
Les 4 fils en gris sont les fils à couper, à vous de voir comment les brancher tous sur le le +5v soit vous tirez un seul câble soit vous en tirez 4.
Personnellement j'ai branché le fil du +5V sur toutes les bornes d'un bornier d'enceinte et les 4 autres fils de l'autre coté
Le bornier d'enceinte
- Code:
/******************************************************************************************
* Airsoft C4 Prop by Joshua Burgess
* v3 modify by PIC-PAC
* 19/09/2013
*******************************************************************************************/
/******************************************************************************************
*
* TO DO
* plus rien pour l'instant
*******************************************************************************************/
#include <Keypad.h>
#include <LiquidCrystal.h>
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(7, 9, 10, 11, 12, 13);
// set up the LCD's number of columns and rows:
int boom;
int ouf;
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] = {A0, A1, A2, A3}; //connect to the row pinouts of the keypad
byte colPins[COLS] = {A4, A5, 6}; //connect to the column pinouts of the keypad
Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );
//Define all the bomb states
#define READY 0
#define ARMED 1
#define DISARMED 2
#define DETONATED 3
#define speakerPin 0
int second=30, minute=1, hour=0; // declare time variables
int bombState=0; //0 = Ready, 1 = Armed, 2 = Disarmed, 3 = detonated
int repeat=0;//flag to prevent repeat of getArmCode();
int repeatAdm=0; //flag to prevent repeat of getAadminCode();
int repeatDisarm=0;//flag to prevent repeat of getDisarmCode();
int repeatBuzzer=0;//flag to prevent buzzer from running multiple times.
int repeatTimerEdit=0;//flag to prevent repeat of timer edit function
//int speakerPin = 2;//pin that the piezo buzzer is connected to.
int blinkArmed = 0; // flag for blink text
int blinkDisarmed = 0; // flag to blink disarmed msg
int nbBlinkDisarmed = 6; // flag for number of blink disarmed msg (real number of blink = nbBlinkDisarmed / 2)
long previousTime = 0;//holds previous time in ms
long previousDelay = 0;//holds previous time in ms since buzzer was active
long interval = 60000;//60 second delay
char hour_str[4]; // For Convert int in char
char minute_str[4]; // For Convert int in char
char second_str[4]; // For Convert int in char
char timeInt_str[0]; // For Convert int in char
char newcode_str[0];
char newarmcode_str[0];
char newdisarmcode_str[0];
char boom_str[0];
char ouf_str[0];
char continui1;
char continui2;
char ArmCode[] = "123456";//code to arm the bomb
char disarmCode[] = "123456";//code to disarm the bomb
char adminCode[] = "123456";//code to change timer
char ENTER_KEY = '#';
char CANCEL_KEY = '*';//stores the cancel key variable.
char timeSetKey = '*';//key to press to set the code.
void setup()
{
pinMode(5, OUTPUT);
pinMode(speakerPin, OUTPUT);
//les cables doivent tous etre branchés sur la sortie 5
pinMode(1, INPUT);
pinMode(2, INPUT);
pinMode(3, INPUT);
pinMode(4, INPUT);
// On passe les cables au niveau haut
digitalWrite(5, HIGH);
lcd.begin(16, 2);
lcd.clear();
lcd.setCursor(2, 0 );
lcd.print( "Bombe Factice" );
lcd.setCursor( 3, 1 );
lcd.print( "GOOD GAME" );
delay(2000);
lcd.setCursor( 2, 0 );
lcd.print( "Bombe Factice" );
lcd.setCursor( 3, 1 );
lcd.print( "BY PIC-PAC" );
delay(2000);
lcd.clear();
// pinMode(speakerPin, OUTPUT);//sets the output pin for the piezo buzzer
}
void loop(){
switch (bombState) {
lcd.clear();
/***********************************************************
*Ready state prepares bomb, waits for arm code to be input
*
************************************************************/
case READY:
int resultOfGetArmCode;
lcd.clear();
lcd.setCursor(0, 0 );
delay(100);
//showCursor();
//blinkCursor();
lcd.print("Enter ArmCode :"); //Notify user of status.
resultOfGetArmCode = getArmCode();
if (resultOfGetArmCode == 1) {
lcd.clear();
lcd.setCursor(0, 0 );
delay(100);
lcd.print("Correct");
delay(500);
lcd.clear();
bombState = ARMED; //Start countdown
}//Close getArmCode(); = true
if (resultOfGetArmCode == 0) { //if code fails print "Incorrect"
tryAgainMsg();
}// Close getArmCode(); = false.
break;
/**************************************************
*Armed state. Countdown starts, waits for pushbutton to be pressed.
*If button is pressed, wait for code from keypad.
***************************************************/
case ARMED:
{
continuite1();
continuite2();
continui1 = continuite1();
continui2 = continuite2();
if (continui1 == false) {
bombState = DETONATED; //and set bombState to disarmed.
break;
}
if (continui2 == true) {
bombState = DISARMED; //and set bombState to disarmed.
break;
}
char disarmKey = keypad.getKey();
if (disarmKey == '#') {
char reslutOfDisarm;
lcd.clear();
lcd.setCursor(0, 0 );
lcd.print("Enter DisarmCode"); //if disarm button is pressed, ask user to input code.
reslutOfDisarm = getDisarmCode();
if (reslutOfDisarm == true) {
lcd.clear();
bombState = DISARMED; //and set bombState to disarmed.
break;
} //close getDisarmCode(); = True
if (reslutOfDisarm == false) {
tryAgainMsg();
if (second >= 15) {
second = second - 15;
}
else {
if (minute == 0 && hour == 0) {
second=1; //detonate.
}
if (minute > 0) {
second = 60 - (15 - second);
minute = minute - 1;
}
if (hour > 0 && minute == 0) {
second = 60 - (15 - second);
minute = 59;
hour = hour - 1 ;
}
}
} //close getDisarmCode(); = false
} //close if
}
countdown(); //if disarm key has not been pressed, continue countdown.
break;
/**************************************************************
*DISARMED. Counter stopped, displays "bomb disarmed"
*
**************************************************************/
case DISARMED:
int blinkDisarmFlag;
blinkDisarmFlag = 0;
//hideCursor();
for (nbBlinkDisarmed; nbBlinkDisarmed > 0; nbBlinkDisarmed--){ // blink msg
if (blinkDisarmFlag == 1){
lcd.setCursor(2, 0 );
lcd.print("BOMB DISARMED"); //bomb has been disarmed, inform user.
lcd.setCursor(2, 1 );
lcd.print("GOOD JOB TEAM");
delay(1000);
lcd.setCursor(2, 0 );
lcd.print("GOOD JOB TEAM"); //bomb has been disarmed, inform user.
lcd.setCursor(2, 1 );
lcd.print("BOMB DISARMED");
delay(9000);
asm volatile (" jmp 0");
blinkDisarmFlag = 0;
}
else{
lcd.clear();
delay(1000);
blinkDisarmFlag = 1;
}
} // end blink
break;
/*******************************************************
*Detonated. activate buzzer for 8 beeps, then 1 long.
*Print "Have A Nice Day. to LCD.
********************************************************/
case DETONATED:
if (repeatBuzzer == 0) { //make sure buzzer for loop has not already been run.
digitalWrite(speakerPin, HIGH);//turn on buzzer
lcd.clear();
lcd.setCursor(0, 0 );
lcd.print("BOOOOOOOOOOOOOOM"); //loop message informing user of bomb detonation.
//lcd.setCursor(0, 1 );
//lcd.print("Have A Nice Day"); //loop message informing user of bomb detonation.
delay(5000);//wait 5 seconds
digitalWrite(speakerPin, LOW);//turn off buzzer
repeatBuzzer = 1;//set flag to prevent code from looping again.
}
else {
//pinMode(0, INPUT);
//lcd.setCursor(0, 0 );
//lcd.print("BOOOOOOOOOOOOOOM"); //loop message informing user of bomb detonation.
lcd.setCursor(0, 1 );
lcd.print("Have A Nice Day"); //loop message informing user of bomb detonation.
delay(9000);
asm volatile (" jmp 0");
}
}//closes switch
}//closes loop
/*void software_Reset()
{
}*/
/***********************************************************
* Main countdown timer *
* countdown() *
************************************************************/
void countdown(){
static unsigned long lastTick = 0; // set up a local variable to hold the last time we decremented one second
static unsigned long currentMillis = 0;
// (static variables are initialized once and keep their values between function calls)
// decrement one second every 1000 milliseconds
if (second > 0) {
if (millis() - lastTick >= 1000) {
lastTick = millis();
second--;
serialOutput();
}
}
// decrement one minute every 60 seconds
if (minute > 0) {
if (second <= 0) {
minute--;
second = 60; // reset seconds to 60
}
}
// decrement one hour every 60 minutes
if (hour > 0) {
if (minute <= 0) {
hour--;
minute = 60; // reset minutes to 60
}//closes if
}//closes if
//the code below beeps the siren once every minute.
currentMillis = millis();
if (currentMillis - previousTime > interval)
{
previousTime = currentMillis;
previousDelay = currentMillis;
//digitalWrite(speakerPin, HIGH);//turn on buzzer
}
if (currentMillis - previousDelay > 100) {//100ms chirp duration
// digitalWrite(speakerPin, LOW);//turn off buzzer
}
} //close countdown();
/***********************************************************************
* getArmCode(); *
* Grabs the code to arm the bomb from the keypad. *
* *
************************************************************************/
boolean getArmCode(){
// returns true when all PW keys are pressed in sequence
// returns false when number of keys in pW pressed but don't exactly match the PW
// CANCEL_KEY erases all previous digits input
int count=0; // how many keys we have
int matchCount=0; // how many keys match
lcd.setCursor(0, 1 );
if(repeat == 0){
for(count=0, matchCount=0; count < sizeof(ArmCode)-1; count++){
char key;
char key_str[0]; // Define as string
do{
key = keypad.getKey();
delay (100);
}
while(key == '\0');
key_str[0] = key;
lcd.print(key_str);
if (key == timeSetKey && repeatTimerEdit == 0){
// ***************** MOD HERE ********************* ============> Random codes for arm & disarm
timerSet();
return 2;
}
if(key == ArmCode[count]) {
matchCount++;
}
else if(key == CANCEL_KEY){
count=0;
matchCount=0;
return 0;
}
}//close for loop
}//close repeat flag check
// here when the same number of keys pressed as characters in the PW
if(matchCount == count) {
repeat=1;
return 1;
}
else {
return 0;
}
}//close getArmCode();
/**********************************************************************
* continuite(); *
* continuité sur les fils. *
* *
***********************************************************************/
boolean continuite1(){
// si le fil d'explosion est coupé :
if (digitalRead(boom) == LOW) {
return false; // on renvoie 0
}
else {
return true;
}
}
boolean continuite2(){
// si le fil de désamorçage est coupé :
if (digitalRead(ouf) == LOW) {
return true; // on renvoie 1
}
else {
return false;
}
}
/**********************************************************************
* getDisarmCode(); *
* Gets disarm code from keypad. *
* *
***********************************************************************/
boolean getDisarmCode(){
// returns true when all PW keys are pressed in sequence
// returns false when number of keys in pW pressed but don't exactly match the PW
// CANCEL_KEY erases all previous digits input
int count=0; // how many keys we have
int matchCount=0; // how many keys match
long disarmTime = millis()+7000L;//7000 instead of 15000 b/c of added delays making total 30s
lcd.setCursor(0, 1 );
//showCursor();
//blinkCursor();
if(repeatDisarm == 0){
for(count=0, matchCount=0; count < sizeof(disarmCode)-1; count++){
char key;
char key_str[0]; // Define as string
do{
if(disarmTime < millis()){ //if 15 seconds have passed, bail out
break;
}
key = keypad.getKey();
delay (100);
}
while(key == '\0');
key_str[0] = key;
lcd.print(key_str);
if(key == disarmCode[count]) {
matchCount++;
}
else if(key == CANCEL_KEY){
count=0;
matchCount=0;
return false;
}
if(disarmTime < millis()) {
return false;
break;
}
}// close for loop
} //close repeat flag check
// here when the same number of keys pressed as characters in the PW
if(matchCount == count) {
repeatDisarm=1;
return true;
}
else {
return false;
}
}//close getDisarmCode();
/**********************************************************************
* getAdminCode(); *
* Gets admin code from keypad. *
* *
***********************************************************************/
boolean getAdminCode(){
// returns true when all PW keys are pressed in sequence
// returns false when number of keys in pW pressed but don't exactly match the PW
// CANCEL_KEY erases all previous digits input
int count=0; // how many keys we have
int matchCount=0; // how many keys match
lcd.setCursor(0, 1 );
for(count=0, matchCount=0; count < sizeof(adminCode)-1; count++){
char key;
char key_str[0]; // Define as string
do{
key = keypad.getKey();
delay (100);
}
while(key == '\0');
// itoa(key, key_str,10);
key_str[0] = key;
lcd.print(key_str);
// lcd.print(itoa(key, key_str,16));
if(key == adminCode[count]) {
matchCount++;
}
else if(key == CANCEL_KEY){
count=0;
matchCount=0;
return false;
}
}// close for loop
// here when the same number of keys pressed as characters in the PW
if(matchCount == count) {
return true;
}
else{
return false;
}
// Do nothing if pwd is false / Parent function send tryAgin msg
}//close getAdminCode();
/*********************************************************************
* Timer edit function *
* *
* *
**********************************************************************/
void timerSet(){
lcd.clear();
lcd.print("Enter AdminCode");
char resultOfGetAdmCode;
resultOfGetAdmCode = getAdminCode();
if (resultOfGetAdmCode == true){
char timeInt;
char newcode;
char newarmcode;
char newdisarmcode;
char menupage;
int newadmincode;
lcd.clear();
lcd.setCursor(0, 0 );
lcd.print("1.Admin 2.Time");
lcd.setCursor(0, 1 );
lcd.print("3.Arm 4.Disarm");
delay (2000);
lcd.clear();
lcd.setCursor(0, 0 );
lcd.print("3.Arm 4.Disarm");
lcd.setCursor(0, 1 );
lcd.print("5.Wire");
do{
menupage = keypad.getKey();
}
while(menupage == '\0' || menupage == '*' || menupage == '0' || menupage > '5');
switch(menupage) {
case '1': // Edit admin code
lcd.clear();
lcd.setCursor(0, 0 );
lcd.print("new admin code :");
lcd.setCursor(0, 1 );
do{
newcode = keypad.getKey();
delay (100);
}
while(newcode == '\0');
newcode_str[0] = newcode;
lcd.print(newcode_str);
adminCode[0] = newcode_str[0];
newadmincode = (newcode - '0') * 10;//get first digit and convert to int
do{
newcode = keypad.getKey();
delay (100);
}
while(newcode == '\0');
newcode_str[0] = newcode;
lcd.print(newcode_str);
adminCode[1] = newcode_str[0];
newadmincode = (newcode - '0') + newadmincode;//get second digit.
do{
newcode = keypad.getKey();
delay (100);
}
while(newcode == '\0');
newcode_str[0] = newcode;
lcd.print(newcode_str);
adminCode[2] = newcode_str[0];
newadmincode = (newcode - '0') + newadmincode;//get 3rd digit.
do{
newcode = keypad.getKey();
delay (100);
}
while(newcode == '\0');
newcode_str[0] = newcode;
lcd.print(newcode_str);
adminCode[3] = newcode_str[0];
newadmincode = (newcode - '0') + newadmincode;//get 4th digit.
do{
newcode = keypad.getKey();
delay (100);
}
while(newcode == '\0');
newcode_str[0] = newcode;
lcd.print(newcode_str);
adminCode[4] = newcode_str[0];
newadmincode = (newcode - '0') + newadmincode;//get 5th digit.
do{
newcode = keypad.getKey();
delay (100);
}
while(newcode == '\0');
newcode_str[0] = newcode;
lcd.print(newcode_str);
adminCode[5] = newcode_str[0];
newadmincode = (newcode - '0') + newadmincode;//get 6th digit.
//newcode = 'L';
lcd.clear();
lcd.setCursor(0, 0 );
lcd.print("NEW ADMINCODE");
lcd.setCursor(0, 1 );
lcd.print(adminCode);
delay(5000);
lcd.clear();
break;
case '3': // Edit armcode
lcd.clear();
lcd.setCursor(0, 0 );
lcd.print("new armcode :");
lcd.setCursor(0, 1 );
do{
newarmcode = keypad.getKey();
delay (100);
}
while(newarmcode == '\0');
newarmcode_str[0] = newarmcode;
lcd.print(newarmcode_str);
ArmCode[0] = newarmcode_str[0];
newarmcode = (newarmcode - '0') * 10;//get first digit and convert to int
do{
newarmcode = keypad.getKey();
delay (100);
}
while(newarmcode == '\0');
newarmcode_str[0] = newarmcode;
lcd.print(newarmcode_str);
ArmCode[1] = newarmcode_str[0];
newarmcode = (newarmcode - '0') + newarmcode;//get second digit.
do{
newarmcode = keypad.getKey();delay (100);
}
while(newarmcode == '\0');
newarmcode_str[0] = newarmcode;
lcd.print(newarmcode_str);
ArmCode[2] = newarmcode_str[0];
newarmcode = (newarmcode - '0') + newarmcode;//get 3rd digit.
do{
newarmcode = keypad.getKey();
delay (100);
}
while(newarmcode == '\0');
newarmcode_str[0] = newarmcode;
lcd.print(newarmcode_str);
ArmCode[3] = newarmcode_str[0];
newarmcode = (newarmcode - '0') + newarmcode;//get 4th digit.
do{
newarmcode = keypad.getKey();
delay (100);
}
while(newarmcode == '\0');
newarmcode_str[0] = newarmcode;
lcd.print(newarmcode_str);
ArmCode[4] = newarmcode_str[0];
newarmcode = (newarmcode - '0') + newarmcode;//get 5th digit.
do{
newarmcode = keypad.getKey();
delay (100);
}
while(newarmcode == '\0');
newarmcode_str[0] = newarmcode;
lcd.print(newarmcode_str);
ArmCode[5] = newarmcode_str[0];
newarmcode = (newarmcode - '0') + newarmcode;//get 6th digit.
//newcode = 'L';
lcd.clear();
lcd.setCursor(0, 0 );
lcd.print("NEW ARMCODE");
lcd.setCursor(0, 1 );
lcd.print(ArmCode);
delay(5000);
lcd.clear();
break;
case '4': // Edit disarmcode
lcd.clear();
lcd.setCursor(0, 0 );
lcd.print("new disarmcode :");
lcd.setCursor(0, 1 );
do{
newdisarmcode = keypad.getKey();
delay (100);
}
while(newdisarmcode == '\0');
newdisarmcode_str[0] = newdisarmcode;
lcd.print(newdisarmcode_str);
disarmCode[0] = newdisarmcode_str[0];
newdisarmcode = (newdisarmcode - '0') * 10;//get first digit and convert to int
do{
newdisarmcode = keypad.getKey();
delay (100);
}
while(newdisarmcode == '\0');
newdisarmcode_str[0] = newdisarmcode;
lcd.print(newdisarmcode_str);
disarmCode[1] = newdisarmcode_str[0];
newdisarmcode = (newdisarmcode - '0') + newdisarmcode;//get second digit.
do{
newdisarmcode = keypad.getKey();
delay (100);
}
while(newdisarmcode == '\0');
newdisarmcode_str[0] = newdisarmcode;
lcd.print(newdisarmcode_str);
disarmCode[2] = newdisarmcode_str[0];
newdisarmcode = (newdisarmcode - '0') + newdisarmcode;//get 3rd digit.
do{
newdisarmcode = keypad.getKey();
delay (100);
}
while(newdisarmcode == '\0');
newdisarmcode_str[0] = newdisarmcode;
lcd.print(newdisarmcode_str);
disarmCode[3] = newdisarmcode_str[0];
newdisarmcode = (newdisarmcode - '0') + newdisarmcode;//get 4th digit.
do{
newdisarmcode = keypad.getKey();
delay (100);
}
while(newdisarmcode == '\0');
newdisarmcode_str[0] = newdisarmcode;
lcd.print(newdisarmcode_str);
disarmCode[4] = newdisarmcode_str[0];
newdisarmcode = (newdisarmcode - '0') + newdisarmcode;//get 5th digit.
do{
newdisarmcode = keypad.getKey();
delay (100);
}
while(newdisarmcode == '\0');
newdisarmcode_str[0] = newdisarmcode;
lcd.print(newdisarmcode_str);
disarmCode[5] = newdisarmcode_str[0];
newdisarmcode = (newdisarmcode - '0') + newdisarmcode;//get 6th digit.
//newcode = 'L';
lcd.clear();
lcd.setCursor(0, 0 );
lcd.print("NEW DISARMCODE");
lcd.setCursor(0, 1 );
lcd.print(disarmCode);
delay(5000);
lcd.clear();
break;
case '5': //fil a couper
lcd.clear();
lcd.setCursor(0, 0 );
lcd.print("Choose Wire BOOM");
do{
boom = keypad.getKey();
}
while(boom == '\0' || boom < '0' || boom > '4');
boom_str[0] = boom;
boom = atoi (boom_str);
lcd.setCursor(0, 1 );
lcd.print(boom);
delay (2000);
lcd.clear();
lcd.setCursor(0, 0 );
lcd.print("Choose Wire OUF");
do{
ouf = keypad.getKey();
}
while(ouf == '\0' || ouf < '0' || ouf > '4');
ouf_str[0] = ouf;
ouf = atoi (ouf_str);
lcd.setCursor(0, 1 );
lcd.print(ouf);
delay (2000);
break;
case '2': // Timer
lcd.clear();
lcd.print("Enter xx Hours");
lcd.setCursor(0, 1 );
do{
timeInt = keypad.getKey();
}
while(timeInt == '\0' || timeInt < '0' || timeInt > '6');
timeInt_str[0] = timeInt;
lcd.print(timeInt_str);
hour = (timeInt - '0') * 10;//get first digit and convert to int
do{
timeInt = keypad.getKey();
}
while(timeInt == '\0');
timeInt_str[0] = timeInt;
lcd.print(timeInt_str);
hour = (timeInt - '0') + hour;//get second digit.
delay(800);
lcd.clear();
timeInt = 'L';
// ------------------------------------------------------------------
lcd.print("Enter xx Minutes");
lcd.setCursor(0, 1 );
do{
timeInt = keypad.getKey();
}
while(timeInt == '\0' || timeInt < '0' || timeInt > '6');
timeInt_str[0] = timeInt;
lcd.print(timeInt_str);
while (timeInt < '0' || timeInt > '6'){
timeInt = keypad.getKey();
}
minute = (timeInt - '0') * 10;//get first digit and convert to int
do{
timeInt = keypad.getKey();
}
while(timeInt == '\0');
minute = (timeInt - '0') + minute;//get second digit.
timeInt_str[0] = timeInt;
lcd.print(timeInt_str);
delay(800);
lcd.clear();
timeInt = 'L';
// ------------------------------------------------------------------
lcd.print("Enter xx Seconds");
lcd.setCursor(0, 1 );
do{
timeInt = keypad.getKey();
}
while(timeInt == '\0' || timeInt < '0' || timeInt > '6');
timeInt_str[0] = timeInt;
lcd.print(timeInt_str);
while (timeInt < '0' || timeInt > '6'){
timeInt = keypad.getKey();
}
second = (timeInt - '0') * 10;//get first digit and convert to int
do{
timeInt = keypad.getKey();
}
while(timeInt == '\0');
second = (timeInt - '0') + second;//get second digit.
timeInt_str[0] = timeInt;
lcd.print(timeInt_str);
delay(800);
lcd.clear();
timeInt = 'L';
lcd.print("Time set :");
lcd.setCursor(0, 1 );
itoa (hour, hour_str, 10);
itoa (minute, minute_str, 10);
itoa (second, second_str, 10);
lcd.print(hour_str);
lcd.print(":");
lcd.print(minute_str);
lcd.print(":");
lcd.print(second_str);
delay(2000);
// ---------------------- Put randomize here --------------------------
repeatTimerEdit = 1;
}//end of getAdminCode == true
if(resultOfGetAdmCode == false){
tryAgainMsg();
// Do nothing if pwd is false / Parent function send tryAgin msg
}
lcd.clear();
}//end of timer edit function
}
/****************************************************************
* serialOutput(); *
* prints the values of the timer over the serial connection *
* and onto the LCD *
*****************************************************************/
void serialOutput() {
itoa (hour, hour_str, 10);
itoa (minute, minute_str, 10);
itoa (second, second_str, 10);
if(bombState != DISARMED){
lcd.setCursor(0, 0 );
delay(20);
if (blinkArmed == 0){
lcd.print("!! ARMED !!");
blinkArmed=1;
}
else {
lcd.print("!! !!");
blinkArmed=0;
}
lcd.setCursor(0, 1 );
lcd.print("Time = ");
if (hour <=9) {
lcd.print("0");
lcd.print(hour_str); // the hour, sent to the screen in decimal format
}
else{
lcd.print(hour_str);
}
lcd.print(":"); // a colon between the hour and the minute
if (minute <=9) {
lcd.print("0");
lcd.print(minute_str); // the minute, sent to the screen in decimal format
}
else{
lcd.print(minute_str);
}
lcd.print(":"); // a colon between the minute and the second
if (second <=9) {
lcd.print("0");
lcd.print(second_str); // the minute, sent to the screen in decimal format
}
else{
lcd.print(second_str);
}
//termination condition
}
if (second == 0 && minute == 0 && hour == 0) {
lcd.clear();
bombState = DETONATED; //clear LCD and set bomb state to "detonated" when timer runs out
}
if (bombState == DISARMED) {
lcd.clear();
}
}//close serialOutput();
void tryAgainMsg(){
lcd.clear();
//hideCursor();
delay(100);
lcd.print("T");
delay(150);
lcd.print("r");
delay(150);
lcd.print("y");
delay(150);
lcd.print(" ");
delay(150);
lcd.print("a");
delay(150);
lcd.print("g");
delay(150);
lcd.print("a");
delay(150);
lcd.print("i");
delay(150);
lcd.print("n");
delay(150);
lcd.print(" ");
delay(150);
lcd.print("!");
delay(1000);
}
void incorrectMsg(){
lcd.clear();
delay(100);
lcd.print("I");
delay(350);
lcd.print("n");
delay(350);
lcd.print("c");
delay(350);
lcd.print("o");
delay(350);
lcd.print("r");
delay(350);
lcd.print("r");
delay(350);
lcd.print("e");
delay(350);
lcd.print("c");
delay(350);
lcd.print("t");
delay(1000);
}
//END of bomb program.
DJABA- Messages : 11
Date d'inscription : 31/07/2012
Age : 44
Localisation : LIOMER
- Message n°41
Re: Bombe Airsoft
Salut
Sur mon arduino duemilanove je n'arrive pas à faire fonctionné la fonction fils a coupé
Je branche donc des fils sur les broches 1,2,3,4 le tous relier aux 5v mais ça ne fonction pas
Help
DJABA
Sur mon arduino duemilanove je n'arrive pas à faire fonctionné la fonction fils a coupé
Je branche donc des fils sur les broches 1,2,3,4 le tous relier aux 5v mais ça ne fonction pas
Help
DJABA
pic-pac- ecrou or
- Messages : 663
Date d'inscription : 20/06/2011
Age : 43
Localisation : Issoire (63)
- Message n°42
Re: Bombe Airsoft
Il faut rentrer dans le menu pour sélectionner tes fils avant
ju76- vis rouillée
- Messages : 24
Date d'inscription : 05/01/2013
Age : 42
Localisation : Seine maritime
- Message n°43
Re: Bombe Airsoft
Bon je viens de tester l'inflamateur pyro, ca ne fonctionne manque d'amperage.
pic-pac- ecrou or
- Messages : 663
Date d'inscription : 20/06/2011
Age : 43
Localisation : Issoire (63)
- Message n°44
Re: Bombe Airsoft
tu dois surement pouvoir amplifier ta sortie mais je ne sais pas commentju76 a écrit:Bon je viens de tester l'inflamateur pyro, ca ne fonctionne manque d'amperage.
ju76- vis rouillée
- Messages : 24
Date d'inscription : 05/01/2013
Age : 42
Localisation : Seine maritime
- Message n°45
Re: Bombe Airsoft
Si quelqu'un a la reponse je suis preneur
il y a 5v d'apres ce que j'ai pus lire sur divers forum il y aura actuellement 40ma
il y a 5v d'apres ce que j'ai pus lire sur divers forum il y aura actuellement 40ma
ptimaicosto- vis rouillée
- Messages : 90
Date d'inscription : 05/06/2011
Age : 39
Localisation : Ligny le ribault
- Message n°46
Re: Bombe Airsoft
Ju76 quelle carte arduino utilises-tu ?
ju76- vis rouillée
- Messages : 24
Date d'inscription : 05/01/2013
Age : 42
Localisation : Seine maritime
- Message n°47
Re: Bombe Airsoft
Salut j'utilise arduino uno
ptimaicosto- vis rouillée
- Messages : 90
Date d'inscription : 05/06/2011
Age : 39
Localisation : Ligny le ribault
- Message n°48
Re: Bombe Airsoft
Une piste de réflexion:
Une carte de contrôle comme peut l'être l'arduino ne permet pas de délivrer des tensions très importantes, ce n'est pas son rôle principale. Elle ne sert qu'à donner des ordres, et recevoir des infos ( système de contrôle capteurs / actionneurs ) selon une programmation établie.
J'effectuerai plus, dans ton cas, une recherche dans le sens ou elle contrôlerait un second circuit de "puissance" pour permettre l'allumage de ta mèche par le biais d'un montage "transistor/relais".
Pour te faire mieux intégrer la chose, je reprendrais l'exemple des imprimante 3D actuelles qui fonctionnent pour beaucoup sous Arduino Mega. Celle-ci sont coupler à des cartes appelés Ramps ou Rambo qui sont des contrôleur de puissance. L'arduino n'a pas la capacité nécessaire pour faire fonctionner des moteurs pas à pas, elle n'est alimenter que par le port USB (500mA). Cependant la ramps elle est relié directement à des alimentations qui délivre 12V à 30A max. L'arduino ordonne, la ramps dispatch la puissance.
Pour en revenir à ton problème, une fois la puissance d'amorçage nécessaire connue, il ne te reste qu'à trouver la bonne équation relais ou transistor / alimentation et rentrer ta ligne de code dans ta programmation. L'arduino ordonne, le relais dispatch la puissance.
Une carte de contrôle comme peut l'être l'arduino ne permet pas de délivrer des tensions très importantes, ce n'est pas son rôle principale. Elle ne sert qu'à donner des ordres, et recevoir des infos ( système de contrôle capteurs / actionneurs ) selon une programmation établie.
J'effectuerai plus, dans ton cas, une recherche dans le sens ou elle contrôlerait un second circuit de "puissance" pour permettre l'allumage de ta mèche par le biais d'un montage "transistor/relais".
Pour te faire mieux intégrer la chose, je reprendrais l'exemple des imprimante 3D actuelles qui fonctionnent pour beaucoup sous Arduino Mega. Celle-ci sont coupler à des cartes appelés Ramps ou Rambo qui sont des contrôleur de puissance. L'arduino n'a pas la capacité nécessaire pour faire fonctionner des moteurs pas à pas, elle n'est alimenter que par le port USB (500mA). Cependant la ramps elle est relié directement à des alimentations qui délivre 12V à 30A max. L'arduino ordonne, la ramps dispatch la puissance.
Pour en revenir à ton problème, une fois la puissance d'amorçage nécessaire connue, il ne te reste qu'à trouver la bonne équation relais ou transistor / alimentation et rentrer ta ligne de code dans ta programmation. L'arduino ordonne, le relais dispatch la puissance.
ju76- vis rouillée
- Messages : 24
Date d'inscription : 05/01/2013
Age : 42
Localisation : Seine maritime
- Message n°49
Re: Bombe Airsoft
J'étais partie sur un relais mais pas suffisement de jus pour le coller.
Je te remercie pour ton éclairage
Je vais etudié cette histoire de rambo
Je te remercie pour ton éclairage
Je vais etudié cette histoire de rambo
blevanaks- vis rouillée
- Messages : 44
Date d'inscription : 24/11/2013
Age : 42
Localisation : Essonne
- Message n°50
Re: Bombe Airsoft
Salut a tous
J aurai besoin d aide car je suis novice ^^ pouvez vous me conseiller un site pour acheter tout ce qui est nécessaire afin de realiser cette bombe ^^
Merci a tous
J aurai besoin d aide car je suis novice ^^ pouvez vous me conseiller un site pour acheter tout ce qui est nécessaire afin de realiser cette bombe ^^
Merci a tous
|
|