Navigation

    M5Stack Community

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

    learly6

    @learly6

    0
    Reputation
    9
    Posts
    481
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    learly6 Follow

    Posts made by learly6

    • MLX 90640 doesn't work when Ultrasonic I2C Range Sensor is also connected (via 1-to-3 Hub Unit)

      I am daisy-chain linking a series of I2C sensors to grove port A on the M5Go (esp32) and noticed that the MLX 90640- the last one I'm adding- completely freezes or shows nothing whenever I also connect the Ultrasonic I2C Range Sensor. They do not have the same address (MLX...- 0x33 vs. Ultrasonic I2C...- 0x57) and the MLX 90640 works when linked to 6 other sensors, just not when linked to the Ultrasonic I2C. Does anyone know if this could be related to a frame rate issue with the MLX or why this would be the case? And does anyone have a workaround that could resolve it (that is not buying a Pa.Hub)?

      Thanks in advance,
      L

      posted in Units
      L
      learly6
    • RE: Using Color Sensor TC34725 with Pbhub

      Hi,

      Right, all will be I2C except for the PIR and IR remote, which was part of my confusion (as to why the research supervisor chose a PbHub instead of a PaHub and also suggested this route instead of a parallel setup with grove hubs). But understanding that I don't need to do it using a PbHub, would it be possible using the softI2C library (or via some other method)?

      posted in Arduino
      L
      learly6
    • RE: Using Color Sensor TC34725 with Pbhub

      @felmue ,

      Right, because of the combination of sensors I am required to connect to the M5, I need to use a Hub. I am not only connecting the TC34725, but also a PIR motion, Ultrasonic, DLight, TOF, ENVIII, etc. (7 sensors as of now).

      I was thinking of something like this library to achieve this: http://todbot.com/blog/2010/09/25/softi2cmaster-add-i2c-to-any-arduino-pins/comment-page-2/

      Thanks,
      L

      posted in Arduino
      L
      learly6
    • RE: Using Color Sensor TC34725 with Pbhub

      Hi @felmue ,
      Thanks for replying. I know that PbHub is meant for the simple I/O, but I was wondering if it were possible to use softwarewire or some other method to read the sensor data from a PbHub channel. My research supervisor has suggested I do this and has requested so without using a PaHub, but I don't fully understand how it would be possible.

      Thanks,
      L

      posted in Arduino
      L
      learly6
    • Using Color Sensor TC34725 with Pbhub

      Re: Using IR Remote sensor with PbHub

      Just following up this question from some months ago, I was wondering if anyone had been able to operate the Color Sensor via a Pbhub channel? (I have been trying for quite some time now and am out of ideas).

      My specific question when looking essentially at trying to extend the example TC34725 sketch to channel 0 in pbhub is that I don't understand how to get
      tcs.getRawData(&red, &green, &blue, &clear);
      to read data from the channel 0 address of the porthub?

      Just so that the Color Sensor sketch is here:

      #include "Adafruit_TCS34725.h"
      
      /* Example code for the Adafruit TCS34725 breakout library */
      
      /* Connect SCL    to analog 5
         Connect SDA    to analog 4
         Connect VDD    to 3.3V DC
         Connect GROUND to common ground */
      
      /* Initialise with default values (int time = 2.4ms, gain = 1x) */
      // Adafruit_TCS34725 tcs = Adafruit_TCS34725();
      
      /* Initialise with specific int time and gain values */
      Adafruit_TCS34725 tcs = Adafruit_TCS34725(TCS34725_INTEGRATIONTIME_614MS, TCS34725_GAIN_1X);
      
      void setup(void) {
        Serial.begin(9600);
      
        if (tcs.begin()) {
          Serial.println("Found sensor");
        } else {
          Serial.println("No TCS34725 found ... check your connections");
          while (1);
        }
      
        // Now we're ready to get readings!
      }
      
      void loop(void) {
        uint16_t r, g, b, c, colorTemp, lux;
      
        tcs.getRawData(&r, &g, &b, &c);
        // colorTemp = tcs.calculateColorTemperature(r, g, b);
        colorTemp = tcs.calculateColorTemperature_dn40(r, g, b, c);
        lux = tcs.calculateLux(r, g, b);
      
        Serial.print("Color Temp: "); Serial.print(colorTemp, DEC); Serial.print(" K - ");
        Serial.print("Lux: "); Serial.print(lux, DEC); Serial.print(" - ");
        Serial.print("R: "); Serial.print(r, DEC); Serial.print(" ");
        Serial.print("G: "); Serial.print(g, DEC); Serial.print(" ");
        Serial.print("B: "); Serial.print(b, DEC); Serial.print(" ");
        Serial.print("C: "); Serial.print(c, DEC); Serial.print(" ");
        Serial.println(" ");
      }```
      posted in Arduino
      L
      learly6
    • Has anyone found a way to use the IR remote as a distance sensor?

      I am a beginner programmer and new to M5GO as well. I was interested in using the IR remote as a distance sensor and was curious if anyone had a link or other suggestion as to how to write a program that could detect distance via the IR remote.

      posted in Modules
      L
      learly6