JacquardToolkit is a iOS framework to enable developers to develop their own applications using their Levi's Jacquard.
- Enable your applications bluetooth to start searching nearby devices
- Ability to easily connect with your own Levi's Jacquard
- Send a rainbow glow to your jacket
- React to gesture the user performs on their jacket
- Access each specific threads value at any point in time
- Play gesture tutorial videos for your users
- Tell if you are currently connected to your jacket
JacquardToolkit is currently only available as a Cocoapod.
- Add a pod entry for JacquardToolkit to your Podfile:
pod 'JacquardToolkit'
- Update your Popdfile by running:
pod update
- Don't forget to include the necessary import statement in your target class:
import JacquardToolkit
-
Add the 'Privacy - Camera Usage Description' to your Info.plist:
-
Enable your device's bluetooth capabilities and connect to your jacket by passing in your jacket's UUID:
import UIKit
import JacquardToolkit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
JacquardService.shared.activateBluetooth { _ in
JacquardService.shared.connect(viewController: self)
}
}
}
- Send a colorful rainbow glow to your jacket:
@IBAction func glowButtonTapped(_ sender: Any) {
JacquardService.shared.rainbowGlowJacket()
}
- Use the JacquardServiceDelegate to react to all of the user gestures (including Double Tap, Brush In, Brush Out, Cover, Scratch & Force Touch):
override func viewDidLoad() {
super.viewDidLoad()
JacquardService.shared.delegate = self
}
extension ViewController: JacquardServiceDelegate {
func didDetectDoubleTapGesture() {
//Detected Double Tap Gesture
}
func didDetectBrushInGesture() {
//Detected Brush In Gesture
}
func didDetectBrushOutGesture() {
//Detected Brush Out Gesture
}
func didDetectCoverGesture() {
//Detected Cover Gesture
}
func didDetectScratchGesture() {
//Detected Scratch Gesture
}
func didDetectForceTouchGesture() {
//Detected Force Touch Gesture
}
func didDetectZoomInGesture() {
//Detected Zoom In Gesture
}
func didDetectZoomOutGesture() {
//Detected Zoom Out Gesture
}
}
- Additionally, you can uncover the values of each specific thread:
override func viewDidLoad() {
super.viewDidLoad()
JacquardService.shared.delegate = self
}
extension ViewController: JacquardServiceDelegate {
func didDetectThreadTouch(threadArray: [Float]) {
//Dected an array of 15 values that represent
//the intensity each thread is being touched by
}
}
- Show your user how to correctly perform the gestures with tutorial videos:
@IBAction func doubleTapTutorialButtonTapped(_ sender: Any) {
JacquardService.shared.playDoubleTapTutorial(viewController: self, showDismissButton: true)
}
@IBAction func brushInTutorialButtonTapped(_ sender: Any) {
JacquardService.shared.playBrushInTutorial(viewController: self, showDismissButton: true)
}
@IBAction func brushOutTutorialButtonTapped(_ sender: Any) {
JacquardService.shared.playBrushOutTutorial(viewController: self, showDismissButton: true)
}
@IBAction func coverTutorialButtonTapped(_ sender: Any) {
JacquardService.shared.playCoverTutorial(viewController: self, showDismissButton: true)
}
@IBAction func scratchTutorialButtonTapped(_ sender: Any) {
JacquardService.shared.playScratchTutorial(viewController: self, showDismissButton: true)
}
@IBAction func forceTouchTutorialButtonTapped(_ sender: Any) {
JacquardService.shared.playForceTouchTutorial(viewController: self, showDismissButton: true)
}
Be sure to check out the example application for more information (JacquardToolkitExample).
This is an open-source project so any additions, fixes, or cool new ideas are welcomed! If you have interest in contributing to JacquardToolkit, be sure to create your own fork of the repo and then submit a pull request when you are done.
This framework is just a small part of the project that our team at Georgia Tech has been working on. If you are interested in learning more about our project, please visit our Medium publication.
MIT
📍Made in ATL