Using the android smartphone and twitter to generate an emergency flood alert

April 13th, 2012 admin No comments

On 16th of June 2010, heavy rains in Singapore’s central shopping district in Orchard Road caused several basement shopping malls and car parks to be submerged in water. Over 70 members of the public needed to be rescued from danger. Another significant flooding in December 2011 caused the basement area of Far East Shopping centre and Lucky Plaza to be flooded. This resulted in the loss of millions of dollars worth of electrical goods, jewellery as well as customer patronages. It also caused the temporary closing of the recently opened burger chain store Wendy’s.

Using an Android smartphone with the EMANT380 DAQ module, a group of students from NTU EEE tackled the problem of mass alert to interested persons. By measuring the flood water level and tweeting the results allow those affected by the flood to take preventive actions. Twitter is a better mass broadcast system (and FREE) compared to existing SMS solutions.

For more information

Categories: Project Tags:

Your Android Smartphone is now a Scratch Sensor Board

October 21st, 2011 admin No comments

Scratch is a graphical programming environment that makes it easier for kids (ages 8 and up) to create their own interactive stories, games, animations, and simulations. The new Scratch Sensor app for the Android Smartphone allows kids to now interact with their favorite stuff toy.

Connections between Scratch and other programs are made using the Scratch networking protocol. With this feature turned on, a program can also send broadcasts and global variables into Scratch. The Scratch Sensor uses the Scratch networking protocol to send the Android Smartphone accelerometer and compass sensor information and broadcast two states (jump and walk) to Scratch.

Categories: Project Tags:

Python DAQ Android workshop

September 7th, 2011 admin No comments

A 4 hour workshop was organised for 11 2nd year engineering students from Republic Polytechnic on using the Android Smartphones and DAQ to solve real life problems. These students have learnt Python during their first year and have completed one semester of analog electronics and digital electronics. However they are unfamiliar with DAQ and have no prior Android programming experience.

They brought along their personal notebooks and 3 of the students owned Android smartphones from Samsung and Sony Experia. They were formed into 3 teams and given the following problem.

Heat Stroke Notification

“An NS man collapsed during jungle training and died of heat stroke in Brunei”. Heat stroke is defined as a body temperature of greater than 40.6 C due to environmental heat exposure with lack of thermoregulation. This is distinct from a fever, where there is a physiological increase in the temperature set point of the body.

Design a system where a person’s body temperature is monitored and when 40.6 C is exceeded, an emergency SMS with a map URL is sent. The recipient of the SMS should be able to click on the link to see on a map the location of the victim.

Although not every student had an Android smartphone, nonetheless the RemoteControl feature of the Python for Android scripting environment allows every student to complete the task using only their notebook with bluetooth (to communicate with the EMANT380 Bluetooth DAQ) and the android emulator. After testing on the notebook, they then copied their solution unmodified to one of the 3 Android smartphones for the field test.

One team’s solution is shown in the following video

Categories: Workshop Tags:

SIAA Machine To Machine Service Portal

December 27th, 2010 admin No comments

To encourage its member-companies to develop M2M solutions or products, SIAA has set up a M2M Service Portal that has the common functions of analysing and managing the data, as well as generating reports and sending out alerts through the public networks.

Working with SIAA, Emant Pte Ltd has created a demonstration kit that allows users to measure temperature, light intensity and switch status using either the USB DAQ Training Kit or the Bluetooth DAQ Starter Kit (for a wireless solution). A logger program written in Visual Basic 2010 running on the Windows platform is available for online installation. This logger program allows the DAQ modules to make the measurements and post the results to the M2M Service Portal. It takes about 30 minutes to complete the setup procedure.

Also included in the demonstration kit is the Visual Basic source code which will allows the user to understand and modify the code if customisation is required.

Categories: Project Tags:

Smartphone as Sensor Node in a Sensor Cloud

March 29th, 2010 admin No comments

With a Nokia N82 smartphone and Bluetooth DAQ Starter Kit (with EMANT380) running Python on Symbian S60 OS, measure temperature and light intensity and write the measurements to www.sensor-cloud.com

Using Beta Python Driver for the EMANT380 Bluetooth DAQ for the Symbian S60 3rd Edition. The driver is incomplete. (For PyS60 1.9.7 and later)

Note: If you are new to Symbian S60 Python programming, please familiarise yourself with the environment before attempting to run the following examples. You should install Python on your SD Drive. Due to security, some file areas are hidden. The Python folder on the SD Drive can be browsed when you connect your phone to the PC. Copy all the files in this folder to the Python folder on your phone including the lib folder. Don’t change the name.

Run the Python examples provided by Nokia. Only when you can successfully run their examples, should you attempt the middaq.py script

  1. Download the middaq.py script from info.emant.com. We will modify the middaq.py script using notepad on the PC.
  2. Change the Network Access Point to the one you will be using
  3. Key in your api key and api secret which can be obtained from www.sensor-cloud.com
  4. Key in the Mac address of your EMANT380 module
  5. The default time delay between each measurement is 10 minutes. You can change the delay here
  6. Finally enter your geolocation. You can also make use of the GPS info from the Nokia phone. Reading the internal GPS Location may require signing the shell when you are installing the PyS60 in your device. You can get the shell signed at the “Symbian Online Signing”.
  7. Transfer the modified middaq.py script to your Nokia smartphone.
  8. Check if you have paired the EMANT380 to the Nokia phone. If you have not, do it now
  9. Start Python.
  10. Run the middaq.py script. When the program runs, it will connect to the EMANT380, retrieves and displays its firmware ID. Next it will write the light intensity and temperature measured to www.sensor-cloud.com. The status of the write will also be displayed.
  11. To exit the program, press the exit key.
Categories: Project Tags:

Remote Alarm using EMANT380 and Windows Mobile

February 20th, 2010 admin No comments

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

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.

Categories: Project Tags:

Smartphone development using Python and Symbian S60

February 25th, 2009 admin No comments

Republc Polytechnic 25 Feb 2009

2 hour staff workshop covered the following:

  • installation of S60 emulator with bluetooth
  • run python (console and GUI) examples for
    • analog input
    • analog output
    • digital input
    • digital output
    • sensors
      • photodiode: light intensity
      • thermistor: temperature
      • pressure
      • strain gauge
Categories: Workshop Tags:

Overview of Bluetooth DAQ Applications

January 28th, 2009 admin No comments

Singapore Polytechnic 28 Jan 2009

3 hour staff workshop covered the following:

  • Wireless Data Acquisition with LabVIEW on Windows
  • Game development using Python and Pygame on Windows
  • Smartphone development using Python and Symbian S60
  • Examples programs include
  • analog input
    • analog output
    • digital input
    • digital output
    • sensors
      • photodiode: light intensity
      • thermistor: temperature
      • pressure
      • strain gauge
      • accelerometer
      • magnetic compass
Categories: Workshop Tags:

Discover the World of Gaming Console Design

October 8th, 2008 admin No comments

Synopsis: Learn how you can build a “homebrew Wii” device that interacts with the computer graphics. In this 2 hour workshop, you will explore the use of a bluetooth gadget with some sensors for interacting with simple games and animation running on the computer screen.

Singapore Polytechnic staff were introduced to the EMANT380 Bluetooth DAQ through a 2-hour EMANT380 Bluetooth DAQ training jointly conducted by KY Chan and Pee Suat Hoon in Singapore Polytechnic on 8 October 2008 as part of the Singapore Polytechnic Magellan Staff Workshops series. 12 staff attended the training to understand the functions of Emant Bluetooth DAQ.

The lesson started with KY Chan demonstrating how Emant Bluetooth can be used together with different sensors for games development. After this half an hour demo session, Ms Pee continued with a hands-on session where participants tried to link Labview and Python programs to acquire the data collected by the EMANT380 Bluetooth DAQ.

SP Workshop

Categories: Workshop Tags: