Navigation

    M5Stack Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. scientiffic
    S
    • Continue chat with scientiffic
    • Start new chat with scientiffic
    • Flag Profile
    • Profile
    • Following
    • Followers
    • Blocks
    • Topics
    • Posts
    • Best
    • Groups
    Save
    Saving

    scientiffic

    @scientiffic

    0
    Reputation
    6
    Posts
    1431
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    scientiffic Follow

    Posts made by scientiffic

    • RE: M5Stick IMU Yaw Readings Off

      @tuupola thanks for your response! is there a particular magnetometer you recommend using with the m5 platform?

      posted in M5 Stick/StickC
      S
      scientiffic
    • M5Stick IMU Yaw Readings Off

      I did some calibration with my M5stick to see what the IMU pitch, yaw, and roll readings would be based on the example IMU Arduino app included with the M5stick library.

      It seems like the Yaw values seem to always be drifting – is this a known issue, or is there a way to account for it?

      0_1588322717909_b1d8c220-d79d-4e36-9222-b8b9cf16d1b0-image.png

      My code:

      #include <M5StickC.h>
      
      float accX = 0.0F;
      float accY = 0.0F;
      float accZ = 0.0F;
      
      float gyroX = 0.0F;
      float gyroY = 0.0F;
      float gyroZ = 0.0F;
      
      float pitch = 0.0F;
      float roll  = 0.0F;
      float yaw   = 0.0F;
      
      void setup() {
        // put your setup code here, to run once:
        M5.begin();
        M5.IMU.Init();
        M5.Lcd.setRotation(1);
        M5.Lcd.fillScreen(BLACK);
        M5.Lcd.setTextSize(1);
        M5.Lcd.setCursor(40, 0);
        M5.Lcd.println("IMU TEST");
        M5.Lcd.setCursor(0, 10);
        M5.Lcd.println("  X       Y       Z");
        M5.Lcd.setCursor(0, 50);
        M5.Lcd.println("  Pitch   Roll    Yaw");
      
        Serial.begin(9600);
      }
      
      float temp = 0;
      /*****************************************
      M5.IMU.getGyroData(&gyroX,&gyroY,&gyroZ);
      M5.IMU.getAccelData(&accX,&accY,&accZ);
      M5.IMU.getAhrsData(&pitch,&roll,&yaw);
      M5.IMU.getTempData(&temp);
      *****************************************/
      void loop() {
        // put your main code here, to run repeatedly:
        M5.IMU.getGyroData(&gyroX,&gyroY,&gyroZ);
        M5.IMU.getAccelData(&accX,&accY,&accZ);
        M5.IMU.getAhrsData(&pitch,&roll,&yaw);
        M5.IMU.getTempData(&temp);
        
        M5.Lcd.setCursor(0, 20);
        M5.Lcd.printf("%6.2f  %6.2f  %6.2f      ", gyroX, gyroY, gyroZ);
        M5.Lcd.setCursor(140, 20);
        M5.Lcd.print("o/s");
        M5.Lcd.setCursor(0, 30);
        M5.Lcd.printf(" %5.2f   %5.2f   %5.2f   ", accX, accY, accZ);
        M5.Lcd.setCursor(140, 30);
        M5.Lcd.print("G");
        M5.Lcd.setCursor(0, 60);
        M5.Lcd.printf(" %5.2f   %5.2f   %5.2f   ", pitch, roll, yaw);
      
        M5.Lcd.setCursor(0, 70);
        M5.Lcd.printf("Temperature : %.2f C", temp);
      
        // Plotting
        Serial.print("pitch:");
        Serial.print(pitch);
        Serial.print(",");
        Serial.print("roll:");
        Serial.print(roll);
        Serial.print(",");
        Serial.print("yaw:");
        Serial.println(yaw);
        
        delay(100);
      }
      

      Full documentation on the various IMU readings when the device is in different orientations here: https://www.notion.so/scientiffic/M5Stick-IMU-Calibration-dbb5e3fa4d35444da7ca7decb418ed20

      posted in M5 Stick/StickC
      S
      scientiffic
    • m5stick No Module Named 'Hat'

      I have an m5StickC with a speaker hat. I tried uploading a basic program from the UI Flow Desktop app to my m5Stick:

      0_1587357159479_e971eb81-34eb-46cf-8c32-4c5b176903c6-image.png

      But the m5Stick is display the error 'no module named hat'

      0_1587357242773_IMG_20200420_133302.jpg

      How can I get the m5stick to recognize the speaker hat code from UI Flow?

      posted in PRODUCTS
      S
      scientiffic
    • Easy Loader Sync Error

      As per the instructions available on the main m5stack Github repo, I tried using the EasyLoader app to flash my M5stick.

      However, when trying to burn my M5Stick back to factory settings, I continually get the error Sync Failed

      0_1587353326452_09ebbdbe-c4cc-4180-a3c6-89b518f7b7f4-image.png

      How can I resolve this error?

      posted in PRODUCTS
      S
      scientiffic
    • Quick Start Guide Images are Broken

      I'd like to follow your Quick Start guide for the m5Stick, but it appears all the image links are broken:

      0_1587353190549_b8eaa986-609f-4b50-80aa-27ea32520e9d-image.png

      Note that this is the case for all tutorials at this link: https://github.com/m5stack/m5-docs/tree/master/docs/en/quick_start

      posted in General
      S
      scientiffic
    • Converting Hex color to uint_16

      I'm trying to use the fillScreen() method for the LCD, which expects a color in uint_16.

      I'm currently fetching the color as a a HEX via a GET request to a service, which is returning a String value such as "#ff0000"

      I need to convert the string value from the GET request into a uint_16 so that I can set the color.

      uint16_t color = (uint16_t) strtol(http.getString(), NULL, 16);

      Which gives me the error

      cannot convert 'String' to 'const char*' for argument '1' to 'long int strtol(const char*, char**, int)'
      

      Any recommended way to generate the uint_16 color from a HEX string?

      posted in General
      S
      scientiffic