stianeikeland / go-rpio

:electric_plug: Raspberry Pi GPIO library for go-lang
MIT License
2.16k stars 221 forks source link

How can I use this package to send GPRS data over serial port on Arduino? #51

Open cyantarek opened 4 years ago

cyantarek commented 4 years ago

Hi,

Now I know how to use this package for pin based communication. But I want to know, how can I use serial ports (like GPRS/GSM Module) to send data from Arduino?

Thanks in advance.

drahoslove commented 4 years ago

Hi, I don't think you can do that right now. You'd have to implement a custom driver for serial communication.

But I don't think that is necessary, you can use some of the existing go serial packages which are using a file-based approach which is already part of the Linux kernel.

The go example on this page https://github.com/opentrv/OTWiki/wiki/RaspberryPi-Serial might be what you want (it uses https://github.com/tarm/serial but you might find some other package which might suit you better).