FOB Price
Get Latest Price|
- Minimum Order
Country:
India
Model No:
-
FOB Price:
Place of Origin:
-
Price for Minimum Order:
-
Minimum Order Quantity:
-
Packaging Detail:
-
Delivery Time:
-
Supplying Ability:
-
Payment Type:
-
Product Group :
-
India
Contact Person Tom
Ahmedabad, Gujarat
A simple flex sensor 2.2" in length. As the sensor is flexed, the resistance across the sensor increases.The resistance of the flex sensor changes when the metal pads are on the outside of the bend (text on the inside of bend). The connector is 0.1" spaced and breadboard friendly.
These 2.2" Flex Sensors can be easily integrated to an Arduino or Raspberry Pi by making a voltage divider circuit using a *0 K Ohm resistor at any one lead of the sensor.
Use the following Code to integrate a Flex Sensor with an Arduino
Arduino Code
/* How to use a flex sensor/resistor - Arduino Tutorial
Fade an LED
with a flex sensor
*/
//Constants:
const int ledPin = 3; //pin 3 has PWM funtion
const int flexPin = A0; //pin A0 to read analog
//Variables:
int value; //save analog value
void setup()
{
pinMode(ledPin, OUTPUT); //Set pin 3 as 'output'
Serial.begin(***0); //Begin serial communication
}
void loop(){
value = analogRead(flexPin); //Read and save analog value from
potentiometer
Serial.println(value); //Print value
value = map(value, **0, **0, 0, **5);//Map value *****3 to ****5
(PWM)
analogWrite(ledPin, value); //Send PWM value to led
delay(**0); //Small delay
}
Country: | India |
Model No: | - |
FOB Price: | Get Latest Price |
Place of Origin: | - |
Price for Minimum Order: | - |
Minimum Order Quantity: | - |
Packaging Detail: | - |
Delivery Time: | - |
Supplying Ability: | - |
Payment Type: | - |
Product Group : | - |