I found the tutorials referred above are much out of date. (5) Now I am following the BlueJ and Pi4J tutorials (Refs 8 ~ 14) to do my newbie Java GPIO and SPI programming exercises. If still no luck I will give up SPI for now and try to do the easier Ri4J GPIO, testing GPIO read/write of the nRF24L01+’s Reset pin and Interrupt pin. If no luck, I will fall back to do SPI loopback test, to check if I need to adjust the SPI speed to a lower value, say from 5MHz to 1MHz. (4) I think I can first try to use Pi4J to read the nRF2410+’s config register at address 0x00, hopefully getting the POR (Power On Reset) value of 0x00. So I guess I should jump start to Pi4J and see if I can just use it to read nRF24L01’s config register, which is what I wanted to do in the very beginning. (3) I also found that Pi4J libraries include SPI. (2) Next step is to study existing nRF24L01+ Python/Java libraries and see how to expand the libraries with more features. (1) After googling a bit, I have decided to start with Rpi BlueJ Java IDE, and the first Java programs will be on: ( a ) GPIO LED / Button programming, ( b ) SPI programming. ![]() I would appreciate a little input, since I am really lost regarding this right now. I also checked my wiring multiple times and I’m confident that its correct. Is it possible that this is due to a SPI related problem, like me forgetting to setup something? I did enable the SPI interface and validated it multiple times and also tested it. Unfortunately I have no idea why that happens. The problem is that the two while loops inside the outer while loop are never entered and therefore the exit-condition cannot occur turning this into an endless while loop. The function is the following: void bcm2835_spi_transfernb ( char * tbuf, char * rbuf, uint32_t len ) I digged a little bit into the code and found out that the reason it hangs is due to an endless while loop inside the bcm2835_spi_transfernb() function of this file. When I try to run the provided example code the Raspberry Pi just hangs and the CPU rises to 100% after (or rather while) running rf24.begin(). ![]() I found this library that makes use of the JNI, but I can’t get it to work. I’m currently trying to make a NRF24L01 module work by using Java.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |