-
Iron Removal sensor
05/14/2017 at 16:54 • 0 commentsThe initial pass of the iron removal detection is finished. This uses a pair of IR Beam breakers attached to the iron holder. After some experimentation a large binder clip handle was extremely well suited for the job.
The part in question is the HD-DS25CM-3MM. It is a simple digital IR break beam sensor that can be tied directly to one the MCU pins.
See Below:
-
Software Update
05/01/2017 at 19:58 • 0 commentsI am now able to commit messages to Github using their API.
pygit was overkill and I can do everything using requests/json with the API. Here is the code before it has been converted to micropython:
# coding=utf-8 """ Writing this code in regular python before moving to micropython. This code will handle putting commits up on Github for the Github connected Soldering Iron """ import json import requests GITHUB_OAUTH_TOKEN = "your_oauth_token_goes_here" GITHUB_REPO_ADDRESS = "" # For example: "Cabalist/testSolder" commit_message = "First try #2" last_commit = requests.get("https://api.github.com/repos/{}/git/refs/heads/master".format(GITHUB_REPO_ADDRESS), params={"access_token": GITHUB_OAUTH_TOKEN}) last_commit_sha = last_commit.json()['object']['sha'] r = requests.post("https://api.github.com/repos/{}/git/commits".format(GITHUB_REPO_ADDRESS), params={"access_token": GITHUB_OAUTH_TOKEN}, json={"message": commit_message, "parents": [last_commit_sha], "tree": "4b825dc642cb6eb9a060e54bf8d69288fbee4904"}) # This is the empty folder SHA in git commit_sha = r.json()['sha'] r2 = requests.patch("https://api.github.com/repos/{}/git/refs/heads/master".format(GITHUB_REPO_ADDRESS), params={"access_token": GITHUB_OAUTH_TOKEN}, headers={'content-type': 'application/json'}, data=json.dumps({"sha": commit_sha, "force": True}))
-
First Code Talk
05/01/2017 at 03:23 • 0 commentsMy first steps to get this code working:
1) Explore the `Timer` class in Micropython or the `time` module. Can this handle 1hr+ events?
2) Port some minimal piece of pure python git to MicroPython. This code here is probably the most adaptable. https://github.com/benhoyt/pygit Gonna have to go at it with a machete...
3) Create voltage sensing code using one of the SCT-013-000 Non-invasive AC Current Sensor Split Core Transformers.