Offline
Newbie
Karma: 0
Posts: 6
|
 |
« Reply #30 on: August 10, 2012, 12:37:18 am » |
Hi there,
Would you mind sharing exactly how you got spi to work? I'm trying to do something similar (ATtiny84 with RF24 library), and I modified both libraries so that my program would compile but it is still not working. I am not getting a clock signal at the SCK pin so I suspect I am referring to the pins incorrectly in the modified SPI library.
Thanks!
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Edison Member
Karma: 3
Posts: 1712
|
 |
« Reply #31 on: August 10, 2012, 12:57:57 am » |
Here's the modified libraries, both the modified spi and the mirf modified to use the new spi If you want to reuse the pins from spi you should be able to call spi85.end but I haven't tested that yet Note that the mosi miso are opposite for the attiny85 so the mosi pin is being used as miso and vice versa, that's just the way the USI hardware is this should also work with the attiny84 although that too I didn't test yet
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 6
|
 |
« Reply #32 on: August 10, 2012, 02:13:21 pm » |
Thanks for the reply, although I might be missing something as I don't see any download links?
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Edison Member
Karma: 3
Posts: 1712
|
 |
« Reply #33 on: August 10, 2012, 02:44:42 pm » |
Guess my phone didn't upload it right, ill try again i may have to get a different browser on my phone
|
|
|
|
« Last Edit: August 10, 2012, 03:00:52 pm by winner10920 »
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 6
|
 |
« Reply #34 on: August 10, 2012, 04:00:00 pm » |
Thank you very much, I'm gonna try and play around with it later today
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 6
|
 |
« Reply #35 on: August 11, 2012, 02:50:11 am » |
Just wanted to thank you again, your modified library worked like a charm with the 84, And everything is working beautifully!
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Edison Member
Karma: 3
Posts: 1712
|
 |
« Reply #36 on: August 11, 2012, 06:06:00 am » |
Awesome, wasn't sure if it was going to, I was planning on getting an 84 eventually so i coded for it glad i could help : )
|
|
|
|
|
Logged
|
|
|
|
|
Canada
Offline
Newbie
Karma: 0
Posts: 34
Go Banana!
|
 |
« Reply #37 on: December 04, 2012, 09:06:51 pm » |
Just wanted to thank you again, your modified library worked like a charm with the 84, And everything is working beautifully!
Could you post some sample code? I'm trying to use the ping_client and ping_server examples. I've got an ATtiny84 running the ping_client (modified to use the libraries provided by winner10920) and I've got an Arduino Uno using the ping_server example but just the stock example, not modified at all. The ATtiny sends the packets, but the Uno doesn't receive them.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 6
|
 |
« Reply #38 on: December 05, 2012, 02:59:59 pm » |
Hey there,
First off, how do you know the 84 is sending? I would check to see that MISO and MOSI are connected properly (they are opposite on the 84, kinda confusing).
Also, I would make sure one of the devices has the "role pin" set to ground (I think that's how it worked?).
Let me know if you still can't get it to work, I can try to dig up some code
|
|
|
|
|
Logged
|
|
|
|
|
Canada
Offline
Newbie
Karma: 0
Posts: 34
Go Banana!
|
 |
« Reply #39 on: December 05, 2012, 06:42:58 pm » |
I double checked my connections and it turns out that I didn't have the MISO and MOSI reversed on the UNO. I had them reversed on the ATtiny, but not the UNO.
Of course, I shouldn't have had them reversed on the ATtiny because the library reverses the mappings already. Whoops.
What did you mean by the role pin though?
|
|
|
|
« Last Edit: December 05, 2012, 07:38:21 pm by skootles »
|
Logged
|
|
|
|
|
nr Bundaberg, Australia
Offline
Tesla Member
Karma: 71
Posts: 6815
Scattered showers my arse -- Noah, 2348BC.
|
 |
« Reply #40 on: December 05, 2012, 06:53:54 pm » |
I had them reversed on the ATtiny, but not the UNO. Semantics  ______ Rob
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 6
|
 |
« Reply #41 on: December 05, 2012, 08:34:02 pm » |
I double checked my connections and it turns out that I didn't have the MISO and MOSI reversed on the UNO. I had them reversed on the ATtiny, but not the UNO.
Of course, I shouldn't have had them reversed on the ATtiny because the library reverses the mappings already. Whoops.
What did you mean by the role pin though?
Glad you fixed that Just looking at the standard ping example at http://maniacbug.github.com/RF24/pingpair_8pde-example.html If you read the comments there is a section that describes how you set the "role" of the transmitter, and you should have one of each role so that you have back-and-forth communication.
|
|
|
|
|
Logged
|
|
|
|
|
Canada
Offline
Newbie
Karma: 0
Posts: 34
Go Banana!
|
 |
« Reply #42 on: December 05, 2012, 09:38:15 pm » |
I wasn't using the RF24 examples, I was using the MIRF examples which don't use the role pin.
Also, it appears I spoke too soon. The UNO was reporting that it was getting packets even though none were being sent. I'll take another crack at it tomorrow when I'm more rested, but if you've got any example that you know works, that'd be helpful.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Edison Member
Karma: 3
Posts: 1712
|
 |
« Reply #43 on: December 05, 2012, 10:43:18 pm » |
If you wanna look at my programs, it may not be that well explained since it wasn't designd as an example, but maybe it'll help u figure it out Ps. Not sure about the ds18b20 code, that was a work in progress however the part in setup I know worked and I received it using an uno and the nrf24l01
|
|
|
|
|
Logged
|
|
|
|
|
Canada
Offline
Newbie
Karma: 0
Posts: 34
Go Banana!
|
 |
« Reply #44 on: December 06, 2012, 07:11:30 pm » |
That's fine if there isn't documentation, I'm sure I can decipher it. I'd just like to get an example working. Pin mappings might be nice too... I'm sure I've got everything wired correctly but you never know.
|
|
|
|
|
Logged
|
|
|
|
|
|