🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    issue compiling m5stickc joyc.ino in arduino.

    M5 Stick/StickC
    4
    5
    9.1k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • F
      firehopper
      last edited by

      I dont know if this is the right place to post it but.

      I downloaded the newest files for joyC and roverC due to the fact my roverC and joyC should be arriving soon, roverC does compile. joyC does not. the errors I get.

      Arduino: 1.8.9 (Windows 10), TD: 1.47-beta7, Board: "M5Stick-C, Default, 1500000, None"

      C:\Users\admin\AppData\Local\Temp\arduino_build_959934\sketch\JoyC.cpp: In member function 'void JoyC::SetLedColor(uint32_t)':

      JoyC.cpp:31:8: error: 'class M5StickC' has no member named 'I2C'

       M5.I2C.writeBytes(JOYC_ADDR, JOYC_COLOR_REG, color_buff, 3);
      
          ^
      

      C:\Users\admin\AppData\Local\Temp\arduino_build_959934\sketch\JoyC.cpp: In member function 'uint8_t JoyC::GetX(uint8_t)':

      JoyC.cpp:39:8: error: 'class M5StickC' has no member named 'I2C'

       M5.I2C.readByte(JOYC_ADDR, read_reg, &value);
      
          ^
      

      C:\Users\admin\AppData\Local\Temp\arduino_build_959934\sketch\JoyC.cpp: In member function 'uint8_t JoyC::GetY(uint8_t)':

      JoyC.cpp:48:8: error: 'class M5StickC' has no member named 'I2C'

       M5.I2C.readByte(JOYC_ADDR, read_reg, &value);
      
          ^
      

      C:\Users\admin\AppData\Local\Temp\arduino_build_959934\sketch\JoyC.cpp: In member function 'uint16_t JoyC::GetAngle(uint8_t)':

      JoyC.cpp:57:8: error: 'class M5StickC' has no member named 'I2C'

       M5.I2C.readBytes(JOYC_ADDR, read_reg, 2, i2c_read_buff);
      
          ^
      

      C:\Users\admin\AppData\Local\Temp\arduino_build_959934\sketch\JoyC.cpp: In member function 'uint16_t JoyC::GetDistance(uint8_t)':

      JoyC.cpp:66:8: error: 'class M5StickC' has no member named 'I2C'

       M5.I2C.readBytes(JOYC_ADDR, read_reg, 2, i2c_read_buff);
      
          ^
      

      C:\Users\admin\AppData\Local\Temp\arduino_build_959934\sketch\JoyC.cpp: In member function 'uint8_t JoyC::GetPress(uint8_t)':

      JoyC.cpp:73:8: error: 'class M5StickC' has no member named 'I2C'

       M5.I2C.readByte(JOYC_ADDR, JOYC_PRESS_REG, &press_value);
      
          ^
      

      Using library M5StickC at version 0.1.1 in folder: C:\Users\admin\Documents\Arduino\libraries\M5StickC
      Using library Wire at version 1.0.1 in folder: C:\Users\admin\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\Wire
      Using library SPI at version 1.0 in folder: C:\Users\admin\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\SPI
      Using library FS at version 1.0 in folder: C:\Users\admin\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\FS
      exit status 1
      'class M5StickC' has no member named 'I2C'

      let me know what I need to do to fix it? there doesnt seem to be a update for the m5stickC lib so not sure what else to do..

      hagueH 1 Reply Last reply Reply Quote 0
      • hagueH
        hague @firehopper
        last edited by

        @firehopper I solved the problem by downloading the M5StickC Master from GitHub (https://github.com/m5stack/M5StickC) and use the library from there in my project. The M5.I2C Method is quite new as you can see here: https://github.com/m5stack/M5StickC/commit/6e590f8e4ed5ffaaf989af7628bf421587e15eb8

        F 1 Reply Last reply Reply Quote 1
        • F
          firehopper @hague
          last edited by

          @hague that fixed it, thanks!

          1 Reply Last reply Reply Quote 0
          • m5stackM
            m5stack
            last edited by

            hi thanks your feedback , i will contact to the engineer.

            S 1 Reply Last reply Reply Quote 0
            • S
              SarahC @m5stack
              last edited by

              @m5stack Any idea when that engineer will add I2C to the M5StickC Plus? I just added it to my own copy and it only took 15 minutes. It'd make a lot more M5StickC programs compatible with the Plus too!

              1 Reply Last reply Reply Quote 0
              • First post
                Last post