Introduction: Brace Yourself

This guide will walk you through the steps required to build an "S.O.S.“, a bracelet that works as an emergency call in situations of imminent risk. Its use is targeted for people that tend to go to places like bars, malls and restaurants frequently; it is a bracelet with a sensor that sends an alarm and its location to the security guards of the place to a certain beacon when a particular sequence is applied to the sensor.

Step 1: Objective

The creation of a device capable of sending a "S.O.S." message to the nearest security center to assure the safety of the people using a dragonboard 410c development card with a bluetooth connection and the usage of a http protocol.

Step 2: Materials

Dragonboard 410c development card

· Simple Lilypad Arduino

· Lilypad Coin Cell Battery Holder

· RN-42 BlueSMiRF Silver

· Push button

· Buzzer Grove

· Jumpers

· A Bracelet or Fabric and Threat

· 2025 Battery support

Step 3: Wiring Up

1.- Connect the push button, which has a pull-down array, to the arduino lilypad pin 5 as shown in image 1.

2.- Establish the bluetooth connection to the lilypad having in mind that the RX and TX pins of the bluetooth module must be connected in an inverse way to the ones in the lilypad.

3.- A supply of 3.3 V feeds the bluetooth module and the lilypad and this will be connected to the SR-2025 battery support.

4-. The only connected GPIO will be the GPIO A that is connected to pin 23 on the dragonboard.

Step 4: Programming

Used repositories:

Libsoc @ https://github.com/jackmitch/libsoc (Follow instructions on github page) Required packages Autoreconf: sudo apt-get install dh-autoreconf To handle GPIO on python: ./configure --enable-board=dragonboard410c --with-board-configs 96boardsGPIO @ https://github.com/96boards/96BoardsGPIO

/ GPIO names used with the 96boards GPIO library

Io-client-python @ https://github.com/adafruit/io-client-python To use Adafruit’s io platafform.

import time from Adafruit_IO import Client from gpio_96boards import GPIO from time import gmtime, strftime

GPIO_A = GPIO.gpio_id('GPIO_A') pins = ( (GPIO_A, 'out'), )

def blink(gpio): gpio.digital_write(GPIO_A,GPIO.HIGH) time.sleep(1) gpio.digital_write(GPIO_A,GPIO.LOW) time.sleep(1)

ADAFRUIT_IO_KEY = 'Your Private Key Goes Here'

aio = Client(ADAFRUIT_IO_KEY)

while True: try: data = aio.receive_next('Status') ts = strftime("%Y-%m-%d %H:%M:%S", gmtime()) print ts, ' ','Alert! {0}'.format(data.value) if data.value == 'Call for help': with GPIO(pins) as gpio: blink(gpio) blink(gpio) except Exception as e: pass

time.sleep(10)

Android App. Created using MIT App Inventor, uses HTTP protocol to post data to adafruit’s io API

Step 5: Conclusion

The proyect created will accomplish the main objetive, to create an environment of safety for the people in the city, making a "smart city". This proyect affects the way poeople live in cities entirely, creating safe zones so that everyone can feel sure at any given time. The proyect was created effectively in the given time.