I am starting to use the NRF24... modules I got with the espruino and the master/slave example that I found in the code examples worked really great initially. I then modified the example of the master slightly:
It sends the counter variable to the slave, then prints the response. So ideally it will print the increasing numbers.
Two observations:
when starting up, and once also just in the middle of runing the master code, I see
TX not received 30
TX not received 30
==@
==
==!B
==A
==8
==9
==
==15
I sometimes get an empty response - the output from teh print is just == in this case. That seems simple to check against, just wondering what the issue is and if it could be fixed.
after running this counter till around 600, I disconnected. then connected again and got a massive out of memory error. is this because of the print statement which might queue the output?
All output is below:
ERROR: Out of Memory!
WARNING: Out of memory while appending to array
INTERNAL ERROR: Timeout on SPI TX
ERROR: Out of Memory!
WARNING: Out of memory while appending to array
INTERNAL ERROR: Timeout on SPI TX
ERROR: Out of Memory!
WARNING: Out of memory while appending to array
INTERNAL ERROR: Timeout on SPI TX
ERROR: Out of Memory!
WARNING: Out of memory while appending to array
INTERNAL ERROR: Timeout on SPI TX
INTERNAL ERROR: Timeout on SPI RX
ERROR: Out of Memory!
WARNING: Out of memory while appending to array
INTERNAL ERROR: Timeout on SPI TX
INTERNAL ERROR: Timeout on SPI RX
ERROR: Out of Memory!
WARNING: Out of memory while appending to array
at line 1 col 144
{this.setReg(7,48);digitalWrite(this.CE,0);this.setReg(0,10);this.spi.send(225,this.CSN);a=a.clone();a.splice(0,0,160);this.spi.send(a,this.CSN);digitalWrite(this.CE,1);for(a=1E3;a--&&!(this.getReg(7)&48););0>=a&&print("TX timeout");a=!0;this.getReg(7)&16&&(print("TX not received "+this.getReg(7)),a=!1);digitalWrite(this.CE,0);this.setReg(0,11);digitalWrite(this.CE,1);this.setReg(7,48);return a}
^
in function "send" called from line 2 col 124
in function "sendString" called from line 1 col 42
in function "sendCommand" called from line 2 col 67
in function called from system
ERROR: Error processing interval - removing it.
Execution Interrupted during event processing.
ERROR: Out of Memory!
ERROR: Out of Me
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I am starting to use the NRF24... modules I got with the espruino and the master/slave example that I found in the code examples worked really great initially. I then modified the example of the master slightly:
It sends the counter variable to the slave, then prints the response. So ideally it will print the increasing numbers.
Two observations:
when starting up, and once also just in the middle of runing the master code, I see
I sometimes get an empty response - the output from teh print is just == in this case. That seems simple to check against, just wondering what the issue is and if it could be fixed.
after running this counter till around 600, I disconnected. then connected again and got a massive out of memory error. is this because of the print statement which might queue the output?
All output is below: