Attempting to get SPI running on ESP8266 D1 mini along with RFM69/95 for USA - Git source link desired #6357
Replies: 1 comment
-
Posted at 2019-06-13 by @MaBecker Check this on the Espruino on ESP8266 WiFi page: spi-implementation Posted at 2019-06-13 by AkosLukacs Looks like the RMF96 and SX12xx modules have different parameters. The RFM69's connect's first parameter should be the SPI object, not an object with an
Posted at 2019-06-13 by Robin Thanks @MaBecker for your immediate response,
I also found this tidbit:
which gets me past this error:
and, which produced: (mapping the same as in the link you presented)
and surprisingly
Still works. To confirm, I Then, removed the jumper, and as expected, the data seen:
So, I believe SPI is now working, but the mapping of 'cs' and 'rst' is still problematic. Using the same format:
But when I try that format for 'cs':
Still seeing error:
We can still see that 'cs' is not being accepted. Was hoping to find the source under the hood for where the other errors are occurring, when the value of 'cs' isn't being detected. Posted at 2019-06-13 by Robin It appears we were updating at the same time. . . . Good catch @AkosLukacs! I had been playing with that as I kept getting WebIDE syntax errors R-Hand editor side, and wondered, as no one had success in either of the other forum links if one or the other was a typo. But, with a bit of fiddling,
'cs' and 'rst' are now recognized.
The "RFM69 not found" error seems to be from ~L080: The part I'm still struggling with is that in order to get a correct syntax check, I need to use Still searching for the Git source that might explain the NodeMCU.Dx mapping to see if limitations exist there. Posted at 2019-06-13 by @MaBecker
https://github.com/espruino/Espruino/blob/master/targets/esp8266/jswrap_nodemcu.c Posted at 2019-06-13 by AkosLukacs AFAIK, on the ESP8266, only some pins are truly general purpose input and output pins. Lots have restrictions either during boot, or don't behave nicely either as input or output. Nodemcu.D8 == GPIO15 might be one of those pins, but not certain about it... Posted at 2019-06-13 by Robin MaBe Thank you. That file seems to have its contents commented out. Backing up to the parent and taking a look, I found:
I might be getting breakout board pin reference D8 mixed up with ESP8266 pin label D15 as:
But, if I attempt to return that code to either the GPIOxx or removing the 'NodeMCU' prefix, I'm greeted with:
Conclusion: The only syntax available means is to use the prefix 'NodeMCU' for the pin assignments. This also agrees with the Arduino table, second to last image in #1 above. Now, back to why the external hardware isn't responding to the code running on the D1. . . . Posted at 2019-06-13 by @MaBecker
Looks like a pin between D6 and D11 is used in your code Posted at 2019-06-13 by @MaBecker https://github.com/espruino/Espruino/blob/master/targets/esp8266/jshardware.c#L409-L413 Posted at 2019-06-14 by Robin MaBe I found these forum references:
and they both agree with L409-L413 in the jshardware.c assert source note. So it appears for this particular board, that the prefix 'NodeMCU' must be used for the pin assignments. More for tomorrow, take a fresh look at all the 'D' references and compare with the pin images. Posted at 2020-02-20 by @allObjects @robin, don't remember why I landed here... but: Did you get this ever working? Few things I notice glancing thru the thread:
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-06-13 by Robin
Thr 2019.06.13
Okay - Found this:
but, unable to locate how this one hdwr SPI is setup. Pin map for 'cs' 'rst' anyone?
When using the hdwr setup from pin map link below - second image from end post #1 - and
I am led to believe that these are valid pins, as print does kick back what I sent without error:
as when using the little loopback trick from #5
Now on to RFM95 > Note that freq 915 is required for USA and thus module RFM95 needed
But, when I attempt to connect applying a pin value for 'cs' or 'rst'
I'm faced with un-initialized pins: (Note that 'rst' omitted for simple error return)
The resultant "send" not found! error seems to be as the pin for 'cs' D8 doesn't seem to initialize.
Successes so far:
While an overly ambitious desire to get working and provide a tutorial for the RFM69/95 module, as others seem to be having difficulty also, and realizing that most forum post references ended 2 years ago (late 2016), this task may be near impossible, but might be fun learning to see if the module could be re-written.
"To Boldly Go Where No Man Has Gone Before!"
I understand this is un-supported, uncharted waters:
ESP8266 closest match
Found an article that had SPI running with Arduino on a D1 mini. Wanted to see if Espruino would work instead.
After reading the headaches from this install attempt, Jan 2018:
and having a WavGat D1 variant, see image @MaBecker link#18 lying around from a previous CN massive sale discount order I just couldn't resist, gave it a whirl. Surprisingly, in my case, after botching the wrong pull-up pin for flash, was able to get Espruino running with no headache on my part. 'Hello World' in under an hour!
In the meantime, I'll continue to research and will update here as I discover more. . . .
Beta Was this translation helpful? Give feedback.
All reactions