Chat freely about anything...

User avatar
By asz
#92678 Hi Eriksl

Maybe I am out in the blue now...but a way to get the values that one can read from the sensors out on the bridge port would be to build an "bw" (bridge write) command so that one can create a sequencer that reads the sensor value and then puts the value out on the bridge stream (like it was received on the tx pin). The bw command would need to have some data variables... or be able to take a secondary command that reads the value for it....like:
bw "first string" [51] "second string" cs <CR><LF>

or even better if one could stack more values like:
bw "first string" [51] "second string" [52] "third string" [53] ... [nn] "last string*" cs

- Where bw is the command
- "first string" is part of the NMEA format and is static for a given sensor
- [51] is the value that gets read from the sensor number . Same that is presented inside brackets when you do a "isr 51"
- "second string" is the rest of the NMEA static format string...and so on.
- cs is a calculated checksum that needs to be done on the fly. It does not need to have a parameter but can be understood to be there after the asterisk. But maybe the bw command gets more universal with the parameter. The complete message must end with <CR><LF> which also can be understood or implemented as a parameter.

This would give an example command like this:
bw "$IIXDR,C," [51] ",C,UIObridge*" cs
And would send the string:
$IIXDR,C,23.7,C,UIObridge*1A

Of course the bw command could be used to send a lot of other things out on the X.X.X.X:bp
Would it be possible for you to build something like this? (crossing my fingers, saying pleeeeese) It would save me a ton of work since I haven't got the build environment. A pretty good description of how to calculate the checksum is found here:
https://doschman.blogspot.com/2013/01/c ... ksums.html
And a good online calculator is found here:
https://alekunderwater.github.io/nmea01 ... lator.html
User avatar
By asz
#92681 ...as for the hmc5883l. I followed this example and was able to start communicating with the compass onboard my "GPS & Compass" module. The library in the example above is from here. Maybe that makes it smoother to implement?

A compass should send NMEA0183 sentence HDM (HDG is the newest but I have to work on that) wich has this syntax:
$IIHDM,x.x,M*hh<CR><LF>

Where:
x.x is the magnetic heading

And again we can use the bw command (I think) like this:
bw "$IIHDM," [88] ",M*" cs
(I make the assumption that the hmc5883l driver gets id 88)

/Andreas Schütz
User avatar
By eriksl
#92696 Hi Andreas, I can see you're very enthousiastic ;) I will try to reply on all your questions and remarks shortly.

Some of the bugs you mention I thought I fixed earlier, what version are you using, HEAD from git? The releases are quite old.
User avatar
By eriksl
#92697
asz wrote:My hardware setup contains a drone "GPS & Compass" (https://www.aliexpress.com/item/3296379 ... 4c4dALA68I) and an GY-BME280-3.3 module.

It lists as "not available".

The "GPS & Compass" also have a compass chip labeled HA5883 0008 witch I think is the same as a QMC5883 that you can get very cheaply on a GY-271 module (https://www.aliexpress.com/wholesale?ca ... ext=GY-271)

I have ordered two, expect a full month for it to arrive though :|

I don't know the difference of QMC5883 and HMC5883, probably a clone of a clone of a clone with lower chip quality and not as good resolution. But I would guess that there is no difference in the I2C communication.

Indeed that's often the case. We'll see soon enough.