ronfrtek
Published © LGPL

Force Sensing Resistor (FSR) Arduino Simple Tutorial

In this tutorial we will learn how to detect the force applied to the Force Sensing Resistor (FSR) and display it on the OLED Display + we w

BeginnerProtip1 hour250
Force Sensing Resistor (FSR) Arduino Simple Tutorial

Things used in this project

Story

Read more

Schematics

force-sensor_GkTqE1fUUa.visuino

Code

force-sensor.visuino

Arduino
{
  "Version": "2",
  "Product": "Visuino Pro - Visual Arduino Programming",
  "Units": [
    {
      "Name": "__OpenWireRootUnit__",
      "*": [
        {
          "X": 448,
          "Name": "Arduino",
          "Instance": {
            "Serial": {
              "*": [
                {
                  "+": "TArduinoHardwareSerial"
                }
              ]
            },
            "+": "TArduinoBoard",
            "AnalogInputReference": "Default",
            "Modules": {
              "*": [
                {
                  "+": "TArduinoEEPROMModule"
                },
                {
                  "+": "TArduinoProcessor328Module"
                },
                {
                  "+": "TArduinoWatchdogTimerModule"
                }
              ]
            },
            "I2CChannels": {
              "*": [
                {
                  "InputPin": {
                    "SourcePins": [
                      {
                        "ID": "__OpenWireRootUnit__.DisplayOLED1.OutputPin"
                      }
                    ]
                  },
                  "+": "TArduinoI2C"
                }
              ]
            },
            "Digital": {
              "*": [
                {
                  "+": "TArduinoAdditionalDigitalSerial0Channel"
                },
                {
                  "+": "TArduinoAdditionalDigitalSerial0Channel"
                },
                {
                  "+": "TArduinoAdditionalDigitalInterruptChannel"
                },
                {
                  "+": "TArduinoBasicDigitalPWMInterruptChannel"
                },
                {
                  "+": "TArduinoAdditionalDigitalChannel"
                },
                {
                  "+": "TArduinoBasicDigitalPWMChannel"
                },
                {
                  "+": "TArduinoBasicDigitalPWMChannel"
                },
                {
                  "DigitalInputPin": {
                    "SourcePin": {
                      "ID": "__OpenWireRootUnit__.CompareValue2.OutputPin"
                    }
                  },
                  "+": "TArduinoAdditionalDigitalChannel"
                },
                {
                  "DigitalInputPin": {
                    "SourcePin": {
                      "ID": "__OpenWireRootUnit__.CompareValue1.OutputPin"
                    }
                  },
                  "+": "TArduinoAdditionalDigitalChannel"
                },
                {
                  "+": "TArduinoBasicDigitalPWMChannel"
                },
                {
                  "+": "TArduinoBasicDigitalPWMChannel"
                },
                {
                  "+": "TArduinoBasicDigitalPWMSPI0Channel"
                },
                {
                  "+": "TArduinoAdditionalDigitalSPI0Channel"
                },
                {
                  "+": "TArduinoAdditionalDigitalSPI0Channel"
                },
                {
                  "OutputPin": {
                    "SinkPins": [
                      {
                        "ID": "__OpenWireRootUnit__.CompareValue1.InputPin"
                      },
                      {
                        "ID": "__OpenWireRootUnit__.CompareValue2.InputPin"
                      },
                      {
                        "Name": "__OpenWireRootUnit__.DisplayOLED1.Elements.Text Field1.InputPin",
                        "ID": "__OpenWireRootUnit__.DisplayOLED1.Elements._Item0.InputPin"
                      }
                    ]
                  },
                  "+": "TArduinoCombinedAnalogDigitalChannel"
                },
                {
                  "+": "TArduinoCombinedAnalogDigitalChannel"
                },
                {
                  "+": "TArduinoCombinedAnalogDigitalChannel"
                },
                {
                  "+": "TArduinoCombinedAnalogDigitalChannel"
                },
                {
                  "+": "TArduinoCombinedAnalogDigitalI2C0Channel"
                },
                {
                  "+": "TArduinoCombinedAnalogDigitalI2C0Channel"
                }
              ]
            },
            "SPIChannels": {
              "*": [
                {
                  "+": "TArduinoSPI"
                }
              ]
            },
            "BoardType": "Arduino Uno"
          },
          "Type": "Component",
          "Y": 256
        },
        {
          "X": 256,
          "Name": "DisplayOLED1",
          "Instance": {
            "Elements": {
              "*": [
                {
                  "Name": "Text Field1",
                  "InputPin": {
                    "SourcePin": {
                      "Name": "__OpenWireRootUnit__.Arduino.Digital.Digital[ 14 ]\/AnalogIn[ 0 ].OutputPin",
                      "ID": "__OpenWireRootUnit__.Arduino.Digital._Item14.OutputPin"
                    }
                  },
                  "+": "TArduinoMonochromeGraphicsElementTextFeld",
                  "Size": 3,
                  "Y": 40
                }
              ]
            },
            "OutputPin": {
              "SinkPins": [
                {
                  "Name": "__OpenWireRootUnit__.Arduino.I2CChannels.I2C.InputPin",
                  "ID": "__OpenWireRootUnit__.Arduino.I2CChannels._Item0.InputPin"
                }
              ]
            },
            "+": "TArduinoDisplaySSD1306I2C"
          },
          "Type": "Component",
          "Y": 624
        },
        {
          "X": 784,
          "Name": "CompareValue1",
          "Instance": {
            "Value": 0.100000001490116,
            "OutputPin": {
              "SinkPins": [
                {
                  "Name": "__OpenWireRootUnit__.Arduino.Digital.Digital[ 8 ].DigitalInputPin",
                  "ID": "__OpenWireRootUnit__.Arduino.Digital._Item8.DigitalInputPin"
                }
              ]
            },
            "+": "TArduinoCompareValue",
            "InputPin": {
              "SourcePin": {
                "Name": "__OpenWireRootUnit__.Arduino.Digital.Digital[ 14 ]\/AnalogIn[ 0 ].OutputPin",
                "ID": "__OpenWireRootUnit__.Arduino.Digital._Item14.OutputPin"
              }
            },
            "CompareType": "ctSmallerOrEqual"
          },
          "Type": "Component",
          "Y": 688
        },
        {
          "X": 784,
          "Name": "CompareValue2",
          "Instance": {
            "Value": 0.100000001490116,
            "OutputPin": {
              "SinkPins": [
                {
                  "Name": "__OpenWireRootUnit__.Arduino.Digital.Digital[ 7 ].DigitalInputPin",
                  "ID": "__OpenWireRootUnit__.Arduino.Digital._Item7.DigitalInputPin"
                }
              ]
            },
            "+": "TArduinoCompareValue",
            "InputPin": {
              "SourcePin": {
                "Name": "__OpenWireRootUnit__.Arduino.Digital.Digital[ 14 ]\/AnalogIn[ 0 ].OutputPin",
                "ID": "__OpenWireRootUnit__.Arduino.Digital._Item14.OutputPin"
              }
            },
            "CompareType": "ctBigger"
          },
          "Type": "Component",
          "Y": 784
        }
      ],
      "Type": "Diagram",
      "Selection": [
        "CompareValue1"
      ]
    }
  ],
  "Content": "OpenWire Diagram"
}

Credits

ronfrtek

ronfrtek

27 projects • 7 followers
Arduino Fan!

Comments