-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does the library work with Digispark? #226
Comments
Your digistump installation is broken. The SPI library is broken it seems You also have duplicate installation of RF24. Delete |
Thanks for your quick reply. I can get the errors down to the following (I have done a fresh install of Arduino IDE 1.6.7 and removed most of the digispark-added libraries), but it still looks like the
If I add the following to #define __AVR_ATtiny85__ then the sketch compiles. But this doesn't feel right to me. I feel like this ought to be picked up automatically at compile time based on my chosen board (Digispark). Apologies if this isn't very clear, I'm very new to Arduino/Digispark. |
The boards do not identify themselves right. It's digispark dev's fault (or just a weird design feature). I'll try to create a version of RF24 for you to test. The digispark devs have created bunch of clones of popular libraries to support digispark even of RF24 that's why you had the duplicate. You're also using the digispark IDE I assume? You can use this instruction to use standard proper Arduino IDE that is updated http://www.visualmicro.com/forums/YaBB.pl?num=1416119668/4 reply number (#)9. |
Try this https://github.com/Avamander/RF24/archive/master.zip, does it compile without any modification? |
Same error I'm afraid. I'm using the standard Adruino IDE (v1.6.7) with these instructions for adding Digispark support - https://digistump.com/wiki/digispark/tutorials/connecting. Basically you add http://digistump.com/package_digistump_index.json as an |
Digispark doesn't contain a valid SPI implementation as ATTiny85 doesn't embedd SPI interface; it embedds USI instead. Including SPI into your project will not work. There is Atmel's application note on how to implement SPI over USI. |
The library would work if I'd know the board tag (as it does not identify |
I've tried searching for 'digis' (case insensitive, to try and find any references to digispark/digistump) in various files/folders with no real success. In what files do existing boards/chipsets do their 'platform |
https://github.com/Avamander/RF24/archive/master.zip does it work now? |
I don't know how did you managed to compile it. It doesn't compile for me even if I include the
in the RF24_config.h I'm using Eclipse C++ with this arduino-eclipse-plugin which binds to arduino IDE 1.6.5. Digispark does define the AVR_ATtiny85 and the correct files are included: In these file there is no definitions of standard SPI registers (like DORD for example) as AtTiny85 doesn't have a hardware SPI; it has USI instead. I think it will not work even if you get the code compiled: the SPI registers will be mapped to some memory addresses that will probably make no sense for AtTiny85 and the compiled program may not work. Digispark SPI implementation have almost the same files as generic Arduino library. I do not know why Digispark included a library that will not work :) What you need is - I think - an SPI implementation over USI hardware interface. Take a look at Atmel's AVR319. You can check out these projects: The best solution would be to port SPI over USI implementation into Digispark's SPI library so it would be compatible with standard Arduino API. I was interested in running RF24 in Digispark so I have made some investigations in that. I do not have the Digispark boards yet - I'm still waiting for the shipment :) |
RF24 definetly has ATTiny85 support it's just the digispark boards have been configured for the IDE so that the compiler preprocessor doesn't use the right Until that (is asked from digispark) use https://github.com/TMRh20/RF24/ latest release and add |
@Avamander, now I know. My Eclipse took the RF24 library from Digispark distribution instead of TMRh20's. I have throw away that Digispark's RF24 library and used the correct one :) Now I managed to compile it; it compile however in Eclipse I don't have to define AVR_ATtiny85. There is SPI implementation at the end of RF24.cpp file (TMRh20's); this implementation uses the USI interface which is embedded in ATTiny85. @Avamander - thanks for clarifications. |
additionally to deleting the RF24 libary from the digispark subfolder I had to copy the spi.h from RF24/utility/ATTiny to /RF24 . I also renamed it to SPI.h but I don't know if it did anything. This thread helped me a lot! Also it was the only source I found for my problem, so I guess this is reference now. |
Please don't replace the SPI library, use the #define instead to ensure hassle free compatibility. |
@Avamander I didn't replace anything. |
Hi, I get compilation errors when I select a Digispark board from Arduino IDE (v1.6.7) and try to compile
rf24ping85
. Is the Digispark supported? It is based on the Attiny85 so I hoped it would be.I am trying to follow the 3-pin approach.
I set the CE and CS pins to be equal, as mentioned in this comment.
This is the compilation output. From what very little I know, my guess is the Digispark is not treated like a regular Attiny85.
Thanks.
The text was updated successfully, but these errors were encountered: