Skip to content

A library used to check peak of a signal by a callback. Signal datas are coming from an accelerometer using mqtt communication protocol.

License

Notifications You must be signed in to change notification settings

aug-bari/PeakSeeker

Repository files navigation

Peak Seeker

A library used to check peak of a signal by a callback. Signal datas are coming from an accelerometer using mqtt communication protocol.

Implementation

class Example {

    companion object : OnPeakListener {

        @JvmStatic
        fun main(args: Array<String>) {

            // Create PeakSeeker object
            val peakSeeker = PeakSeeker("tcp://mybroker.com", "PeakSeekerClientName")
            
            // Perform connection
            peakSeeker.connect("username", "password")
            
            // Subscribe to topic
            peakSeeker.subscribe("topicName")

        }

        //Set custom callback to see status change
        override fun onPeak(peak: Peak) {
            println("Detected ${peak.type} peak on ${peak.axis} axis with value: ${peak.value}")
        }
    }

}

About

A library used to check peak of a signal by a callback. Signal datas are coming from an accelerometer using mqtt communication protocol.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages