IoT button

This module is designed to develop a Smart Button, the module has a button and 4 RGB LEDs - WS2812B. This module is only compatible with OBJEX Link v1.0 and higher but not with OBJEX Link v1.6-C3 (But with a simple circuit modification it is possible to make it compatible).

This module is open source, you can find all the production files here.

Type M1E(IoT button with I2C EEPROM)

This version of the button module has an EEPROM that allows you to save information about the module itself. Therefore, it is possible, for example, to assign a unique ID to the module to enable more complex integrations such as assigning a specific function to a module.

Type A

Type B

pinout(type A/B)

Button pin = GPIO15

LEDs RGB Data = GPIO23

For proper use of IoT Button type A/B modules, it is recommended that you do not touch the solder joints with your hands or any conductive surface. Also, when using OBJEX Flex, it is recommended not to flex the cables when the board running.

Example 1: IoT Button + deep sleep mode

RTC_DATA_ATTR int boot = 0;

#include <Adafruit_NeoPixel.h>
#define LED_PIN    23
#define LED_COUNT 5
Adafruit_NeoPixel leds(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800);


void setup() {
  //deepsleep
  ++boot;
  // 0x8000 => 2^15 in hex => GPIO15
  esp_sleep_enable_ext1_wakeup(0x8000,ESP_EXT1_WAKEUP_ANY_HIGH); 
  // WS2812B-2020 init
  leds.begin(); 
  leds.setBrightness(0);          
  leds.show();   
}


void loop() {  
  rgb(250);          
  esp_deep_sleep_start();
}

void rgb(int wait){
  leds.setBrightness(50);
  for(int i = 0; i < leds.numPixels(); i++){
     leds.setPixelColor(i, 0, 255, 0);
     leds.show();
     delay(wait); 
  }
  leds.setBrightness(0); 
  leds.show();  
}

Last updated