<commit_before># iotsa board - your tiny IoT web server

Congratulations with your new iotsa WiFi web server,
ready for you to start building strange and wondrous Internet of Things devices!

![image of iotsa board with NeoPixel](images/iotsaBoard.JPG)

Maybe your board has the NeoPixel multicolor LED, maybe not. Maybe your board is in a case, maybe not. Maybe your board has the headers, maybe not.

## Getting started

You need a power supply, 5V 350mA, with + on the inside and - on the outside, coaxial 5.5mm x 2.5mm (this is one of the most common 5V power connectors). A larger power supply (up to 18V) is okay if you need that for any other electronics you add (and you may need higher current too, in that case).

The first time you power the iotsa board it will create a WiFi network with a name similar to _config-iotsa1234_. Connect a computer (or smartphone) to that network and visit <http://192.168.4.1>. You will see a web page titled **Iotsa LED Server** (or, possibly, **Iotsa Hello World Server** if you have a iotsa without the NeoPixel).

Go to the [/wificonfig](http://192.168.4.1/wificonfig) page and fill in the name of your Wifi network, the password of your WiFi network and the name you want to use for your iotsa. For the latter use only normal _internet host name_ characters: letters, digits, hyphen, underscore. For example, if you enter _rgbled_ here the device will have the internet address of <http://rgbled.local/>. (Note that if your computer is an older Windows computer you may need to install _mDns_ software to be able to use the _rgbled.local_ address).

After filling in the details press _Submit_ and the device will reboot. It should now connect to your Wifi network and you can browse to it at <http://rgbled.local/>. If you visit the _/led_ page you can make the LED blink or light up in a color you specify in hexadecimal (_ff0000_ for red, _00ff00_ for green, etc). If you have the _Hello World Server_ there is no LED to flash, but you can go to _/hello_ and enter your name, the device will then greet you by name on the homepage).

## Programming
To do fun things with the iotsa board you will need to do some programming, and probably some hardware construction:

* For programming you need the [Arduino IDE](https://arduino.cc), <https://arduino.cc>. You need the version for your computer, not the web version. The Arduino website also has lots of information on getting started with programming Arduino-like devices (such as your iotsa board).
* You also need to install the [ESP8266 support for the Arduino IDE](https://github.com/esp8266/Arduino), <https://github.com/esp8266/Arduino> additions. And again that website has documentation on all the extra features (such as WiFi) that esp8266 devices (such as your iotsa board) give you access to.
* You need to install the [iotsa library](https://github.com/cwi-dis/iotsa), <https://github.com/cwi-dis/iotsa>.<commit_msg>Added minimal documentation on status showing<commit_after># iotsa board - your tiny IoT web server

Congratulations with your new iotsa WiFi web server,
ready for you to start building strange and wondrous Internet of Things devices!

![image of iotsa board with NeoPixel](images/iotsaBoard.JPG)

Maybe your board has the NeoPixel multicolor LED, maybe not. Maybe your board is in a case, maybe not. Maybe your board has the headers, maybe not.

## Getting started

You need a power supply, 5V 350mA, with + on the inside and - on the outside, coaxial 5.5mm x 2.5mm (this is one of the most common 5V power connectors). A larger power supply (up to 18V) is okay if you need that for any other electronics you add (and you may need higher current too, in that case).

The first time you power the iotsa board it will create a WiFi network with a name similar to _config-iotsa1234_. Connect a computer (or smartphone) to that network and visit <http://1172.16.58.3>. You will see a web page titled **Iotsa LED Server** (or, possibly, **Iotsa Hello World Server** if you have a iotsa without the NeoPixel).

Go to the [/wificonfig](http://192.168.4.1/wificonfig) page and fill in the name of your Wifi network, the password of your WiFi network and the name you want to use for your iotsa. For the latter use only normal _internet host name_ characters: letters, digits, hyphen, underscore. For example, if you enter _rgbled_ here the device will have the internet address of <http://rgbled.local/>. (Note that if your computer is an older Windows computer you may need to install _mDns_ software to be able to use the _rgbled.local_ address).

After filling in the details press _Submit_ and the device will reboot. It should now connect to your Wifi network and you can browse to it at <http://rgbled.local/>. If you visit the _/led_ page you can make the LED blink or light up in a color you specify in hexadecimal (_ff0000_ for red, _00ff00_ for green, etc). If you have the _Hello World Server_ there is no LED to flash, but you can go to _/hello_ and enter your name, the device will then greet you by name on the homepage).

## Status LED

If your iotsa board has the NeoPixel LED the board will communicate exception status conditions (during normal operation the LED will be off, unless programmed differently). The following patterns have the following meaning:

- _Orange_: the board is trying to connect to the configured WiFi network.
- _Yellow (flashing)_: the board is in configuration mode (at address `192.168.4.1` on its private WiFi network) because it has not been configured yet or because its configured WiFi network is unavailable.
- _Purple (flashing)_: the board is in configuration mode (at address `192.168.4.1` on its private WiFi network) because you asked it to go to configuration mode.
- _Magenta (flashing)_: the board is in OTA-programming mode.
- _Red_: the board is doing a factory reset.

## Programming
To do fun things with the iotsa board you will need to do some programming, and probably some hardware construction:

* For programming you need the [Arduino IDE](https://arduino.cc), <https://arduino.cc>. You need the version for your computer, not the web version. The Arduino website also has lots of information on getting started with programming Arduino-like devices (such as your iotsa board).
* You also need to install the [ESP8266 support for the Arduino IDE](https://github.com/esp8266/Arduino), <https://github.com/esp8266/Arduino> additions. And again that website has documentation on all the extra features (such as WiFi) that esp8266 devices (such as your iotsa board) give you access to.
* You need to install the [iotsa library](https://github.com/cwi-dis/iotsa), <https://github.com/cwi-dis/iotsa>.
{'fraction_non_alphanumeric': 0.06387434554973823, 'fraction_numerical': 0.01899775617053104, 'mean_word_length': 4.264566929133858, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 12, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 6, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6163203', 'n_tokens_mistral': 1936, 'n_tokens_neox': 1784, 'n_words': 1045}