#include int pin = 4; //A4 in arduino // Define variables and their initial values int analogValue; int offset = 94; int maxValue = 922; float pressure; int main() { // Initialize Serial communication // TODO: Implement Serial communication setup while (1) { // Read analog value from sensor analogValue = analogRead(pin); // Calculate pressure pressure = (analogValue - offset) * 12.0 / (maxValue - offset); // Print pressure value in bar to screen printf("Pritisak je = %.2f bar\n", pressure); // Delay for 2 seconds sleep(2000); } return 0; }