Skip to content

Commit

Permalink
docs: rearranged documents a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
todbot committed Oct 23, 2012
1 parent b7f7dfb commit 8203d85
Show file tree
Hide file tree
Showing 27 changed files with 2,238 additions and 67 deletions.
19 changes: 10 additions & 9 deletions README.md
Expand Up @@ -13,20 +13,21 @@ What is in this repo
--------------------
The following directories exist:

- hardware -- all hardware-related info (firmware & schematic)
- docs -- documentation about APIs and such
- commandline -- C library and command-line tools
- java -- Java / Processing library
- processing -- Processing applications (http://processing.org)
- libraries -- libraries common to all systems
- mac -- Mac OS X details and GUI control application
- windows -- Windows and GUI control application
- linux -- Linux details
- java -- Java / Processing library
- processing -- Processing applications (http://processing.org)
- libraries -- compiled libraries common to all systems
- mac -- Mac OS X details and GUI control application
- windows -- Windows details and GUI control application
- linux -- Linux details
- hardware -- all hardware-related info (firmware & schematic)

Some docs that might be useful
------------------------------

- [app-url-api-examples](https://github.com/todbot/blink1/blob/master/app-url-api-examples.md)
- [app-url-api](https://github.com/todbot/blink1/blob/master/app-url-api.md)
- [app-url-api-examples](https://github.com/todbot/blink1/blob/master/docs/app-url-api-examples.md)
- [app-url-api](https://github.com/todbot/blink1/blob/master/docs/app-url-api.md)


More Info
Expand Down
5 changes: 2 additions & 3 deletions commandline/Makefile
Expand Up @@ -15,8 +15,7 @@
# Platform-specific notes:
#
# Mac OS X
# - Install Xcode with Unix Dev Support and Command-line tools
# - Install 'make' from macports (or similar)
# - Install Xcode with "Unix Dev Support" and "Command-line tools"
# - make
#
# Windows XP/7
Expand All @@ -43,7 +42,7 @@
# - exit
#
# Raspberry Pi
# - apt-get install libusb-1.0-dev
# - apt-get install libusb-1.0.0-dev
# - make
#
# BeagleBone / BeagleBoard (on Angstrom Linux)
Expand Down
6 changes: 6 additions & 0 deletions commandline/README.md
@@ -1,9 +1,15 @@
Command-line Tool for blink(1)
==============================

To build, see the Makefile.





Making it a service on Mac OS X
-------------------------------
(note this is a little stale)

to start:
% launchctl load -w ./com.thingm.blink1.plist
Expand Down
1 change: 1 addition & 0 deletions commandline/blink1-tool.c
Expand Up @@ -118,6 +118,7 @@ static void usage(char *myName)
"\n"
"Examples \n"
" blink1-tool -m 100 --rgb 255,0,255 # fade to #FF00FF in 0.1 seconds \n"
" blink1-tool -random 100 # fade to 100 random colors \n"
"\n"
,myName);
}
Expand Down
File renamed without changes.
49 changes: 34 additions & 15 deletions app-url-api.md → docs/app-url-api.md
Expand Up @@ -180,6 +180,9 @@ Base URL: `http://localhost:8080/blink1`
* `/blink1/input/script`
-- Add and Start command-line script executer

* `/blink1/input/scriptlist`
-- List available scripts to run

* `/blink1/input/ifttt`
-- Add and Start watching messages from IFTTT webservice

Expand Down Expand Up @@ -222,7 +225,7 @@ __Description:__ Re-enumerate and List available blink(1) devices
__Query args:__ -none-

__Example:__
`/blink1/enumerate`
`http://localhost:8080/blink1/enumerate`

__Response:__

Expand All @@ -242,11 +245,27 @@ __Query args:__
* `time` : time in seconds to complete fade (e.g. "0.8")

__Example:__
`/blink1/fadeToRGB?rgb=%23FF00FF&time=2.7`
`http://localhost:8080/blink1/fadeToRGB?rgb=%23FF00FF&time=2.7`

__Response:__
Standard JSON 'status' response

/blink1/lastColor
-----------------
__Description:__ Return last fadeToRGB color sent to blink(1).

__Query args:__ -none-

__Example:__
`http://localhost:8080/blink1/lastColor`

__Response:__

{
"lastColor": "#000000",
"status": "lastColor"
}


/blink1/input/
--------------
Expand All @@ -255,7 +274,7 @@ __Description:__ List configured inputs
__Query args:__ 'enable' : "on" == enable all configured inputs, "off" == off

__Example:__
`/blink1/input`
`http://localhost:8080/blink1/input`

__Response:__
(example with several inputs configured)
Expand Down Expand Up @@ -299,7 +318,7 @@ __Query args:__
* `iname` -- input name

__Example:__
`/blink1/input/del?iname=mysqllog`
`http://localhost:8080/blink1/input/del?iname=mysqllog`

__Response:__ Standard JSON 'status' response

Expand All @@ -316,7 +335,7 @@ __Query args:__
* `pname` -- (optional) color pattern name to trigger

__Example:__
`/blink1/input/file?iname=mysqllog&path=/usr/local/mysqlout.txt`
`http://localhost:8080/blink1/input/file?iname=mysqllog&path=/usr/local/mysqlout.txt`

__Response:__ Standard JSON 'status' response

Expand All @@ -333,7 +352,7 @@ __Query args:__
* `pname` -- (optional) color pattern name to trigger

__Example:__
`/blink1/input/url?iname=myarduino&url=http://todbot.com/tst/color.txt`
`http://localhost:8080/blink1/input/url?iname=myarduino&url=http://todbot.com/tst/color.txt`

__Response:__ Standard JSON 'status' response

Expand All @@ -349,7 +368,7 @@ __Query args:__
* `pname` -- (optional) color pattern name to trigger

__Example:__
`/blink1/input/script?iname=checkService&script=CheckServ.bat`
`http://localhost:8080/blink1/input/script?iname=checkService&script=CheckServ.bat`

__Response:__ Standard JSON 'status' response

Expand All @@ -361,7 +380,7 @@ __Description:__ Start watching for messages from IFTTT webservice
__Query args:__ -none-

__Example:__
`/blink1/input/ifttt`
`http://localhost:8080/blink1/input/ifttt`

__Response:__ Standard JSON 'status' response

Expand All @@ -378,7 +397,7 @@ ____Query args:____
* `pname` -- (optional) color pattern name to trigger

__Example:__
`/blink1/input/cpuload?iname=cpu99&level=99`
`http://localhost:8080/blink1/input/cpuload?iname=cpu99&level=99`

__Response:__ Standard JSON 'status' response

Expand All @@ -395,7 +414,7 @@ ____Query args:____
* `pname` -- (optional) color pattern name to trigger

__Example:__
`/blink1/input/cpuload?iname=net95&level=95`
`http://localhost:8080/blink1/input/cpuload?iname=net95&level=95`

__Response:__ Standard JSON 'status' response

Expand All @@ -408,7 +427,7 @@ List saved color patterns
__Query args:__ -none-

__Example:__
`/blink1/pattern/`
`http://localhost:8080/blink1/pattern/`

__Response:__

Expand Down Expand Up @@ -440,7 +459,7 @@ __Query args:__
format: "repeats,color1,color1time,color2,color2time,..."

__Example:__
`/blink1/pattern/add?pname=blink3_red&pattern=3,%23FF0000,1.0,%23000000,1.0`
`http://localhost:8080/blink1/pattern/add?pname=blink3_red&pattern=3,%23FF0000,1.0,%23000000,1.0`

__Response:__ Standard JSON 'status' response

Expand All @@ -455,7 +474,7 @@ __Query args:__
* `pname` -- name of color pattern to delete

__Example:__
`/blink1/pattern/del?pname=blink3_red`
`http://localhost:8080/blink1/pattern/del?pname=blink3_red`

__Response:__ Standard JSON 'status' response

Expand All @@ -470,7 +489,7 @@ __Query args:__
* `pname` -- name of color pattern to play

__Example:__
`/blink1/pattern/play?pname=blink3_red`
`http://localhost:8080/blink1/pattern/play?pname=blink3_red`

__Response:__ Standard JSON 'status' response

Expand All @@ -485,7 +504,7 @@ __Query args:__
* `pname` -- pattern name string

__Example:__
`/blink1/pattern/stop?pname=blink3_red`
`http://localhost:8080/blink1/pattern/stop?pname=blink3_red`

__Response:__ Standard 'status' JSON response

Expand Down
40 changes: 40 additions & 0 deletions docs/blink1-tool.txt
@@ -0,0 +1,40 @@

blink1-tool command-line API
============================

The below is created from capturing the output of "blink1-tool" with no arguments.

Usage:
blink1-tool <cmd> [options]
where <cmd> is one of:
--hidread Read a blink(1) USB HID GetFeature report
--hidwrite <listofbytes> Write a blink(1) USB HID SetFeature report
--eeread <addr> Read an EEPROM byte from blink(1)
--eewrite <addr>,<val> Write an EEPROM byte to blink(1)
--blink <numtimes> Blink on/off
--random <numtimes> Flash a number of random colors
--rgb <red>,<green>,<blue> Fade to RGB value
--savergb <r>,<g>,<b>,<pos> Write pattern RGB value at pos
--readrgb <pos> Read pattern RGB value at pos
--servertickle <on/off> Turn on/off servertickle (uses -t msec)
--on Turn blink(1) full-on white
--off Turn blink(1) off
--list List connected blink(1) devices
--version Display blink(1) firmware version
and [options] are:
-g -nogamma Disable autogamma correction
-d dNums --id all|deviceIds Use these blink(1) ids (from --list)
//--serial <num> Connect to blink(1) by its serial number
-m ms, --miilis=millis Set millisecs for color fading (default 300)
-t ms, --delay=millis Set millisecs between events (default 500)
--vid=vid --pid=pid Specifcy alternate USB VID & PID
-v, --verbose verbose debugging msgs

Examples
blink1-tool -m 100 --rgb 255,0,255 # fade to #FF00FF in 0.1 seconds
blink1-tool -random 100 # fade to 100 random colors





31 changes: 31 additions & 0 deletions docs/javadoc/allclasses-frame.html
@@ -0,0 +1,31 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_35) on Tue Oct 23 15:10:31 PDT 2012 -->
<TITLE>
All Classes
</TITLE>

<META NAME="date" CONTENT="2012-10-23">

<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">


</HEAD>

<BODY BGCOLOR="white">
<FONT size="+1" CLASS="FrameHeadingFont">
<B>All Classes</B></FONT>
<BR>

<TABLE BORDER="0" WIDTH="100%" SUMMARY="">
<TR>
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="thingm/blink1/Blink1.html" title="class in thingm.blink1" target="classFrame">Blink1</A>
<BR>
</FONT></TD>
</TR>
</TABLE>

</BODY>
</HTML>
31 changes: 31 additions & 0 deletions docs/javadoc/allclasses-noframe.html
@@ -0,0 +1,31 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_35) on Tue Oct 23 15:10:31 PDT 2012 -->
<TITLE>
All Classes
</TITLE>

<META NAME="date" CONTENT="2012-10-23">

<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">


</HEAD>

<BODY BGCOLOR="white">
<FONT size="+1" CLASS="FrameHeadingFont">
<B>All Classes</B></FONT>
<BR>

<TABLE BORDER="0" WIDTH="100%" SUMMARY="">
<TR>
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="thingm/blink1/Blink1.html" title="class in thingm.blink1">Blink1</A>
<BR>
</FONT></TD>
</TR>
</TABLE>

</BODY>
</HTML>

0 comments on commit 8203d85

Please sign in to comment.