m5stack / M5Unit-MiniEncoderC

MIT License
0 stars 0 forks source link

Tiny Typo in https://github.com/m5stack/M5Unit-MiniEncoderC/blob/main/examples/getValue/getValue.ino #1

Closed MDAR closed 11 months ago

MDAR commented 11 months ago

Describe the bug

Re :- https://github.com/m5stack/M5Unit-MiniEncoderC/blob/main/examples/getValue/getValue.ino

there is a tiny Typo on line 27

currently

   if (!btn_stauts) {
        sensor.setLEDColor(0, 0x001100);
    }

I assume this should be

   if (!btn_status) {
        sensor.setLEDColor(0, 0x001100);
    }

Likewise

Should the I2C address be set to

0x42 on line 11?

(Currently, uint8_t i2c_address = 0 )

To reproduce

Simply reviewing the code before trying it

Expected behavior

get status

Screenshots

No response

Environment

Additional context

No response

Issue checklist

MDAR commented 11 months ago

When compiing the code in Arduino IDE2.1.1

I get this error

 #include "Unit_MiniEncoderC.h"
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.

exit status 1

Compilation error: Unit_MiniEncoderC.h: No such file or directory

Board manager shows M5Stack (official) version 2.0.07 Library manager shows M5Stack 0.4.4

Tinyu-Zhao commented 11 months ago

When compiing the code in Arduino IDE2.1.1

I get this error

 #include "Unit_MiniEncoderC.h"
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.

exit status 1

Compilation error: Unit_MiniEncoderC.h: No such file or directory

Board manager shows M5Stack (official) version 2.0.07 Library manager shows M5Stack 0.4.4

You can try this guide,Manual Installation of Dependency Libraries

Tinyu-Zhao commented 11 months ago

Describe the bug

Re :- https://github.com/m5stack/M5Unit-MiniEncoderC/blob/main/examples/getValue/getValue.ino

there is a tiny Typo on line 27

currently

   if (!btn_stauts) {
        sensor.setLEDColor(0, 0x001100);
    }

I assume this should be

   if (!btn_status) {
        sensor.setLEDColor(0, 0x001100);
    }

Likewise

Should the I2C address be set to

0x42 on line 11?

(Currently, uint8_t i2c_address = 0 )

To reproduce

Simply reviewing the code before trying it

Expected behavior

get status

Screenshots

No response

Environment

  • OS:
  • IDE &IDE Version:
  • Repository Version:

Additional context

No response

Issue checklist

  • [x] I searched for previous reports in the issue tracker
  • [x] My report contains all necessary details

The typo has been fixed.https://github.com/m5stack/M5Unit-MiniEncoderC/commit/7df08c4480cc4a1c8a626c830726e9b86909a5fc The I2C address does not need to be set.https://github.com/m5stack/M5Unit-MiniEncoderC/blob/ef1eda9f19932e630f5f50d01e1d4e26399c284c/examples/getValue/getValue.ino#L60