Search code examples
timingwaveformraspberry-pi-zero

Waveforms on the raspberry pi using C#


I am about to start work on a raspberry pi project, and I am planning on building my application using Mono and C#.

I see the library called "RaspberryIO" which can be found here. This seems to have the basic GPIO functions, and has (the option of) pigpio as the control library.

My project requires fast pulsing of the control wires on a stepper driver, but I already know of the difficulty of getting decent sub-millisecond timing with an underlying operating system.

The solution to this problem is of course wave chains, which use the hardware on the board to pull off a trick that produces accurate timing. Unfortunately, I am not seeing any extension in RaspberryIO for it.

I want to know if there is a library that supports wave chaining outright, OR if there is a way to pull this off by calling a command line utility or some other solution (I am not sure what DMA really entails in this case. I am not familiar with it at all.) that can be used from Mono or a .NET application in order to get short, pulsed output like this.


Solution

  • It seems the Unosquare folks already had a library here, known as pigpio-dotnet, for directly using pigpio. This provides access to the functions I need, but wont be abstracted and have as pretty code as RaspberryIO would have.