Hack-24 is a mobile application that integrates with an Arduino-based sensor system to monitor heart rate and detect signs of panic attacks. Upon detecting abnormal heart rate patterns, the app sends a WhatsApp message to a pre-saved contact to notify them of the situation. The app also triggers push notifications for the user to check on their condition.
- Heart Rate Monitoring: Collects real-time heart rate data using an Arduino sensor.
- Panic Detection: Alerts are sent when the heart rate exceeds a panic threshold.
- WhatsApp Notification: Automatically sends a WhatsApp message to a designated contact if a panic attack is detected.
- Push Notifications: Triggers in-app notifications to remind users to check their condition.
- User Interface: Easy-to-use interface to enter contact details, start monitoring, and receive alerts.
- iOS: Swift, UIKit, UserNotifications
- Arduino: C++ for heart rate sensor integration
- Twilio API: For sending WhatsApp messages
- Ngrok: Tunnel API calls to local development server
- HealthKit: To track heart rate data (if connected with Apple Health)
- Adafruit Bluefruit Feather: Arduino-compatible board for hardware monitoring
git clone https://github.com/mxgardner/hack-24.git
Push to the branch: git push origin my-feature. Submit a pull request. License This project is licensed under the MIT License - see the LICENSE file for details.
- Open the Xcode project in the
/hack-appfolder. - Make sure to link the required frameworks:
UserNotifications,HealthKit, andORSSerial. - Add
NSHealthShareUsageDescriptiontoInfo.plistto request HealthKit authorization.
- Upload the Arduino code from the
/arduino-codefolder to the Adafruit Bluefruit Feather board. - Connect the heart rate sensor to the Feather board.
- Ensure that the baud rate for serial communication is set to 9600.
- Set up a Twilio account and configure a WhatsApp sandbox.
- Update your Twilio
Account SID,Auth Token, andFromnumber in the server code.
- Install ngrok and set up a tunnel to expose your local server to the internet:bash ngrok http 3000
-
Arduino Setup
- Connect the sensor to the Arduino board.
- Upload the provided code for heart rate monitoring.
-
Run the iOS App
- Open the app on your iOS device.
- Enter the WhatsApp number for notifications.
- Start monitoring for panic attack symptoms.
-
WhatsApp Alerts
- The app will send WhatsApp messages if panic attack symptoms are detected.
-
Push Notifications
- Push notifications will remind users to check on their heart rate and condition.
The project utilizes the Adafruit Bluefruit Feather for real-time heart rate monitoring via sensors. Ensure that the hardware connections between the Feather board and the sensors are secure.
Components:
- Adafruit Bluefruit Feather
- Heart rate sensor (connected to analog pin)
- LEDs for normal/panic status indicators
The app features a sleek, user-friendly interface with:
- Input fields to save WhatsApp numbers.
- A button to trigger real-time WhatsApp messages when panic symptoms are detected.
- Push notification functionality to alert the user.
We welcome contributions from the community. To contribute:
- Fork this repository.
- Create a new branch:
git checkout -b my-feature. - Make your changes.
- Commit them:
git commit -am 'Add some feature'. - Push to the branch:
git push origin my-feature. - Submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.