Skip to content

This library is designed to make it easy to use Force Sensitive Resistor as a button.

Notifications You must be signed in to change notification settings

pkstrsk/FSRButton

 
 

Repository files navigation

FSRButton Library for Arduino

This library is designed to make it easy to use Force Sensitive Resistor as a button..​. It is easy to use for not only beginners but also experienced users.

FSRButton stands for Force Sensitive Resistor Button

Features

  • Uses the analogRead function to get a reading from the FSR
  • Supports debounce to eliminate the chattering phenomenon
  • Supports the pressed and released events
  • Supports the counting (for FALLING, RISING and BOTH)
  • Easy to use with multiple buttons
  • All functions are non-blocking

Available Examples

  • [mwe.cpp] Minimum working example

Available Functions

  • setDebounceTime()
  • getState()
  • getStateRaw()
  • getRawAnalogRead()
  • getRawAnalogReadPercent()
  • isPressed()
  • isReleased()
  • setCountMode()
  • setThreshold()
  • getCount()
  • resetCount()
  • loop()

References

Based on ezButton Library

About

This library is designed to make it easy to use Force Sensitive Resistor as a button.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 100.0%