Giter VIP home page Giter VIP logo

esp8266button's Introduction

esp8266 IoT Button using Github Actions

Enclosure Assembly Customized Project Enclosure - Thingiverse

Tested with Adafruit Huzzah, Sparkfun Thing and WEMOS D1 Mini

Software

An IoT Button using an ESP8266 WiFI microcontroller, a push button and github actions. POSTS to a GitHub Actions Workflow dispatch event endpoint which updates a comment on an issue specific to each button.

I originally built this project using the IFTTT maker channel sending text messages, then switched to updating a github issue once text messages were no longer free. Now that IFTTT itself is no longer free I wrote a third sketch using GitHub Actions. This makes for a simpler demo anyways as the only service involved is GitHub and everything is stored in code. You can see the ReadMe with instructions from the original IFTTT project here.

The github actions workflow YML file update-issue-comment.yml is also in this repository and you can see the button press comments on the issue i have created for my SparkFun Thing button.

You will need the following settings in the arduino sketch esp8266_iot_button_actions.ino

    // WiFi and GitHub Variables
    const char* ssid = "YOUR_SSID"; // SSID For the WiFi network you want to connect to
    const char* password = "YOUR_PSK"; // PSK For the WiFi network you want to connect to
    const char* github_user = "YOUR_GITHUB_USERNAME"; // GitHub User for running action
    const char* github_repo = "YOUR_GITHUB_REPO"; // GitHub Repo where action lives
    const char* github_token = "YOUR_GITHUB_TOKEN"; // GitHub Authorization Token
    const char* github_workflow_id = "YOUR_WORKFLOW_YML_FILE"; // Workflow YML file name
    const char* host = "api.github.com"; // Server from which data is to be fetched
    const int httpsPort = 443; // Default port for HTTPS 

You will also need to copy the YML from the action in this repository and create a new issue where the comments from the button will go. The issue number in the YML file should be updated to the number of the newly created issue.

Hardware

I soldered male pins on my Huzzah, and added female headers to my Sparkfun Thing. The thing did not come with any headers and male headers were included with the Huzzah.

I was able to program both with my FTDI Friend, you will need to cut the default RTS jumper on the back of the FTDI Friend (used by the Huzzah) and connect the DTR jumper to program the thing. Once cut it has been pretty easy to switch back and forth by soldering the jumpers as needed.

Enclosure Assembly

The built in battery and charging circuit on the ESP8266 Thing really makes it easy to work with. By cutting the DTR trace on the bottom of the board and installing pins for a jumper I am able to program the thing with the jumper installed, and debug over serial with it removed.

Enclosure Assembly

BOM

Adafruit Huzzah

Sparkfun Thing

Enclosure

Using this awesome Parametric and Customizable Project Enclosure I made customized enclosures that fit the parts I was using for my buttons.

Customized  Project Enclosure

Customized Project Enclosure - Thingiverse

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.