<commit_before># esp8266_micropython

Setup the Board:
I used [esptool.py](https://github.com/themadinventor/esptool) to flash the micropython to the board
This is the version of [MicroPython](https://github.com/micropython/micropython/releases/tag/v1.8.5) I used. I'd say just use the most recent one.
Flashing the board is pretty straight forward, the docs for MicroPython tell you what settings you'd need to change if any.

Connecting to the Board:
I used Adafruits [ampy](https://github.com/adafruit/ampy) to put all my files onto the board.
Check out this [tutorial](https://home-assistant.io/blog/2016/07/28/esp8266-and-micropython-part1/) as well.

Issues:
When the nodemcu boots up with MicroPython, it runs "boot.py" and then "main.py". If you run the main function of "colors.py" in "main.py", you'll get stuck in an infinite loop, since its going to be waiting for a publish to a mqtt topic it subscribed to. In order to get rid of this, I just flashed "colors.py" onto the board, typed "screen /dev/tty.SLAB_USBtoUART 115200" and automatically started and stopped the script (helpful for debugging). Another option would be to just add a break, when a certain topic is called. then you'd be able to access the board via ampy, or screen or whatever you're using.

Bugs:
When setting the color in Home Assistant's dev tools, if you send something like "{"color":"red"}" it while go to white then if you press it again, it will go to red. Not sure why.
Brightness of the colors. If you have a color on and then change the brightness, it turns to white.<commit_msg>sloppy readme 2.0<commit_after># esp8266_micropython

Setup the Board:

I used [esptool.py](https://github.com/themadinventor/esptool) to flash the micropython to the board

This is the version of [MicroPython](https://github.com/micropython/micropython/releases/tag/v1.8.5) I used. I'd say just use the most recent one.
Flashing the board is pretty straight forward, the docs for MicroPython tell you what settings you'd need to change if any.


Connecting to the Board:

I used Adafruits [ampy](https://github.com/adafruit/ampy) to put all my files onto the board.

Check out this [tutorial](https://home-assistant.io/blog/2016/07/28/esp8266-and-micropython-part1/) as well.


Issues:

When the nodemcu boots up with MicroPython, it runs "boot.py" and then "main.py". If you run the main function of "colors.py" in "main.py", you'll get stuck in an infinite loop, since its going to be waiting for a publish to a mqtt topic it subscribed to. In order to get rid of this, I just flashed "colors.py" onto the board, typed "screen /dev/tty.SLAB_USBtoUART 115200" and automatically started and stopped the script (helpful for debugging). Another option would be to just add a break, when a certain topic is called. then you'd be able to access the board via ampy, or screen or whatever you're using.


Bugs:

When setting the color in Home Assistant's dev tools, if you send something like "{"color":"red"}" it while go to white then if you press it again, it will go to red. Not sure why.

Brightness of the colors. If you have a color on and then change the brightness, it turns to white.
{'fraction_non_alphanumeric': 0.07874762808349146, 'fraction_numerical': 0.017077798861480076, 'mean_word_length': 4.2716666666666665, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '3154644', 'n_tokens_mistral': 996, 'n_tokens_neox': 922, 'n_words': 469}