Skip to content

Commit

Permalink
Update README with some documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
nothans committed Dec 10, 2021
1 parent 601d533 commit 242f4f5
Showing 1 changed file with 43 additions and 1 deletion.
44 changes: 43 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,43 @@
# thingspeak-javascript
cheerlights-javascript
=====================

JavaScript client library for connecting to ThingSpeak ( https://thingspeak.com/ ) to get the latest color values for CheerLights ( https://cheerlights.com/ ).

## Usage

Add library to webpage:

```
<script src="cheerlights.js"></script>
```

Use getColor and set a callback:

```
CheerLights.getColor(callbackFunctionName);
```

## Property Values: color

* color.htmlName
* color.hexValue

## Color Values

| htmlName | hexValue |
| --- | ----------- |
| red | #FF0000 |
| green | #008000 |
| blue | #0000FF |
| cyan | #00FFFF |
| white | #FFFFFF |
| oldlace | #FDF5E6 |
| purple | #800080 |
| magenta | #FF00FF |
| yellow | #FFFF00 |
| orange | #FFA500 |
| pink | #FFC0CB |

## Examples

See the [examples folder](https://github.com/cheerlights/cheerlights-javascript/tree/master/examples) for fully-working examples using this library.

0 comments on commit 242f4f5

Please sign in to comment.