PWM Over Ethernet

Hello,

I need to write a program that receives PWM (5 to 10 Hz) via Ethernet from another computer and then depending on the frequency, illuminate a sequence of LEDs. What I mainly do not understand is the PWM over Ethernet part. What will the PWM data being transferred look like? To anyone who has done this before or is knowledgeable with ethernet communication, I'd be very grateful if you could help me out.

Thanks

Not knowledgeable in that area, but couldn't you just normalise your PWM range, store it as a float, and send that as a packet? Or even just send the packet when the PWM frequency actually changes. Then use that data to send your PWM signal to the LEDs as you get the packets?

What I mainly do not understand is the PWM over Ethernet part.

Maybe because you kind of made that concept up. Typically the representation of a numeric value is sent, then that representation would be converted into a numeric number for use by code on the receiving end.

To amplify what @zoomkat has said ...

You use PWM on your Arduino with analogWrite(pin, pwmVal); where pwmVal is a number from 0 to 255 representing the duty cycle.

All you need to do is send the number pwmVal from the other computer.

...R

Thank you Zoomkat and Robin. That makes sense. Yeah the constraints sent to me were a bit confusing, which is what lead to my misconception.

Edit: My application works. Thanks again!