As the title says... Chat on...

User avatar
By alex_g
#67499 I am trying to get one of these magnetometers up and running.
I get a warning that the documented call hmc5883l.init(sda,scl) is deprecated and will be removed in the next release. I am instructed to use the hmc5883l.setup() call instead, but nowhere is this new call documented nor can I even find any source code for it.

Subsequently, my system announces that it can't find the device, so there might be something wrong with it, but I want to eliminate all other possibilities first. I am using a custom-built firmware, off the dev branch. ( BTW, where is the source for this, if different from the main branch?)

Anyone have this running successfully, I'd be interested to hear...

-------

PS. The unit I am actually using is a GY-271, which is hmc5883l-based. I don't know if this causes some problem (I shouldn't imagine so) , but I'll try it with Arduino later, too, just to be sure.
User avatar
By marcelstoer
#67509
alex_g wrote:I am trying to get one of these magnetometers up and running.
I get a warning that the documented call hmc5883l.init(sda,scl) is deprecated and will be removed in the next release. I am instructed to use the hmc5883l.setup() call instead, but nowhere is this new call documented nor can I even find any source code for it.


You're obviously using a binary from the current 'dev' branch where init has been deprecated already. Hence, you also need docs and source from 'dev'.

https://nodemcu.readthedocs.io/en/dev/e ... /hmc5883l/
https://github.com/nodemcu/nodemcu-firm ... hmc5883l.c
User avatar
By alex_g
#67528
marcelstoer wrote:
alex_g wrote:You're obviously using a binary from the current 'dev' branch where init has been deprecated already. Hence, you also need docs and source from 'dev'.

https://nodemcu.readthedocs.io/en/dev/e ... /hmc5883l/
https://github.com/nodemcu/nodemcu-firm ... hmc5883l.c


Thanks again Marcel!
I don't know why I had so much difficulty finding the dev source and docs. I tried Google and everything. Oh, well, I've got it bookmarked now!

BTW, I think my GY-271 unit is broken, I tried it under Arduino and it wouldn't work there either. Ho-hum, fleabay, here we go again...
User avatar
By marcelstoer
#67596
alex_g wrote:I don't know why I had so much difficulty finding the dev source and docs.


Try the "Read The Docs" fly-out menu in the lower left corner of the doc pages. It's partially broken (not our fault) but contains links to all branches. The source file for each module is linked right at the top of its corresponding doc page.