OPEnSLab-OSU / Loom

Arduino library for Internet of Things Rapid Prototyping in environmental sensing
GNU General Public License v3.0
26 stars 3 forks source link

Test Loom_AS7263 - Winnie #165

Closed winniiew closed 2 years ago

winniiew commented 2 years ago

Adafruit example works but not Sparkfun

winniiew commented 2 years ago

Adafruit example serial monitor output

Temp: 30 Violet: 16 Blue: 19 Green: 20 Yellow: 17 Orange: 18 Red: 11

Temp: 30 Violet: 17 Blue: 19 Green: 22 Yellow: 18 Orange: 18 Red: 11

Temp: 30 Violet: 18 Blue: 20 Green: 22 Yellow: 18 Orange: 19 Red: 12

Temp: 30 Violet: 18 Blue: 20 Green: 22 Yellow: 18 Orange: 19 Red: 12

Temp: 30 Violet: 17 Blue: 20 Green: 21 Yellow: 18 Orange: 19 Red: 11

Temp: 30 Violet: 17 Blue: 19 Green: 21 Yellow: 17 Orange: 18 Red: 11

Temp: 30 Violet: 17 Blue: 19 Green: 21 Yellow: 17 Orange: 18 Red: 11

Temp: 30 Violet: 17 Blue: 19 Green: 21 Yellow: 17 Orange: 18 Red: 11

Temp: 30 Violet: 16 Blue: 19 Green: 21 Yellow: 17 Orange: 18 Red: 11

Temp: 30 Violet: 16 Blue: 19 Green: 20 Yellow: 17 Orange: 18 Red: 11

Temp: 30 Violet: 16 Blue: 19 Green: 21 Yellow: 17 Orange: 18 Red: 11

Temp: 30 Violet: 17 Blue: 19 Green: 21 Yellow: 18 Orange: 18 Red: 12

Temp: 30 Violet: 17 Blue: 20 Green: 22 Yellow: 18 Orange: 19 Red: 12

Temp: 30 Violet: 18 Blue: 20 Green: 22 Yellow: 19 Orange: 20 Red: 12

Temp: 31 Violet: 19 Blue: 21 Green: 23 Yellow: 19 Orange: 20 Red: 13

Temp: 30 Violet: 18 Blue: 21 Green: 22 Yellow: 19 Orange: 20 Red: 12

Temp: 30 Violet: 19 Blue: 21 Green: 23 Yellow: 19 Orange: 20 Red: 13

Temp: 31 Violet: 19 Blue: 21 Green: 23 Yellow: 19 Orange: 20 Red: 13

Temp: 30 Violet: 19 Blue: 21 Green: 23 Yellow: 20 Orange: 20 Red: 13

Temp: 30 Violet: 19 Blue: 22 Green: 23 Yellow: 20 Orange: 21 Red: 13
winniiew commented 2 years ago

Loom serial monitor output

Initialized Serial!

= = = = = Parse Config = = = = =

Config Pretty Version:
{
  "general": {
    "name": "Device",
    "instance": 1,
    "interval": 500
  },
  "components": [
    {
      "name": "Analog",
      "params": "default"
    },
    {
      "name": "AS7263",
      "params": "default"
    }
  ]
}
SIZE: 279
= = = = = Generate Objects = = = = =

[Device] Adding Module: Analog
rcpeene commented 2 years ago

This was an issue regarding using the dependencies. The Sparkfun and Adafruit dependencies use different function calls to AS726x.begin(). In Loom, the Adafruit dependency requires a function call like begin(&TwoWire), where TwoWire is the I2C library at play. However, Loom's function call did not have this parameter.