RFP602 pressure sensor with Arduino
FunduinoPublished on
Mit einem Folien-Drucksensor Krafteinwirkung bis 500 Gramm erfassen
You need this
Membrane pressure sensor - weight measurement 0-0.5 kg, analog
5,47 € *Item no. F23106985About the product — Membrane pressure sensor - weight measurement 0-0.5 kg, analog
Funduino UNO R3 Microcontroller - ATmega328P, 16 MHz, for Arduino
11,12 € *Item no. F23107480About the product — Funduino UNO R3 Microcontroller - ATmega328P, 16 MHz, for Arduino
Breadboard Cables Male-to-Male - 40 Pieces, 20 cm
1,74 € *Item no. FUN-1010558About the product — Breadboard Cables Male-to-Male - 40 Pieces, 20 cm
All 3 parts together 18,33 € *Ready to ship immediately · Delivery time: 1-3 business days
* All prices include statutory VAT, plus shipping costs.
Material
What the sensor measures
Structure
Source code
Sketch: Output applied force in grams
int Sensorpin = A0; // Legt fest, an welchem analogen Pin der Sensorwert ausgelesen wird
void setup() {
Serial.begin(9600); // Festlegung der Baudrate
}
void loop() {
int Sensorwert = analogRead(Sensorpin); // Auslesen des Sensorwertes (zwischen 0 und 1023)
// Mappen des Wertes vom Sensor (0..1023) auf den Messbereich (0 g .. 500 g)
int Krafteinwirkung = map(Sensorwert, 0, 1023, 0, 500);
Serial.print("Die Krafteinwirkung betraegt: ");
Serial.print(Krafteinwirkung); // Ausgabe des Wertes im Seriellen Monitor
Serial.println(" Gramm");
delay(500); // 500 ms Pause, bevor der Loop erneut durchlaufen wird
}Rate the instructions