Jump to content
43oh

devdibyo

Members
  • Content Count

    6
  • Joined

  • Last visited

Posts posted by devdibyo

  1. Hi , I am interfacing MSP430F5529 and SIM900A using energia software. I have tried the code using Arduino Uno before and it seemed to work fine. However when I try the same with msp430 , there is no output on the serial monitor. Few days back I came to know that there is a voltage mismatch between the msp430 output and sim900 input and as suggested by few members of the thread , I am supposed to use a voltage translator to convert the 3.3V output of the Msp430 board and then apply it to sim900A module. They recommended Rs232 for this purpose .

     

    I want to know the connection that'll be required to made in order to translate the voltage of the msp430. Where do I connect the rs232 cable and where do I apply it's output voltage ?

     

    Thank you .

  2. @@B@tto. When I run this code using Arduino Uno, it sends a Get request to thingspeak website , wherein the data collected by lm35 sensor is stored . The serial monitor doesn't show anything , which is fine because it is not supposed to show anything . However , when I run it using msp430f5529 and energia software , there is nothing in serial monitor and also the data doesn't get updated on thingspeak website .it just keeps running .I have checked my lm35 reading in energia , it is working fine , but the Get request is not being made . My guess is that the serial pins I have used may be wrong or the AT commands may not be correct . Also , I am using pin 3.4 and pin 3.3 for receiving and transmitting in the msp430 board .

    Any help will be much appreciated .

  3. I am interfacing LM35 and SIM900 using MSP430F5529 board . For this purpose i am using Energia software . As we all know arduino code is compatible in Energia . Hence , I have used the same code that i used in Arduino Uno . The code works fine and i get my thingspeak channel updated with every HTTP request however , when i use Energia , it doesnt show any error , neither does it show/update my thingspeak channel . 

     

    I had used Pin 7 and 8 for receiving and transmitting in Arduino . In Msp430 , I have used Pin P3.4 and P3.3 for receiving and transmitting .

     

    My Energia code is as follows - 

     

      


      #include <SoftwareSerial.h>
        #include <String.h>
         
        SoftwareSerial mySerial(P3_4, P3_3);
        
        boolean pin2=LOW,pin3=LOW,pin4=LOW,pin5=LOW,pin6=LOW; 
        float temp=0.0;
        
        void setup()
        {
          mySerial.begin(9600);               // the GPRS baud rate   
          Serial.begin(9600);    // the GPRS baud rate 
          pinMode(2,INPUT);
          pinMode(3,INPUT);
          pinMode(4,INPUT);
          pinMode(5,INPUT);  
          pinMode(6,INPUT);  
          delay(1000);
        }
         
        void loop()
        {
              temp=analogRead(A0);
              temp=temp*0.4887;  
              delay(2);          
               Send2Pachube();
           
          if (mySerial.available())
            Serial.write(mySerial.read());
        }
        void Send2Pachube()
        {
          mySerial.println("AT");
          delay(1000);
        
          mySerial.println("AT+CPIN?");
          delay(1000);
        
          mySerial.println("AT+CREG?");
          delay(1000);
        
          mySerial.println("AT+CGATT?");
          delay(1000);
        
          mySerial.println("AT+CIPSHUT");
          delay(1000);
        
          mySerial.println("AT+CIPSTATUS");
          delay(2000);
        
          mySerial.println("AT+CIPMUX=0");
          delay(2000);
         
          ShowSerialData();
         
          mySerial.println("AT+CSTT=\"aircelgprs\"");//start task and setting the APN,
          delay(1000);
         
          ShowSerialData();
         
          mySerial.println("AT+CIICR");//bring up wireless connection
          delay(3000);
         
          ShowSerialData();
         
          mySerial.println("AT+CIFSR");//get local IP adress
          delay(2000);
         
          ShowSerialData();
         
          mySerial.println("AT+CIPSPRT=0");
          delay(3000);
         
          ShowSerialData();
          
          mySerial.println("AT+CIPSTART=\"TCP\",\"api.thingspeak.com\",\"80\"");//start up the connection
          delay(6000);
         
          ShowSerialData();
         
          mySerial.println("AT+CIPSEND");//begin send data to remote server
          delay(4000);
          ShowSerialData();
          
            String str="GET https://api.thingspeak.com/update?api_key=--------C&field1=" + String(temp);
          mySerial.println(str);//begin send data to remote server
          delay(4000);
          ShowSerialData();
        
          mySerial.println((char)26);//sending
          delay(5000);//waitting for reply, important! the time is base on the condition of internet 
          mySerial.println();
         
          ShowSerialData();
         
          mySerial.println("AT+CIPSHUT");//close the connection
          delay(100);
          ShowSerialData();
        } 
        void ShowSerialData()
        {
          while(mySerial.available()!=0)
            Serial.write(mySerial.read());
        }

×
×
  • Create New...