Skip to content
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

[Question]MISO MOSI and HMISO, HMOSI #648

Closed
pavluchenkor opened this issue Oct 11, 2020 · 6 comments · Fixed by #750
Closed

[Question]MISO MOSI and HMISO, HMOSI #648

pavluchenkor opened this issue Oct 11, 2020 · 6 comments · Fixed by #750
Labels

Comments

@pavluchenkor
Copy link

Good afternoon, following the documentation, the node has MISO MOSI etc. and HMISO, HMOSI, etc. How can I use MISO MOSI? Everything works fine for me, but I would like to free the ports for other purposes.
I checked, turned on NRF 24 in MISO MOSI, left CN on port 4 (GPIO 2), indicated RF24 radio (2, SCK) ;, it seemed to me so correct, but radio.isChipConnected (); will give me a false.
Снимок экрана 2020-10-11 в 14 04 14

@2bndy5
Copy link
Member

2bndy5 commented Oct 11, 2020

This is more of a ESP8266 question rather than a nRF24L01 question. Try this advice from the Arduino core for the ESP8266. In my experience, the nodeMCU boards weren't labeled (nor documented) for use with Arduino IDE. It was originally designed to run a LUA interpreter using the nodeMCU firmware.

@pavluchenkor
Copy link
Author

Of course, this is a question for nodeMCU, the NRF24 module works fine, but I'm sure it can be connected this way. Half a year ago, when I did not know anything about NRF24, I found one lesson where it was included in this way, but unfortunately I cannot find it and I have no code left.
Now for the tests.
Either I'm trying the wrong way or your advice doesn't work.
Connection

  • S1 MOSI = SD1
  • S0 MISO = SD0
  • SK SCLK = CLK
    CE 2
    CSN 0
    the code

RF24 radio (2.0); //
void setup (void)
{
SPI.pins (6, 7, 8, 0);
SPI.begin ();
radio.begin ();
bool result = radio.isChipConnected ();
...
}
and it doesn't work

@pavluchenkor
Copy link
Author

I found such an example on the Internet, but I can't find anything like that anymore, and this one doesn't work for me.
In the description of the class, I see a little different

class RF24 {
private:
#ifdef SOFTSPI
SoftSPI <SOFT_SPI_MISO_PIN, SOFT_SPI_MOSI_PIN, SOFT_SPI_SCK_PIN, SPI_MODE> spi;

but I don't understand how to specify CE and CSN then

#include "nRF24L01.h"
#include "RF24.h"
char msg[6] = "hello";
RF24 radio(12, 14, 26, 25, 27);
const uint64_t pipe = 0xE8E8F0F0E1LL;

void setup(void) {
Serial.begin(115200);
radio.begin();
radio.setChannel(2);
radio.setPayloadSize(7);
radio.setDataRate(RF24_250KBPS);
radio.openWritingPipe(pipe);
}
void loop(void) {
Serial.println("send ...");
radio.write(msg, 6);
delay(3000);
}

@2bndy5
Copy link
Member

2bndy5 commented Oct 11, 2020

I can't help you. Providing a link to the advice was "generous" of me. Try asking this question on the repo that enables esp8266 for Arduino IDE. As you said

Of course, this is a question for nodeMCU, the NRF24 module works fine

this is simply the wrong repo to ask this question

@2bndy5
Copy link
Member

2bndy5 commented Oct 11, 2020

BTW, of course this won't work

RF24 radio(12, 14, 26, 25, 27);

because... well just read the docs.
Be aware that any "unofficial" examples may not be compatible with the current release of this library (and this fork of maniacBug's original code -- if unofficial example is older than 2014).

@TMRh20 TMRh20 closed this as completed Dec 14, 2020
@2bndy5
Copy link
Member

2bndy5 commented Mar 20, 2021

@pavluchenkor I'm working on this feature to use a secondary SPI bus by overloading begin()... I think its ready for testing (need testers). The overload-begin branch has the changes. I've also added example source code specific for the ESP8266 (NodeMCU).

@2bndy5 2bndy5 reopened this Mar 20, 2021
@2bndy5 2bndy5 linked a pull request Mar 20, 2021 that will close this issue
kripton pushed a commit to kripton/RF24 that referenced this issue Apr 10, 2021
convert _SPI calls to pointers where applicable

typo made BCM driver fail

overload begin() and amended docs about begin()

fix faulty #ifdef logic

doxygen v1.9.1 deprecated COLS_IN_ALPHA_INDEX tag

bump version to v1.4.0

exclude only RF24_LINUX

apply ptr treatment to Teensy, LittleWire, & Due

trigger ArduinoCLI action

doxygen action shouldn't create a docs folder

no need to specify output dir in doxygen action

make my life simpler: use new RF24_SPI_PTR macro

trigger ArduinoCLI action

forgot about c'tor; fix 2-space indent in begin()

abstract SPI::begin() from _init_pins()

adjust csn_pin before SPI.begin() on BCM driver

conforming whitespace

add printf.h fix from @TonioChingon in nRF24#739

rename atxmega.md & add link to supported product

add Due to ArduinoCLI action

fix teensy support; add PIO CI for teensy

[PIO CI] use quoted matrix entries

[PIO CI] use single quotes?

I hate YML

Gimme that badge

add MRAA to Linux CI action

typo

[Linux CI] MRAA install needs special permission

try with "sudo bash -c"

[Linux CI] MRAA not cross compiling (I think)

add example code snippets to Arduino support pg

doc typos

Due can't use SPI_PTR; delete ATXMEGA/readme.md
(use docs/atxmega.md instead)

fix nRF24#414; note need mbed example in arduino.md

fix printf() only for adafruit/ArduinoCore-SAMD

add msg about COMMON_ISSUES to README

add estimated mbed example to arduino.md

avr/pgmspace.h was added to Due core in 2013

oops, undo my testing change

remove useless Due config file nRF24#752

ammend support for SPI_UART in csn()

Confirm working 2nd SPI bus on esp8266 nRF24#648

fix indent

c-n-p artifact; more indent inconcsistencies

comment out theroretical example snippets

add pinout img from RF24Audio repo

doxygen sux at reading imgs

implement nRF24#539

my CnP skills are lacking

need to test py wrapper

[py_wrap] begin fails to compile

[py wrap] oops left the old begin still in there

[py wrap] use thin wrapper for begin_w/_pins

[pr wrap] try explicit begin(void)

boost.py docs suck

[py wrap] try using same name for begin(pin, pin)

[py wrap] c'tor overload is bad

[py wrap] "optional<>" template didn't take

[py wrap] unmatched parenthesis

advise that teensy doesn't need overloaded begin()

docs review
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants