Toll-Free Customer Support 24/7

Flex sensor 2.2"

/*
* Project name:
FLEX Sensor
* Copyright
(c) Researchdesignlab.com
* Description:

* Test configuration:
MCU: ATMEGA328
Dev.Board: Arduino uno
Oscillator: 16 MHz
Software: Arduino

*/


#include <LiquidCrystal.h> // initialize the library with the numbers of the
int sensorPin = A0; // select the input pin for the flex sensor
LiquidCrystal lcd(6, 7, 2, 3, 4, 5);

/*
* LCD RS pin to digital pin 6
* LCD Enable pin to digital pin 7
* LCD D4 pin to digital pin 2
* LCD D5 pin to digital pin 3
* LCD D6 pin to digital pin 4
* LCD D7 pin to digital pin 5
* LCD R/W pin to ground */

 

void setup()
{

lcd.begin(16, 2); // set up the LCD's number of columns and rows:

}

void loop()
{

lcd.print(analogRead(sensorPin));

}

 

Back to top