Jump to content


  • Content count

  • Joined

  • Last visited

Everything posted by kamalesh

  1. MSP430FR4133 - Can LCD pins be configured as GPIO

    Thank You so much . Its working.
  2. Hi , I am using MSP430FR4133LP , in energia the GPIO pins are predefined in the pins_energia.h for MSP430FR4133 LP based on the silkscreen on the board. I using this MSP430FR4133 chip for another project and in that i am not using a LCD so i thought that i can also use LCD pins as GPIO. For this purpose i need to add the pins in the pins_energia.h but i am not able to crack it. Can anyone help me with this ....? if i try to use any other pins other than the defined ones (say P2_2) ... it throws an error as " P2_2 not defined in the scope" // Pin names based on the silkscreen // static const uint8_t P1_0 = 4; static const uint8_t P1_1 = 3; static const uint8_t P1_2 = 24; static const uint8_t P1_3 = 13; static const uint8_t P1_4 = 12; static const uint8_t P1_5 = 11; static const uint8_t P1_6 = 18; static const uint8_t P1_7 = 19; //static const uint8_t P2_0 = ; //static const uint8_t P2_1 = ; //static const uint8_t P2_2 = ; <------ What should i do in order to add this pin static const uint8_t P2_3 = 22; static const uint8_t P2_4 = 21; static const uint8_t P2_5 = 8; static const uint8_t P2_6 = 25; static const uint8_t P2_7 = 5; //static const uint8_t P3_0 = ; //static const uint8_t P3_1 = ; //static const uint8_t P3_2 = ; //static const uint8_t P3_3 = ; //static const uint8_t P3_4 = ; //static const uint8_t P3_5 = ; //static const uint8_t P3_6 = ; //static const uint8_t P3_7 = ; static const uint8_t P4_0 = 23; //static const uint8_t P4_1 = ; //static const uint8_t P4_2 = ; //static const uint8_t P4_3 = ; //static const uint8_t P4_4 = ; //static const uint8_t P4_5 = ; //static const uint8_t P4_6 = ; //static const uint8_t P4_7 = ; static const uint8_t P5_0 = 17; static const uint8_t P5_1 = 7; static const uint8_t P5_2 = 15; static const uint8_t P5_3 = 14; //static const uint8_t P5_4 = ; //static const uint8_t P5_5 = ; //static const uint8_t P5_6 = ; //static const uint8_t P5_7 = ; static const uint8_t P8_0 = 6; static const uint8_t P8_1 = 2; static const uint8_t P8_2 = 9; static const uint8_t P8_3 = 10; //static const uint8_t P8_4 = ; //static const uint8_t P8_5 = ; //static const uint8_t P8_6 = ; //static const uint8_t P8_7 = ; //static const uint8_t PJ_0 = ; //static const uint8_t PJ_1 = ; //static const uint8_t PJ_2 = ; //static const uint8_t PJ_3 = ; //static const uint8_t PJ_4 = ; //static const uint8_t PJ_5 = ; //static const uint8_t PJ_6 = ; //static const uint8_t PJ_7 = ; These are the pin definitions that are already in the pins_energia.h based on the silkscreen. If i want to use a pin (say P2.2) what must i do in order to define that pin in the pins_energia.h file ?? thank you in advance.....
  3. conversions i had tried .. The above code i had sent only contains a type cast version just before the For statement. 1. type cast - String buf = String (FloatVal); 2 .snprintf(buffer, sizeof buffer, "%f", myFloat); //// in this type of float to string conversion if i use %f simply the "%f" is getting printed or transmitted. if i use %d the conversion is not proper. 3 . dtostrf(FloatVal, 4, 3, Buff);
  4. hi, I am using a MSP430FR4133 launchpad, i am trying to get a float value and send it via sim800. for that i hve to convert the float value to char* or char array. I have tried many conversions but i am not able to get the conversion properly. Even if i get it properly while printing it on the serial. The data is not transmitted in the right format through sim800. for example if i use dtostrf( buff , "%f" , flaotVal); function in serial monitor only "%f" is getting printed. and if i try other type of convertions , while transmitting through sim800 the right side part of the float value gets added to the decimal values . have tried ( itoa(), sprintf(), etc..) for example .. float value = 1.25. and if i tried converting and printing it on serial monitor i am getting it corrrectly as "1.25" . But when i am trying to transmit through sim800 the converted float value is sent as "0.125" instead 1.25 . Can anyone help me with this?.
  5. The Minimal code Which i Use for the task. void loop() { duration = pulseIn(pin1, HIGH); { //conditions and statement for calculating sensor value. } String src = Sim800l.readSms(1); // if(Serial.available()) // { // String src = Serial.readString(); if(src.indexOf("Flow") != -1) { String buf = String(sensor_val); for(int i = 0; i < buf.length()+1;i++) { text = buf; } Sim800l.sendSms(number,text); delay(1000); Sim800l.delAllSms(); //Serial.print("Flow:"); //Serial.println(text); // src = "\0"; // } } }
  6. UART using MSP430FR2311

    I am using a MSP430FR2311 launch pad and i am trying to send AT commands through RX and TX to SIM800 and Receive Response from the SIM800 module. But am not able to get the response and not able to use SoftwareSerial in Energia for MSP boards. Can Anyone help with this problem ? Thank you in advance. #include <String.h> void setup() { pinMode(RED_LED , OUTPUT); Serial.begin(9600); //Serial.print(F("AT\r")); while(Serial.available()==0); val1 = Serial.readString(); Serial.print(val1); Serial.print("\r"); delay(100); } void loop(){ //do nothing if(Serial.available()) { String val2 = Serial.readString(); line += String(val2); Serial.print(line); if (line.indexOf("OK") >= 0) { digitalWrite(RED_LED,HIGH); } } } Since we cant use both the Debugging UART (Serial Monitor) and Application UART (TX and RX) at the same time , I am checking the received Response for the string "OK" . and if OK is there the RED led goes high.
  7. UART interface to sim900

    Is the RXD and TXD jumpers connected vertically or horizontally. ...? If its connected horizontally , you cant see anything in Serial monitor. If it is connected Vertically its like tapping the connection . You can use both Application UARt and can see using the Serial monitor.
  8. Can we add MSP430FR2311 Launchpad to energia. The Board Manager isn't Showing this board.