Notifications
Clear all

Connecting multiple SPI Devices (nRF24L01 and 1.5in color OLED)

23 Posts
4 Users
10 Likes
2,359 Views
noweare
(@noweare)
Member
Joined: 4 years ago
Posts: 110
 

You don't have to redraw the circle in the loop ?


   
ReplyQuote
frogandtoad
(@frogandtoad)
Member
Joined: 5 years ago
Posts: 1458
 

@noweare

Posted by: @noweare

You don't have to redraw the circle in the loop ?

Nope... it stays there until you redraw over it.


   
ReplyQuote
noweare
(@noweare)
Member
Joined: 4 years ago
Posts: 110
 

I think the problem the OP is having is drawing something after initializing the radio.


   
ReplyQuote
frogandtoad
(@frogandtoad)
Member
Joined: 5 years ago
Posts: 1458
 
Posted by: @noweare

I think the problem the OP is having is drawing something after initializing the radio.

Yes, that seems to be the problem I tried to replicate, but it is working for me as per my example.  All I can think of at the moment, is that he needs to ensure pins 11, 12 and 13 are used for the nRF24L01 for the Uno.

It also looks like the libraries are capable of handling the high to low chip selection details, as you'll notice I didn't have to manipulate those states manually.


   
ReplyQuote
noweare
(@noweare)
Member
Joined: 4 years ago
Posts: 110
 

@frogandtoad What happens if you draw a circle while inside loop().


   
ReplyQuote
(@leonardo1123)
Tinkerer
Joined: 3 years ago
Posts: 56
Topic starter  

So sorry I missed this! I will absolutely give this a chance as soon as I can and get back to you with how it went: for the moment I added another Arduino as an I2C slave and had it work with the screen on its own... not a permanent solution, so I'm glad you replied!

Currently, I am soldering some Nanos in preparation for trying out the new LiPo battery I got and hopefully giving JoeBot (or LeoBot, as per my handle) its first treads-down test-drive! Wish me luck, and thanks again!

Fortune Favors the Bold


   
ReplyQuote
frogandtoad
(@frogandtoad)
Member
Joined: 5 years ago
Posts: 1458
 

@noweare

Posted by: @noweare

@frogandtoad What happens if you draw a circle while inside loop().

I just tested your suggestion, and it still works just fine... all I did was add the following line of code, to the code I presented previously:

void loop()
 {
  if(radio.available()) {
      radio.read(&data, sizeof(data));
      Serial.println(data);
   }

  TFTscreen.fillCircle(64, 64, 30, ST7735_GREEN); // Added for new test
 }

...now the display shows a GREEN circle in the centre of the display, and the "Hello World!" text is still coming through the serial communications channel, to the receiver unhindered.

Cheers.


   
noweare reacted
ReplyQuote
noweare
(@noweare)
Member
Joined: 4 years ago
Posts: 110
 

Thanks for doing that. I would have but I don't have a tft display on hand.


   
frogandtoad reacted
ReplyQuote
Page 2 / 2