Remote Alarm using EMANT380 and Windows Mobile

Most alarm systems provide a switch to indicate an alarm status. This example uses the EMANT380 Bluetooth DAQ and a Windows Mobile smartphone (HTC Touch) to send an SMS when the switch is closed.

This example requires
  • Bluetooth Starter Kit - comprises EMANT380 Bluetooth DAQ with Light Application Adaptor
  • Windows Mobile 6 Professional Smartphone (we tested with a HTC Touch)
The example program was created using Visual Basic 2005 (no Express) and running on the Windows Mobile 6 Professional Platform. Note that if you are using another Windows Mobile platform, you can change the platform in the example.
SMS Send IO.zip (296 KB)

To use the program
  1. enter the phone number you want to send the SMS to.
  2. change the Digital Input to 3 if you want to use the switch on the Light Application Adaptor (it is connected to D3). If you want to use your own switch you can connect it to the terminal named SCK (which is D7) and GND. See the Light Application Adaptor specifications for more information.
  3. press send to arm the program
When the switch closes, an SMS will be sent out and the program disarms. Either rearm or exit the program

Some key points of the code

Emant3001.Open(False, "COM1")
You need to pair the Bluetooth DAQ. In our example, after pairing, we set the outgoing COM port to COM1

Emant3001.ConfigDIO(255)
Enable the digital IO of the EMANT380 to all inputs

If (Not Emant3001.ReadDigitalBit(Int(NumericUpDown1.Value))) Then
Timer1.Enabled = False
Dim VBMobileSMS As New SmsMessage(TextBox1.Text, TextBox2.Text)
VBMobileSMS.Send()
Emant3001.Close()
Label1.Text = "Unconnected"
End If

This is the code that checks the state of the digital input, sends out sms when digital input is low (switch is closed) and disables the timer thereby disarming the program.

Created by admin. Last Modification: Saturday 13 of February, 2010 14:39:09 SGT by admin.

Menu