Synchronicity is an iOS application that controls an LED wearable via Bluetooth communication.
This project can be broken up into three different portions:
- iOS Application
- Arduino Program
- Hardware Required (and not required)
This app will require the use of Xcode and will be written in Swift language. It also utilizes the already installed bluetooth library called CoreBluetooth.
Install Xcode
Xcode can be found in the Mac App Store
The program is written using Swift language and the CoreBluetooth library for Xcode/Swift. No additional downloading is needed to utilize the library as it comes pre-installed on Xcode.
From here, you will be able to build the app and deploy onto your iOS device. Note: Depending on your Mac OS, Bluetooth Low Energy may or may not be supported on the Xcode simulator. It is recommended to deploy on your personal device.
The Arduino board program needs to be uploaded using the Arduino IDE.
After downloading the Arduino IDE software onto your machine, you will need to download the drivers for the specific board being used. Navigate to the top menu and go to:
Tools --> Board --> Boards Manager...
From here type the name of the board in the search bar, Arduino Nano 33 BLE
, and click Install to install the related drivers.
Two additional Arduino libraries will need to be downloaded:
- ArduinoBLE
- Adafruit NeoPixel
In order to download Arduino libraries, navigate to the top menu and go to:
Tools --> Manage Libraries...
In the search bar, type ArduinoBLE
and click Install. Do the same for the multiple Adafruit Neopixel
library.
Ensure you choose the correct Port before uploading the program.
Additionally, depending on how many LEDs you are using, you may need adjust the number of LEDs when setting up the Adafruit NeoPixel object.
The setup for this project relies on Pin 12 for the data output of the NeoPixels but this can be updated to what your project requires. Be sure to update the Pin # in the Arduino program if you do not use Pin 12.
Once all the steps above have been completed, you will be able upload the program onto the board.
- Arduino Nano 33 BLE (with or without headers installed)
- NeoPixel Jewels
- This project uses three NeoPixel Jewels, total of 21 LEDs
- Solid core wires
- LiIon/LiPoly Backpack Add-On
- Or any way to power circuit off battery power
- LiIon/LiPoly Battery 3.7V 500mAh
- Amperage can vary but 500mAh was enough for initial project requirements
- Adafruit Micro Lipo - USB LiIon/LiPoly charger
- Used the charge batteries so you don't have to keep buying new ones
- Breadboard
- Jumper wires
- Solid core wires
- Solder iron and solder
- Wire cutters/strippers
Farah Davoodi | https://github.com/in-formation
Thank you to Adafruit for their amazing tutorial on creating a Bluetooth Arduino application using Xcode/Swift. Specific thanks to user TrevKnows, https://github.com/TrevKnows, for creating the tutorial that greatly helped create Synchronicity.
Thank you to Arduino for their Arduino Bluetooth Low Energy Library that had a great example Arduino sketch that vastly helped my project connect to the iOS application.