Reading a map sensor

Hello, i'm new in arduino.. i'm trying to read a map sensor and modify the result in another port (to send the information to ECU).. i wont find content related to this.. i made a little code to read voltage in A0 port and send for a led but not work too..

I dont know how to do it (Arduino uno)..

I tryed to make this to test.. but not working too

int potPin = A0;    // select the input pin for the potentiometer
int ledPin = A1;   // select the pin for the LED
int val = 0;       // variable to store the value coming from the sensor

void setup() {
  pinMode(ledPin, OUTPUT);  // declare the ledPin as an OUTPUT
}

void loop() {
  val = map(analogRead(potPin), 0, 1023, 0, 255);    // read the value from the sensor
  digitalWrite(ledPin, HIGH);  // turn the ledPin on
  delay(val);                  // stop the program for some time
  digitalWrite(ledPin, LOW);   // turn the ledPin off
  delay(val);                  // stop the program for some time
}

Any ideas?

My intention is to read RPM and MAP sensor to manipulate and send the result to another port..

What is a MAP sensor? You'll need to post links to data sheets for the sensors.

its an intake manifold pressure bosh 9639381480.. i did not find the datasheet

Why are you mapping the analogue reading to 0-255?

How are you changing the pressure to test the sensor output?

Do you have a serial connection available? It might be easier to output the number to that rather than using it to blink an LED. Or better yet, just connect a multimeter to the sensor output. That way you can see if the output is in the range that you think it should be.

its an intake manifold pressure bosh 9639381480.. i did not find the datasheet

Without a data sheet, how do you plan to read it and make sense of the readings?

I have 3 wires on map, GND, 12v and data (data send to ECU 0v to 5v to reading pressure), i need to read and change this value (example; i read the result 2.5, update this value to 90% of original and send it to another pin)

the other pin sends 2.25v to ECU..

I dont have serial connection..

the other pin sends 2.25v to ECU..

The standard Arduino does not have an analog output, so to do this accurately you will need a DAC (digital to analog converter).

Can i use an pwm output to make this instead use a DAC?

Yes, run the PWM thru a RC low-pass filter, like 10K and 4.7uF cap.
If your ECU needs more current on it’s input, use a smaller resistor and adjust the cap.

Here’s a bunch of levels with PWM output changing in steps of 25 with the above filter (and very little ‘load’):