Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // C++ code
- // Dr. Aung Win Htut
- void setup()
- {
- pinMode(A0, INPUT);
- pinMode(2,OUTPUT);
- pinMode(3,OUTPUT);
- Serial.begin(9600);
- }
- void loop()
- {
- digitalWrite(2,HIGH);
- digitalWrite(3,LOW);
- int sensor = analogRead(A0);
- Serial.print("Force Sensor Input Reading is : ");
- Serial.println(sensor);
- sensor=0;
- delay(1000);
- digitalWrite(3,HIGH);
- digitalWrite(2,LOW);
- sensor = analogRead(A0);
- Serial.print("Flex Sensor Input Reading is : ");
- Serial.println(sensor);
- sensor=0;
- delay(1000);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement