Odroid c1 as getaway?
-
@marceloaqno , as you are who made the orange pi how-to, and the code adaptation for spidev, maybe you can tell me if I'm on the right way
-
@marceloaqno , as you are who made the orange pi how-to, and the code adaptation for spidev, maybe you can tell me if I'm on the right way
@dantefff Nice. Let me know when your module arrives, and you start testing with it.
-
@dantefff Nice. Let me know when your module arrives, and you start testing with it.
@marceloaqno As expected, once receibed my nrf24, this does not work :-(
Any options to debug this in an easy way?
The nrf24 is working in a rpi1 so nrf24 is ok. -
@marceloaqno As expected, once receibed my nrf24, this does not work :-(
Any options to debug this in an easy way?
The nrf24 is working in a rpi1 so nrf24 is ok. -
@dantefff are you sure the pin numbers are correct? can you connect a LED and test if it's the right numbers?
-
Yes, an LED with a resistor. Then try to turn it on and off. But maybe that is not even necessary.
Besides, the pin numbers you mentioned seem quite odd, but I do not have experience with the C1.
Considering this image", your nrf24 has to be connected to header pins 19,21,23,1 for MOSI,MISO,SCK,3V3 and any GND one. Since you connected the two remaining ones on 100 and 101, try first to modify your configure to./configure --spi-spidev-device=/dev/spidev0.0 \ --my-transport=nrf24 --my-rf24-ce-pin=22 --my-rf24-cs-pin=21Which are the WiringPi pin numbers.
let me know if it works.
-
I don't know. Looked at the code, these are my conclusions:
RF24.cpp
LOCAL void RF24_csn(const bool level) { hwDigitalWrite(MY_RF24_CS_PIN, level); } LOCAL void RF24_ce(const bool level) { hwDigitalWrite(MY_RF24_CE_PIN, level); }MY_RF24_CS_PIN and MY_RF24_CE_PIN are supposedly set by ./configure
hwDigitalWrite leads to MyHwLinuxGeneric.cpp
void hwDigitalWrite(uint8_t pin, uint8_t value) { digitalWrite(pin, value); }which leads to GPIO.cpp
void GPIO::digitalWrite(uint8_t pin, uint8_t value) { FILE *f; char file[128]; if (pin > lastPinNum) { return; } if (0 == exportedPins[pin]) { pinMode(pin, OUTPUT); } sprintf(file, "/sys/class/gpio/gpio%d/value", pin); f = fopen(file, "w"); if (value == 0) { fprintf(f, "0\n"); } else { fprintf(f, "1\n"); } fclose(f); }As you can see, the pin numbers you chose have to coincide with the "file" mentioned here:
sprintf(file, "/sys/class/gpio/gpio%d/value", pin);If you're not sure, the already mentioned LED test can help by switching on/off the concerned "files".
-
Ok. It was as I expected. The pin numbers are right (export number is the one I need to use). I'll try the led in a feew minutes, but I have tested to get the value of that pins and it seems they are the correct ones. Maybe the error was to not especify pullup or pulldown value on the exported pins
-
Yes, SPI pins should not light. I am at the end of my knowledge here, sorry. Next step would be connecting an oscilloscope to see it anything omes out the SPI interface and the selected pins.