Skip to content

Update README for W3C WoT TD #143

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 29 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,36 @@
webthing-arduino
================

A simple server for the ESP8266, the ESP32, boards with Ethernet, or any
WiFi101-compatible board that implements Mozilla's proposed Web of Things API.
The [LED
example](https://github.com/WebThingsIO/webthing-arduino/blob/master/examples/LED)
exposes an OnOffSwitch named "Built-in LED" which controls the board's built-in
LED. The [LED Lamp
example](https://github.com/WebThingsIO/webthing-arduino/blob/master/examples/LEDLamp)
ups the ante by introducing a `level` property to expose a dimmable Light.
A simple Web of Things Thing Description compatible library, for the ESP32 mainly.
Available examples
- [BME280](/examples/BME280)
- [LED](/examples/LED)
- [OLED display](/examples/TextDisplay)

## Arduino
## Beginner Tutorials

If you need a more extensive explanation of the usage of this library, we have some step by step tutorials available with more context.

### WebThings Arduino + Node-WoT

[Node-WoT](https://github.com/eclipse/thingweb.node-wot) is a Javascript client library to consume Web of Things devices.

- [Show number of Github forks and stars on Matrix display](https://bind.systems/blog/web-of-things-github-forks-stars/)
- [Run speedtest and show results on an OLED display](https://bind.systems/blog/web-of-things-speedtest/)

### WebThings Arduino + Node-RED

[Node-RED](https://nodered.org/) is a drag and drop tool for connecting devices. It requires little Javascript programming knowledge.

- [Connect temperature sensor to OLED display](https://bind.systems/blog/web-of-things-node-red-temperature-oled/)

### WebThings Arduino

- [Blinking LED](https://bind.systems/blog/web-of-things-led/)
- [Matrix display](https://bind.systems/blog/web-of-things-arduino-matrix-display/)
- [OLED display](https://bind.systems/blog/web-of-things-arduino-oled/)
Comment on lines +12 to +33
Copy link
Member

@benfrancis benfrancis Oct 14, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A lot of these tutorials don't seem to have anything to do with the webthing-arduino library and "we" implies some kind of affiliation with the bind.systems website.

I don't think it's a bad thing to link to external tutorials for additional reading, but it would be better to provide some documentation for getting started with the webthing-arduino library directly inside this README, like the existing content of the README.

Contributions to the WebThings docs at https://webthings.io/docs are also welcome!

Copy link
Author

@Citrullin Citrullin Oct 14, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, it's my website. I can change it to "there". That's fine. The tutorials cover how to use the Arduino library with other libraries together. It shows the possibilities of the W3C WoT TD 1.0 standard. You have to flash an app on the Arduino with the WebThings library in order to build these setups. So, it also covers the Arduino library as well.

The README still provides that, if you look to the rest of it. I just want to give new user some practical examples how to use the WoT standard in general and why people should use it.


## Installation

### ESP8266 or ESP32

Expand All @@ -32,29 +52,6 @@ it in your sketchbook's libraries folder.
* MKR1010 (and similar): Install the WiFiNINA library from the Arduino library
manager.

### Continuing onwards

Make sure to install the current release of the ArduinoJson library (6) if you
don't have it installed already.

![ArduinoJson install process](https://github.com/WebThingsIO/webthing-arduino/raw/master/docs/arduinojson.png)

Next, download this library from the same library manager by searching for
`webthing`.

![add zip library and LED example](https://github.com/WebThingsIO/webthing-arduino/raw/master/docs/add-library-open-example.png)

You should be able to upload the example sketch onto your board and use it as a
simple Web Thing. This Web Thing can be talked to using the WoT API or added to
the WebThings Gateway using the "Add Thing by URL" feature. Note that
right now, WiFi101-based Things must be manually added by typing the full URL
to the Web Thing, e.g. `http://192.168.0.103/things/led`.

If you want to create a Web Thing from scratch, make sure to include both
"Thing.h" and "WebThingAdapter.h" (or "EthernetWebThingAdapter.h", if using an
Ethernet board). You can then add Things and Properties to your board using our
proposed API.

Comment on lines -35 to -57
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update this text rather than just removing it. It includes important information.

## PlatformIO

Add the `webthing-arduino` library through PlatformIO's package management
Expand Down