BlocklyProp icon indicating copy to clipboard operation
BlocklyProp copied to clipboard

HMC5883L blocks missing from Blockly.

Open mrodriguez-parallax opened this issue 7 years ago • 4 comments

The blocks for the HMC5883L are missing in Blockly but are still in the help menu. 2018-11-21_11-41-41

2018-11-21_11-42-30

mrodriguez-parallax avatar Nov 21 '18 19:11 mrodriguez-parallax

They are available in the "other" board type - and are VERY old - so try them out and let me know if they still work, and we can open them back up in the rest of the board types.

MatzElectronics avatar Nov 22 '18 01:11 MatzElectronics

I created a new project with the "Other" board type; added two blocks as shown below and found that the project will not compile.

image

Compile... Failed!

-------- compiler messages --------
Included libraries: compass3d, simpletools
single.c:2:25: fatal error: simpletools.h: No such file or directory
compilation terminated.

Download...

The generated C code for this project:

// ------ Libraries and Definitions ------
#include "simpletools.h"
#include "compass3d.h"

// ------ Global Variables and Objects ------
int __compX, __compY, __compZ;
float __compH;

int item;



// ------ Main Program ------
int main() {
    i2c *compass_bus = i2c_newbus(0, 0, 0);
    compass_init(compass_bus);
    compass_read(bus, &__compX, &__compY, &__compZ);
    __compH = atan2(((float) __compY), (((float) __compX)) * 180.0 / PI;
      if (__compH < 0.0) __compH = (360.0 + __compH); item = (int) __compH;

    }

zfi avatar Dec 13 '18 21:12 zfi

@AndyLindsay is the compass3d.h file and library included in Simple Libraries?

zfi avatar Dec 13 '18 21:12 zfi

That's what I was afraid of...

MatzElectronics avatar Dec 18 '18 18:12 MatzElectronics