Hello I2C

Parts used:
M5 Atom
M5 Env II/III/IV unit with SHT30 and xxx
USB Cable
PH2.0-4P interface cable

  1. Once you have installed wifi and mqtt you can continue installing an I2C sensor. Of course you can still use the usb to continue.
  2. Connect the M5 Env III to the M5 Atom via the HY2.0 cable.
  3. Configure the I2C Port. Goto “Config” pane and enter SDA(26) and SCL(32) pins. “startEnabled” must be checked.
  4. Click “Save” button.
  5. Also make sure that the driver is enabled for that session. Click “en” next to the driver in the second column.
  6. Goto the “Control” pane select the I2C port and click the button scan. You should see some i2C addresses.

Gratulation your I2C port is set up! Now lets just add a I2C device

  1. Drag and Drop the SHT30 and/or xxx driver icons from the Library list onto the Driver Installed panel.
  2. Click on SHT30 and select the “Config” button from the ButtonBar.
  3. Enter the I2c address in the config pane. In this case it is 68 for the SHT30. i2C2
  4. Now select “startEnabled” and save the configuration
  5. Goto the “Control” pane
  6. Select the sensor and select the “En” (Enable) checkbox next to it to activate the sensor
  7. Repeat the steps 3 to 6 with the other sensor
  8. Select the sensor and click the “Control” button. You should get a read out.
  9. Now create an event so that the sensor is repeatedly reporting the value to the Designer application. To do so follow the next steps

Adding an Event

  1. Click the sensor you want to get the event from
  2. Select in the toolbar the “Events” button
  3. In the event pane click the “add”New” button
  4. Select the timer in the popup “Condition”. In the value enter 5000 (5seconds)
  5. In the code box between the 2 brackets enter a line “me.reportTo(“username”,”username”,”designer”);
    If you want to have the event on startup running then check “onStartEnable”
  6. Click Save
  7. This will send every 5 seconds a message to your designer with all the values.
  8. If you want to start the events for this session select the “en” (enabled) next to the event.
  9. In the “Control pane” you will see a new reading every 5 seconds.

Now you are ready for the “Naked Chef Projects