I want to WRITE a Pulse Position Modulation (PPM) to an arduino from a raspberrypi. Is the board capable to do this and if so, from which port/pin?

A pulse position modulation is a signal that consists of a priod of silence (sync reset) and alternating pulses separated by periods of constant silence.

Here's an example


As per the suggestions down below in the comments:
- Channel max pulse width: 2000us - Channel min pulse width: 1000us - A constant number of 8 channels - Frame rate: One frame every 10 milliseconds

The information is read from a server via C sockets (in a client-server application)

I receive the message from the server and after being decoded we are left with:


This will be broken up into chunks and assigned to variables. A function uses these variables to create the signal and send it via GPIO.


Could you point me to what C library I could use to do this or point me to further reading on this subject?

Apparently @joan has a library on this. I read the specification on this site, but unfortunately I don't know python and I don't know where to start with C. I see the C examples on PPM are missing. I am happy to share my code with the owner of the site if someone could guide me on it afterwards.

  • What sort of PPM? Like that used by hobby radio controllers? Can you edit your question to give the salient characteristics of the type of signal you want to generate.
    – joan
    Oct 26 '19 at 22:07
  • Exactly. Update posted.
    – bem22
    Oct 27 '19 at 1:09
  • You might like to read my answer to the following PPM question and see if it is helpful. I am happy to give a more detailed answer tailored to your specific requirement: raspberrypi.stackexchange.com/questions/104408/…. Cheers.
    – tlfong01
    Oct 27 '19 at 2:05
  • That's a really sophisticated answer. Indeed. I want to do what you achieved in channel 1. I would like to create a pulse train that is read by arduino in INT0 (interrupt routine). Is there way to generate this in C/Cpp on rpi? I need to integrate it with other things and it would be neat
    – bem22
    Oct 27 '19 at 8:37
  • 1
    It would be helpful if you included the diagram and explanatory text in your question. That would allow your question to stand alone. You have given some indication of the expected outputs. You have made no mention of the expected inputs. The Pi can easily perform this task (I have a Python program to generate PPM). However the question is still too vague to warrant an answer.
    – joan
    Oct 27 '19 at 10:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.