Open bonedaddy opened 4 years ago
Small update that I forgot to post yesterday, the manufacturer of the board I'm using (dragino LoRa/GPS HAT), has this diagram http://wiki.dragino.com/images/9/9b/RPi_GPIO.jpg.
So based off the pinouts that the C code is using, the translation to BCM numbers should be:
int ssPin = 25;
int dio0 = 4;
int RST = 17;
But unfortunately go-rpio
still didn't work
You are right, you have to use the BCM
pin numbering. If it does not work, the issue is probably somewhere else.
I am sorry I think I am not able to help you.
I noticed some differences between the main.c and your lora.go:
https://github.com/RTradeLtd/rpi-lora-tranceiver/blob/master/src/lora.go#L46 . - you are using RST
here instead of ssPin
https://github.com/RTradeLtd/rpi-lora-tranceiver/blob/master/src/lora.go#L65 - this should be input
https://github.com/RTradeLtd/rpi-lora-tranceiver/blob/master/src/lora.go#L22 - this should be 17 not 7
Some ideas:
SpiChipSelectPolarity
and/or SpiMode
Hello, thanks for taking the time to look at the code in detail like that.
I will try your suggestions and hopefully they work!
I'm currently trying to write a golang equivalent of this Raspberry Pi LoRa hot module, which uses wiringPi pniouts.
I've tried the wiringPi pin out numbers in this golang library using
go-rpio
and I'm unable to get it to work properly, and it fails with aunrecognized traceiver
error.It should be noted that running the provided dragino examples works, so it can definitely work from this library, it's just a matter of figuring out the pin differences
System Info
Model: Raspberry Pi 3B+