Remote Alarm using EMANT380 and Windows Mobile
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)
SMS Send IO.zip (296 KB)
To use the program
- enter the phone number you want to send the SMS to.
- 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.
- press send to arm 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.
