Show Posts
Pages: [1]
1  Using Arduino / Networking, Protocols, and Devices / here! sms with SE T230 on: May 27, 2011, 02:42:10 pm
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!
2  Using Arduino / Networking, Protocols, and Devices / Re: How to send a sms with a Sony Ericsson phone on: May 27, 2011, 12:42:26 pm
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!
3  Using Arduino / Programming Questions / Re: Help! how send sms with T230 on: May 26, 2011, 08:23:11 am
but the source code would be?
4  Using Arduino / Programming Questions / Re: Help! how send sms with T230 on: May 26, 2011, 08:02:14 am
I made ​​connections, as in this picture


source code is:
Code:
#include <NewSoftSerial.h>
const int PIN_RX = 8;
const int PIN_TX = 10;

NewSoftSerial com(PIN_RX, PIN_TX);

void setup()
{
  com.begin(9600);
}

void loop()
{
 com.println("AT+CMSS=5,'0760151558'");
 delay(3000);
}

my problem is I can not send sms! I do not know what to write in loop ()
5  Using Arduino / Programming Questions / Re: Help! how send sms with T230 on: May 24, 2011, 03:25:54 pm
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!
6  Using Arduino / Programming Questions / Re: Help! how send sms with T230 on: May 24, 2011, 02:16:22 pm
I do not know which cable I need? and I do not know how to send OK, that answer the phone?

I saw someone on youtube with a phone that's like my T230, which calls for the Arduino and not use than some cables stuck back on the phone!

site is next:
7  Topics / Home Automation and Networked Objects / Help! how send sms with T230 on: May 23, 2011, 02:07:05 pm
I need help!

 I want to send an SMS with a Sony Ericsson T230, but do not know source code.

 I just know how to make connections between Arduino and telephone.

 I want to send a sms from Arduino, the number 12345678 with the text "I sent an SMS with the Arduino.

Arduino sending AT commands to Sony Ericsson T230 are the next link www.engineersgarage.com/tutorials/at-commands

 Thank you very much for your help!
8  Using Arduino / Programming Questions / Help! how send sms with T230 on: May 23, 2011, 02:04:30 pm
I need help!

 I want to send an SMS with a Sony Ericsson T230, but do not know source code.

 I just know how to make connections between Arduino and telephone.

 I want to send a sms from Arduino, the number 12345678 with the text "I sent an SMS with the Arduino.

Arduino sending AT commands to Sony Ericsson T230 are the next link www.engineersgarage.com/tutorials/at-commands

 Thank you very much for your help!

9  Topics / Home Automation and Networked Objects / Re: burglary and fire power - problems with exit status code of "ALARM!" HELP on: April 16, 2011, 12:42:46 am
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 ?

  stergeLCD();
  nivelIluminare(25);

  digitalWrite(LED_1, LOW);
  digitalWrite(LED_2, HIGH);

  mutaCursorLaPozitia(0, 0);
  SerialLCD.print(message);
  cursorInvizibil();
  delay(500);
  stergeLCD();

  digitalWrite(LED_1, HIGH);
  digitalWrite(LED_2, LOW);
  delay(500);
}
</code>

I notice that you left here and delay, but I found that the alarm condition
 may be to you in the following code in this site:
http://www.arduino.cc/en/Tutorial/BlinkWithoutDelay

and my code would look like this:

<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?
10  Topics / Home Automation and Networked Objects / Re: burglary and fire power - problems with exit status code of "ALARM!" HELP on: April 14, 2011, 07:00:20 pm
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! ?
11  Topics / Home Automation and Networked Objects / burglary and fire power - problems with exit status code of "ALARM!" HELP on: April 14, 2011, 02:13:03 pm

many things are the type, the LCD display are in Romanian, is not a problem if you put them in English ....

 My code is as follows:

Code:
// ver. 1.0

#include "SoftwareSerial.h"
#include "NewSoftSerial.h"

#define LED_1 7      // led 1
#define LED_2 6      // led 2
#define TX_PIN 5     // TX for LCD

SoftwareSerial SerialLCD = SoftwareSerial(0, TX_PIN);

#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)

void setup() {
 autentificat = false;
 // Cod corect
 cod_corect[0] = 2;
 cod_corect[1] = 1;
 cod_corect[2] = 3;
 //  //Initialization code
 codul[0] = 0;
 codul[1] = 0;
 codul[2] = 0;
 //  //The first entry code
 primulCod = 0;

 //  //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);

 pinMode(LED_1, OUTPUT);
 digitalWrite(LED_1, HIGH);
 pinMode(LED_2, OUTPUT);
 digitalWrite(LED_2, HIGH);
 pinMode(TX_PIN, OUTPUT);

 SerialLCD.begin(9600);

 // initializare ePIR
 pinMode(rxPin, INPUT);
 pinMode(txPin, OUTPUT);
 mySerial.begin(9600);

 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();
 }


 delay(300);

}

// message "armed" for 5 seconds - 5 sec
void mesaj_Armat(void) {
 stergeLCD();
 nivelIluminare(15);
 mutaCursorLaPozitia(0, 0);
 SerialLCD.print("Gata de lucru!");
 cursorInvizibil();
 mutaCursorLaPozitia(1, 0);
 SerialLCD.print("Standby in 5 sec");
 delay(5000);  // delay 5 sec
 stareStandby();
}

// 1. ePIR event
void ev_ePIR(void) {
    stergeLCD();
  nivelIluminare(20);
 
   while (1) {
     digitalWrite(LED_1, LOW);
    digitalWrite(LED_2, HIGH);
    mutaCursorLaPozitia(0, 0);
    SerialLCD.print("ALARMA! ");
    mutaCursorLaPozitia(1, 0);
    SerialLCD.print("       MISCARE!");
    cursorInvizibil();
    delay(500);
    stergeLCD();
    digitalWrite(LED_1, HIGH);
    digitalWrite(LED_2, LOW);
    delay(500);
  }

}

// testing code introduced
void testare_cod(void) {
 if ((codul[0] == cod_corect[0]) && (codul[1] == cod_corect[1]) &&
(codul[2] == cod_corect[2])) {
   stare_Autentificat();
   autentificat = true;
   primulCod = 0;
 }
 else {
   if (primulCod == 0) {
     autentificat = false;
     primulCod++;
   }
   else {
     autentificat = false;
     stare_Efractie();
   }
 }
}

// code has been correctly
void stare_Autentificat(void) {
 stergeLCD();
 nivelIluminare(25);
 mutaCursorLaPozitia(0, 0);
 SerialLCD.print("AUTENTIFICAT!");
 cursorInvizibil();
 delay(5000);
 stergeLCD();
 stareStandby();
 //  while (1) { }
}

// code was wrong
void stare_Efractie(void) {
 ev_but_TST();
}

// 2. Event temperature
void ev_temp(void) {
 stergeLCD();
 nivelIluminare(25);

 while (1) {
   digitalWrite(LED_1, LOW);
   digitalWrite(LED_2, HIGH);
   mutaCursorLaPozitia(0, 0);
   SerialLCD.print("INCENDIU!");
   cursorInvizibil();
   delay(500);
   stergeLCD();
   digitalWrite(LED_1, HIGH);
   digitalWrite(LED_2, LOW);
   delay(500);
 }
}

// 3. Event magnetic contact
void ev_contact(void) {
 stergeLCD();
 nivelIluminare(15);
 mutaCursorLaPozitia(0, 0);
 SerialLCD.print("FEREASTRA!!!");
 cursorInvizibil();
 mutaCursorLaPozitia(1, 0);
 SerialLCD.print("COD:");

 int cifra = 0;

 int unu = 0;
 int doi = 0;
 int trei = 0;

 long time=millis();

 while (cifra < 3) {

   if(millis()-time>10000){
     stare_Efractie();
     return ;
   }



   buttonState = HIGH;
   if (unu == 0) {
     buttonState = digitalRead(button1);
     if (buttonState == LOW) {
       codul[cifra] = 1;
       cifra++;
       unu = 1;

       delay(500);
       time=millis();
     }

   }

   buttonState = HIGH;
   if (doi == 0) {
     buttonState = digitalRead(button2);
     if (buttonState == LOW) {
       codul[cifra] = 2;
       cifra++;
       doi = 1;

       delay(500);
       time=millis();
     }

   }

   buttonState = HIGH;
   if (trei == 0) {
     buttonState = digitalRead(button3);
     if (buttonState == LOW) {
       codul[cifra] = 3;
       cifra++;
       trei = 1;

       delay(500);
       time=millis();
     }

   }



 }
 testare_cod();
}

// 4. Event panic button
void ev_but_TST(void) {
 stergeLCD();
 nivelIluminare(25);

 while (1) {
   digitalWrite(LED_1, LOW);
   digitalWrite(LED_2, HIGH);
   mutaCursorLaPozitia(0, 0);
   SerialLCD.print("ALARMA!");
   cursorInvizibil();
   delay(500);
   stergeLCD();
   digitalWrite(LED_1, HIGH);
   digitalWrite(LED_2, LOW);
   delay(500);
 }
}

// LCD standby
void stareStandby (void) {
 stergeLCD();
 nivelIluminare(0);
}

//
// LCD preset functions begin
//

//level value between 0 and 29 including
void nivelIluminare(int nivel) {
 SerialLCD.print(124, BYTE);
 SerialLCD.print(128 + nivel, BYTE);
 delay(100);
}

void selecteazaLiniaUnu(){
 SerialLCD.print(254, BYTE);
 SerialLCD.print(128, BYTE);
 delay(100);
}

void selecteazaLiniaDoi(){
 SerialLCD.print(254, BYTE);
 SerialLCD.print(192, BYTE);
 delay(100);
}

void stergeLCD(){
 SerialLCD.print(254, BYTE);
 SerialLCD.print(1, BYTE);
 delay(100);
}

void mutaCursorDreapta(){
 SerialLCD.print(254, BYTE);
 SerialLCD.print(0x14, BYTE);

}

void mutaCursorStanga(){
 SerialLCD.print(254, BYTE);
 SerialLCD.print(0x10, BYTE);

}

//line 0 or 1, and the column between 0 and 16
void mutaCursorLaPozitia(int linie, int coloana){
 SerialLCD.print(254, BYTE);
 if (linie == 0) {
   SerialLCD.print(128 + coloana, BYTE);
 }
 else {
   SerialLCD.print(128 + 64 + coloana, BYTE);
 }

}

void cursorTipLinieVizibil() {
 SerialLCD.print(254, BYTE);
 SerialLCD.print(0x0E, BYTE);
 delay(100);
}

void cursorTipBaraVizibil() {
 SerialLCD.print(254, BYTE);
 SerialLCD.print(0x0D, BYTE);
 delay(100);
}

void cursorInvizibil() {
 SerialLCD.print(254, BYTE);
 SerialLCD.print(0x0C, BYTE);
 delay(100);
}

void scrollTextDreapta() {
 SerialLCD.print(254, BYTE);
 SerialLCD.print(0x1C, BYTE);
 delay(100);
}

void scrollTextStanga() {
 SerialLCD.print(254, BYTE);
 SerialLCD.print(0x18, BYTE);
 delay(100);
}

//
// END LCD preset functions
//
12  Topics / Home Automation and Networked Objects / burglary and fire power - problems with exit status code of "ALARM!" HELP on: April 14, 2011, 02:11:54 pm
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 saw the forum as you start to explain something Millis () I think it's the next site http://www.arduino.cc/en/Tutorial/BlinkWithoutDelay
I do not know how to use this command to my program

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!
13  Using Arduino / Programming Questions / code help on: April 12, 2011, 11:11:26 pm
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.
14  Using Arduino / Programming Questions / Hello - I have some problem on: April 12, 2011, 06:48:41 am
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
Pages: [1]