Given function is used for reading vibration sensor signal. #include SoftwareSerial GSM(P1_6, P1_7) // RX, TX float latitude=0 float logitude=0 #define led P1_0 const int vibrationSensor=PUSH2 int i=0 So first of all we have included a required libraries and declared pin and variables. Most of Arduino IDE function can be used directly in this Energia IDE.
#Custom car accident simulation code#
To write or compile the code in MSP430 we have used Energia IDE which is Arduino compatible. Complete code is given at the end of the project. Programming for this project is easy except the GPS part. Rest of connections are shown in the circuit diagram. A LED is also used for indicate the accident detection. The vibration sensor is connected at P1_3. 12 Volt supply is used to power the GSM Module.
#Custom car accident simulation serial#
By using Software Serial Library here, we have allowed serial communication on pin P_6 and P1_7, and made them Rx and Tx respectively and connected to the GSM module. Here Tx pin of GPS module is directly connected to digital pin number P1_1 of MSP430 Launchpad (hardware Serial) and 5v is used to power GPS Module. It means whenever the vibration sensor will detect vibration it will give HIGH logic to the microcontroller.Ĭircuit Connections of this Vehicle Accident Alert System Project is simple. In our case, we have used an active HIGH logic vibration sensor module. Vibration sensor module gives a digital output HIGH/LOW logic depending on the module. In this MSP430 Accident Alert System project, we have used a vibration sensor module which detects vibrations or sudden modulations. (To learn more about GSM module, Check our various GSM projects with various microcontrollers here) (No need to open message)ĪTD making a call (ATD+919610126059 \r\n)ĪT+CMGS=”Mobile Number” Assigning recipient’s mobile numberĬtrl+Z sends message command (26 in decimal). Below is some AT commands we used here in this project:ĪT+CNMI=2,2,0,0,0 Auto opened message Receiving. After receiving AT Command GSM Module respond with OK. For testing GSM Module we used AT command. There are some commands for calling and messaging that we have used in many of our previous GSM projects with Arduino. This command is used to control the GSM module.
Also if you are new to MSP430 then start with LED blink using MSP430 Tutorial. Before going into Project, we will discuss GPS, GSM and Vibration Sensor.