Skip to content

Commit

Permalink
updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
sgreene570 committed Dec 2, 2016
1 parent 0f710bc commit 6f3e073
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Empty file modified LICENSE.txt
100644 → 100755
Empty file.
Empty file modified README.md
100644 → 100755
Empty file.
12 changes: 6 additions & 6 deletions colorhandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@


REDPIN = 22
BLUEPIN = 23
GREENPIN = 24
GREENPIN = 23
BLUEPIN = 24


@app.route("/set", methods=["POST"])
Expand All @@ -36,16 +36,16 @@ def turnOutputOff():
@app.route("/")
def index():
#basic instructions for connection to /
return jsonify({"MOLS Help Request"},
return jsonify({"/" : "MOLS Help Request"},
{"/set" : "Color=FFFFFF (6 digit hex format, no # sign)"},
{"/setOff" : "No params: turns lights off (hex value 000000)"})


def setColor(color):
f = openFile()
red = REDPIN + "=" + "%.3f" % (int(color[:2], 16) / 255.0)
green = GREENPIN + "=" + "%.3f" % (int(color[2:4], 16) / 255.0)
blue = BLUEPIN + "=" + "%.3f" % (int(color[4:], 16) / 255.0)
red = str(REDPIN) + "=" + "%.3f" % (int(color[:2], 16) / 255.0)
green = str(GREENPIN) + "=" + "%.3f" % (int(color[2:4], 16) / 255.0)
blue = str(BLUEPIN) + "=" + "%.3f" % (int(color[4:], 16) / 255.0)
print(red, file=f)
print(green, file=f)
print(blue, file=f)
Expand Down

0 comments on commit 6f3e073

Please sign in to comment.