Reading PWM values

Recently i have been trying to read PWM values using an Arduino UNO for a project, All i need is a way to tell multiple PWM values apart, like 10, 30, 60, 90, 100. Im not very good at programing so i was wondering if someone can help me get started with this program.

Thanks!

Where are these coming from? Is it an external source. If you know the base frequency you cal always use the pulse in function.

The signal is coming from an external NI cRIO-FRC II processor.

I have no idea what that collection of numbers mean. The PWM values of 0 to 255 only mean something if you have 8 bit PWM.

The PWM signal im trying to read is a standard 8-bit pwm signal.

Got Somthing to work with the pulseIn function!

int pin = 3;
unsigned long duration;
#include <Servo.h>
Servo servo;
void setup()
{
  Serial.begin(9600);
  servo.attach(5);
  
  pinMode(pin, INPUT);
  servo.write(100);
}

void loop()
{
  duration = pulseIn(pin, HIGH);
  servo.write(100);
  Serial.print(duration);
  delay(1000);
}

Thanks for telling my about the PulseIn function!