Excuse me! I am a beginner and would like to see the source code to send an sms with Sony Ericsson T230 by Arduino I put, Rx = 8, and TX = 10 I searched on Google and I found this site and do not quite understand! waiting for a reply as soon as possible!
Excuse me! I am a beginner and would like to see the source code to send an sms with Sony Ericsson T230 by Arduino I put, Rx = 8, and TX = 10 I searched on Google and I found this site and do not quite understand! waiting for a reply as soon as possible!
I've made connections in the movie! but do not know how to send SMS. which is actually the source code! serial.print (....), here do not know what to write!
in your code that you put me above definito state of alarm, as follows: <code>int Alarm( char * message) { // write time (millis()) + message to logfile ?
<code> void stare_alarma() { unsigned long currentMillis = millis();
if(currentMillis - previousMillis > interval) { // save the last time you blinked the LED previousMillis = currentMillis;
// if the LED is off turn it on and vice-versa: if ((Stare_LED_1 == HIGH)&&(Stare_LED_2 == LOW))
{ nivelIluminare(25); //brightness 25 mutaCursorLaPozitia(0, 0); // row one of the LCD SerialLCD.print("ALARMA! "); // My message which I want //to appear on line 1 of LCD
mutaCursorLaPozitia(1, 0); // row 2 of the LCD SerialLCD.print(" MISCARE!"); // My message which I want //to appear on line 2 of LCD
cursorInvizibil(); //on screen is not displayed any type of cursor // (remains only text) Stare_LED_1 = LOW; Stare_LED_2 = HIGH; }
else { stergeLCD(); //delete the entire contents displayed on the LCD screen Stare_LED_1 = HIGH; Stare_LED_2 = LOW; } // set the LED with the ledState of the variable: digitalWrite(LED_2, Stare_LED_1); digitalWrite(LED_1, Stare_LED_2); } } </code>
so now I showed how I used the code from the site which I put above. now I do not use any of a delay (). in this state if I do I still program to turn to while () and inside the while () I would not use delay () or another while () like I used at first to the contrary would create code and how I You have shown you, that way I could get out of the state of alarm by pressing the three buttons code?
Thanks for the reply I understand what to do! I do not know but what is the reading of the three buttons (to me, the code above, the three buttons I put in order and is 2-1-3 authentication code, the contact disk) to make out state of alarm as I do? or how can do better, LED lighting and LCD will be lit one at a time, like, 1 LED is illuminated 500 ms and ALARM LCD screen appears, all 500 ms in While LED 2 is off 500 ms, then LED 2 is lit, the LED is off and 1 blank LCD only, I want to do all this without its use, delay (), and in that time I could read the 3 buttons and if the combination of three buttons is correct to Thrace in standby! ?
#define rxPin 2 // RX for ePIR #define txPin 3 // TX for ePIR
NewSoftSerial mySerial(rxPin, txPin);
// datasheet messages const char ACK = char(6); // ACK = 0x06 (ASCII ACK character) const char NACK = char(21); // NACK = 0x15 (ASCII NACK character). // The SBC will respond with a 'NACK' // on all unrecognized commands, and when command requiring data (that is, // Write, Clear, and Confirmation types) does not receive the required data // within the inactivity timeout period const char Cmd_a = char(97); // 0x61 - 'a' Read Motion Status
// // code int codul[3]; int cod_corect[3]; //correct code int primulCod; // first code int autentificat; //authenticated
// Pini const int button1 = 14; // pin A0 - button 1 const int button2 = 15; // pin A1 - button 2 const int button3 = 16; // pin A2 - button 3 const int contact = 17; // pin A3 - // magnetic contact const int tempPin = 4; // pin A4 - //temperature const int buttonTST = 19; // pin A5 - Panic Button
// Variables and initial values int buttonState = HIGH; // // buttons are drawn up int contactState = LOW; // //magnetic contact is pulled down
// //temperature float tempInit; float tempC;
long previousMillis = 0; // will store last time LED was updated // the follow variables is a long because the time, measured in miliseconds, // will quickly become a bigger number than can be stored in an int. long interval = 3000; // interval at which to blink (milliseconds)
// //Read the initial temperature tempInit = analogRead(tempPin); //read the value from the sensor tempInit = (5.0 * tempInit * 100.0)/1024.0; //convert the analog data to temperature
// initialize the pushbutton pin as an input: pinMode(contact, INPUT); pinMode(buttonTST, INPUT); pinMode(button1, INPUT); pinMode(button2, INPUT); pinMode(button3, INPUT);
stergeLCD(); nivelIluminare(10); mesaj_Armat(); // mesaj intampinare "Armat" - 5 sec pe urma trece in standby
Serial.begin(9600); }
void loop(){ autentificat = false;
// 1. Read ePIR mySerial.print(Cmd_a); if (mySerial.available() > 0) { char c = mySerial.read(); if (c == 'Y') { while (!autentificat) ev_ePIR(); } }
// 2. temperature reading tempC = analogRead(tempPin); //read the value from the sensor tempC = (5.0 * tempC * 100.0)/1024.0; //convert the analog data to temperature if (tempC > (tempInit + 2.5)) { ev_temp(); }
// 3. reading magnetic contact contactState = digitalRead(contact); if (contactState == LOW) { while (!autentificat) ev_contact(); }
// 4. Read panic button
buttonState = digitalRead(buttonTST); if (buttonState == LOW) { ev_but_TST(); }
//level value between 0 and 29 including void nivelIluminare(int nivel) { SerialLCD.print(124, BYTE); SerialLCD.print(128 + nivel, BYTE); delay(100); }
I am a Romanian and I need help, please help me I do not know who to call! my problem is I do not know to program an Arduino so good that I would have liked ... In a few days ago I heard of this card and bought it as a project to help me. I managed to make it functional in one week with all assembled, soldered, so he can be mounted on a wooden board, and I reached a point where I never thought from the beginning and now we are crying learned too late about this and now I need help!
I'll explain my program to realize you do not know what to do! ask for a suggestion not practical to ask you show me how you put it into operation as code, I do not want to say that I use or something you really do not know that here in Romania at the moment I have not found anyone like this or even to know the function to use.
I use them: two LEDs, a serial LCD, a magnetic contact, four buttons, a Epirus, and a temperature sensor LM35DZ, and obviously an Arduno. with everything I said above I simulate a burglary and fire station.
thing is that the two LEDs are placed in parallel, because I wanted because I wanted to turn lights on each kind of flashing!
With three of the four have formed a keypad buttons and with the fourth button in this kind of panic button that sets the alarm me, the problem is that when you go into alarm (the alarm state of the two LEDs light up and write a message on the LCD series, which he writes on , ALARM); same thing happens to me and temperature sensor, and Epirus, except the magnetic contact, magnetic contact me as I made ??contact and I detect the opening of the LCD display "enter code", and this allows me to introduce a code composed of the three buttons, and correct me if I entered the LCD displays "authenticated " and if you enter the wrong code in May I give permission to enter the code again and now if I write good code inserted "authenticated " and enters the standby and enter the code again if I go wrong in an "ALARM".
My problem is the state of alarm, because I only can get out of the alarm condition only RESET button, I want to leave the state of alarm by a combination of three buttons! I was very beginner, I never realized that I have used many loops and while () and more delay () I found out that I could solve this by rewriting the code and I'm thinking how to rewrite it to you in following site: http://www.arduino.cc/en/Tutorial/BlinkWithoutDelay
I show you the code that I've done, is not too great, but please help me so much I really need help, and show me a new code should look like to be able to give me what I I need!
hello! Thanks for the suggestions but for me the first time you use Arduino and not otherwise know how to schedule it. more please give me a helping hand and show me a model on my code even more concise. Thanks again and wait for your answer.
I have a project with an Arduino to college and do not know how to make a comeback in the program. I'll describe a little known project that you do not know what to do.
My project is to simulate a burglary and fire stations, and using an Arduino uno, 4 buttons, magnetic door contact, a serial LCD, a temperature sensor LM35DZ, and a motion sensor ePIR (http://www.robofun.ro/senzori/pir/ePir) and 2 LEDs
4 buttons we divided into two parts: one button causes the alarm to start immediately, and the other 3 I did a keyboard buttons. My problem is that when the alarm I can not get out of it than the reset button, and I would not want to leave the alarm with a combination of three buttons.
attach with the code they use, say I'm not speaking English, and source code can be found with words from another language as comments or showing on the LCD.
My desire is to help me I really need help ... thanks