SWIFT, RASPBERRYPI, BLUETOOTH — X — FILE PART 2

RASPBERRYPI SOFTWARE

SWIFTLINUXBLE LIBRARY

Creation of a service along with characteristics
Punch service
  • punchResponseCharacteristic is used to notify an observer about the punch response. Is the target being hit? and if yes, how long did it take?PunchResponse contains those information
  • punchTimeSeqCharacteristic is used to set time intervals between each target switch in a sequence
  • punchSequenceCharacteristic is used to set each target in a sequence

EVERYTHING IS DATA

Data convertible protocol
Punch Response
Assemble function

SWIFTYGPIO LIBRARY

  • direction: configures the PIN as input or output
  • value: the pin value 1 (HIGH) or 0 (LOW)
  • pull: if available you can set also pull up or down resistor
  • callbacks: onFalling , onRaising , onChanging provide an easy way to be informed when the value of a PIN set as input changes
  • debounce: this is a super useful feature that helps in debounce input values by using a timer. You can find more about bouncing here.
Input PIN configuration

THE MOBILE APPLICATION

  • athlete anagraphic
  • weight
  • reflex responses
App sequence configuration
Connection and program configuration pipeline
Listen to live results
Live results view

EVERYTHING IS DATA BIS

Serialization — Deserialization

WHAT’ S NEXT

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store