{
  "Config": {
    "Build": {
      "Board": "esp32:esp32:esp32s3:UploadSpeed=921600,USBMode=hwcdc,CDCOnBoot=cdc,MSCOnBoot=default,DFUOnBoot=default,UploadMode=default,CPUFreq=240,FlashMode=qio,FlashSize=4M,PartitionScheme=no_fs,DebugLevel=none,PSRAM=disabled,LoopCore=1,EventsCore=1,EraseFlash=none,JTAGAdapter=default,ZigbeeMode=default"
    }
  },
  "Units": [
    {
      "Name": "__OpenWireRootUnit__",
      "Selection": [
        "Arduino"
      ],
      "Links": [
        {
          "Routed": true,
          "Begin": {
            "ID": "Arduino.Modules._Item0.Sockets._Item0.ConnectedOutputPin",
            "Y": 592,
            "X": 864
          },
          "Name": "TOWELink1",
          "End": {
            "ID": "Delay1.StartInputPin",
            "Y": 480,
            "X": 960
          },
          "Points": [
            {
              "Y": 592,
              "X": 912
            },
            {
              "Y": 480,
              "X": 912
            }
          ]
        },
        {
          "Routed": true,
          "Begin": {
            "ID": "Delay2.OutputPin",
            "Y": 528,
            "X": 560
          },
          "Name": "TOWELink2",
          "End": {
            "ID": "Arduino.Modules._Item0.Sockets._Item0.DisconnectInputPin",
            "Y": 576,
            "X": 624
          },
          "Points": [
            {
              "Y": 528,
              "X": 592
            },
            {
              "Y": 576,
              "X": 592
            }
          ]
        },
        {
          "Routed": true,
          "Begin": {
            "ID": "CharToText1.OutputPin",
            "Y": 576,
            "X": 1088
          },
          "Name": "TOWELink3",
          "End": {
            "ID": "SplitJSON1.InputPin",
            "Y": 576,
            "X": 1120
          }
        },
        {
          "Routed": true,
          "Begin": {
            "ID": "Arduino.Modules._Item0.Sockets._Item0.OutputPin",
            "Y": 576,
            "X": 864
          },
          "Name": "TOWELink4",
          "End": {
            "ID": "CharToText1.InputPin",
            "Y": 576,
            "X": 960
          }
        },
        {
          "Routed": true,
          "Begin": {
            "ID": "SplitJSON1.Elements._Item0.OutputPin",
            "Y": 608,
            "X": 1248
          },
          "Name": "TOWELink5",
          "End": {
            "ID": "MapRange1.InputPin",
            "Y": 592,
            "X": 1296
          },
          "Points": [
            {
              "Y": 608,
              "X": 1264
            },
            {
              "Y": 592,
              "X": 1264
            }
          ]
        },
        {
          "Routed": true,
          "Begin": {
            "ID": "SplitJSON1.Elements._Item2.OutputPin",
            "Y": 672,
            "X": 1248
          },
          "Name": "TOWELink6",
          "End": {
            "ID": "MapRange3.InputPin",
            "Y": 720,
            "X": 1296
          },
          "Points": [
            {
              "Y": 672,
              "X": 1280
            },
            {
              "Y": 720,
              "X": 1280
            }
          ]
        },
        {
          "Routed": true,
          "Begin": {
            "ID": "SplitJSON1.Elements._Item1.OutputPin",
            "Y": 640,
            "X": 1248
          },
          "Name": "TOWELink7",
          "End": {
            "ID": "MapRange2.InputPin",
            "Y": 656,
            "X": 1296
          },
          "Points": [
            {
              "Y": 640,
              "X": 1264
            },
            {
              "Y": 656,
              "X": 1264
            }
          ]
        },
        {
          "Routed": true,
          "Begin": {
            "ID": "MapRange2.OutputPin",
            "Y": 656,
            "X": 1392
          },
          "Name": "TOWELink8",
          "End": {
            "ID": "AnalogToColor1.GreenInputPin",
            "Y": 672,
            "X": 1472
          },
          "Points": [
            {
              "Y": 656,
              "X": 1408
            },
            {
              "Y": 672,
              "X": 1408
            }
          ]
        },
        {
          "Routed": true,
          "Begin": {
            "ID": "MapRange1.OutputPin",
            "Y": 592,
            "X": 1392
          },
          "Name": "TOWELink9",
          "End": {
            "ID": "AnalogToColor1.RedInputPin",
            "Y": 656,
            "X": 1472
          },
          "Points": [
            {
              "Y": 592,
              "X": 1440
            },
            {
              "Y": 656,
              "X": 1440
            }
          ]
        },
        {
          "Routed": true,
          "Begin": {
            "ID": "MapRange3.OutputPin",
            "Y": 720,
            "X": 1392
          },
          "Name": "TOWELink10",
          "End": {
            "ID": "AnalogToColor1.BlueInputPin",
            "Y": 640,
            "X": 1472
          },
          "Points": [
            {
              "Y": 720,
              "X": 1424
            },
            {
              "Y": 640,
              "X": 1424
            }
          ]
        },
        {
          "Routed": true,
          "Begin": {
            "ID": "AnalogToColor1.OutputPin",
            "Y": 640,
            "X": 1584
          },
          "Name": "TOWELink11",
          "End": {
            "ID": "NeoPixels1.PixelGroups._Item0.ColorInputPin",
            "Y": 960,
            "X": 272
          },
          "Points": [
            {
              "Y": 640,
              "X": 1600
            },
            {
              "Y": 128,
              "X": 1600
            },
            {
              "Y": 128,
              "X": 128
            },
            {
              "Y": 960,
              "X": 128
            }
          ]
        },
        {
          "Routed": true,
          "Begin": {
            "ID": "Delay1.OutputPin",
            "Y": 464,
            "X": 1072
          },
          "Name": "TOWELink12",
          "End": {
            "ID": "TextValue1.ClockInputPin",
            "Y": 592,
            "X": 256
          },
          "Points": [
            {
              "Y": 464,
              "X": 1088
            },
            {
              "Y": 176,
              "X": 1088
            },
            {
              "Y": 176,
              "X": 240
            },
            {
              "Y": 592,
              "X": 240
            }
          ]
        },
        {
          "Routed": true,
          "Begin": {
            "ID": "TextValue1.OutputPin",
            "Y": 592,
            "X": 368
          },
          "Name": "TOWELink13",
          "End": {
            "ID": "Arduino.Modules._Item0.Sockets._Item0.InputPin",
            "Y": 608,
            "X": 624
          },
          "Points": [
            {
              "Y": 592,
              "X": 400
            },
            {
              "Y": 608,
              "X": 400
            }
          ]
        },
        {
          "Routed": true,
          "Begin": {
            "ID": "TextValue1.OutputPin",
            "Y": 592,
            "X": 368
          },
          "Name": "TOWELink14",
          "End": {
            "ID": "Delay2.StartInputPin",
            "Y": 544,
            "X": 448
          },
          "Points": [
            {
              "Y": 592,
              "X": 400
            },
            {
              "Y": 544,
              "X": 400
            }
          ]
        },
        {
          "Routed": true,
          "Begin": {
            "ID": "SplitJSON1.Elements._Item3.OutputPin",
            "Y": 704,
            "X": 1248
          },
          "Name": "TOWELink15",
          "End": {
            "ID": "MapRange4.InputPin",
            "Y": 784,
            "X": 1296
          },
          "Points": [
            {
              "Y": 704,
              "X": 1264
            },
            {
              "Y": 784,
              "X": 1264
            }
          ]
        },
        {
          "Routed": true,
          "Begin": {
            "ID": "MapRange4.OutputPin",
            "Y": 784,
            "X": 1392
          },
          "Name": "TOWELink16",
          "End": {
            "ID": "IgnoreValues1.InputPin",
            "Y": 784,
            "X": 1440
          }
        },
        {
          "Routed": true,
          "Begin": {
            "ID": "IgnoreValues1.OutputPin",
            "Y": 784,
            "X": 1552
          },
          "Name": "TOWELink17",
          "End": {
            "ID": "NeoPixels1.BrightnessInputPin",
            "Y": 992,
            "X": 272
          },
          "Points": [
            {
              "Y": 784,
              "X": 1664
            },
            {
              "Y": 160,
              "X": 1664
            },
            {
              "Y": 160,
              "X": 176
            },
            {
              "Y": 992,
              "X": 176
            }
          ]
        },
        {
          "Routed": true,
          "Begin": {
            "ID": "NeoPixels1.OutputPin",
            "Y": 928,
            "X": 416
          },
          "Name": "TOWELink18",
          "End": {
            "ID": "Arduino.Digital._Item2.DigitalInputPin",
            "Y": 2352,
            "X": 624
          },
          "Points": [
            {
              "Y": 928,
              "X": 512
            },
            {
              "Y": 2352,
              "X": 512
            }
          ]
        }
      ],
      "*": [
        {
          "Name": "Arduino",
          "Width": 240,
          "Instance": {
            "Digital": {
              "*": [
                {
                  "+": "TArduinoPullDownDigitalPWMInterruptChannel"
                },
                {
                  "+": "TArduinoPullDownDigitalPWMInterruptChannel"
                },
                {
                  "DigitalInputPin": {
                    "SourcePin": {
                      "ID": "__OpenWireRootUnit__.NeoPixels1.OutputPin"
                    }
                  },
                  "+": "TArduinoCombinedTouchPullUpPullOpenDrainDownAnalogDigitalInterruptChannel"
                },
                {
                  "+": "TArduinoCombinedTouchPullUpPullOpenDrainDownAnalogDigitalInterruptChannel"
                },
                {
                  "+": "TArduinoCombinedTouchPullUpPullOpenDrainDownAnalogDigitalInterruptChannel"
                },
                {
                  "+": "TArduinoCombinedTouchPullUpPullOpenDrainDownAnalogDigitalInterruptChannel"
                },
                {
                  "+": "TArduinoCombinedTouchPullUpPullOpenDrainDownAnalogDigitalInterruptChannel"
                },
                {
                  "+": "TArduinoCombinedTouchPullUpPullOpenDrainDownAnalogDigitalInterruptChannel"
                },
                {
                  "+": "TArduinoCombinedPullDownAnalogDigitalChannel"
                },
                {
                  "+": "TArduinoCombinedPullDownAnalogDigitalChannel"
                },
                {
                  "+": "TArduinoPullDownDigitalPWMInterruptChannel"
                },
                {
                  "+": "TArduinoPullDownDigitalPWMInterruptChannel"
                },
                {
                  "+": "TArduinoPullDownDigitalPWMInterruptChannel"
                },
                {
                  "+": "TArduinoPullDownDigitalPWMInterruptChannel"
                },
                {
                  "+": "TArduinoCombinedTouchPullUpPullOpenDrainDownAnalogDigitalInterruptChannel"
                },
                {
                  "+": "TArduinoCombinedTouchPullUpPullOpenDrainDownAnalogDigitalInterruptChannel"
                },
                {
                  "+": "TArduinoCombinedTouchPullUpPullOpenDrainDownAnalogDigitalInterruptChannel"
                },
                {
                  "+": "TArduinoCombinedTouchPullUpPullOpenDrainDownAnalogDigitalInterruptChannel"
                },
                {
                  "+": "TArduinoCombinedTouchPullUpPullOpenDrainDownAnalogDigitalInterruptChannel"
                },
                {
                  "+": "TArduinoCombinedTouchPullUpPullOpenDrainDownAnalogDigitalInterruptChannel"
                },
                {
                  "+": "TArduinoCombinedTouchPullUpPullOpenDrainDownAnalogDigitalInterruptChannel"
                },
                {
                  "+": "TArduinoCombinedTouchPullUpPullOpenDrainDownAnalogDigitalInterruptChannel"
                },
                {
                  "+": "TArduinoPullDownDigitalPWMInterruptChannel"
                },
                {
                  "+": "TArduinoPullDownDigitalPWMInterruptChannel"
                },
                {
                  "+": "TArduinoPullDownDigitalPWMInterruptChannel"
                },
                {
                  "+": "TArduinoPullDownDigitalPWMInterruptChannel"
                },
                {
                  "+": "TArduinoPullDownDigitalPWMInterruptChannel"
                },
                {
                  "+": "TArduinoPullDownDigitalPWMInterruptChannel"
                }
              ]
            },
            "Modules": {
              "*": [
                {
                  "AccessPoint": {
                    "SSID": "",
                    "Password": ""
                  },
                  "AccessPoints": {
                    "*": [
                      {
                        "SSID": "WiFihotspot",
                        "Name": "Access Point1",
                        "Password": "password",
                        "+": "TArduinoESP32WiFiModuleRemoteAccessPoint"
                      }
                    ]
                  },
                  "ESPNow": {
                    "PrimaryKey": {
                      "_Data": ""
                    }
                  },
                  "HostName": "NeoPixel",
                  "Sockets": {
                    "*": [
                      {
                        "Name": "TCP Server1",
                        "DisconnectInputPin": {
                          "SourcePins": [
                            {
                              "ID": "__OpenWireRootUnit__.Delay2.OutputPin"
                            }
                          ]
                        },
                        "OutputPin": {
                          "SinkPins": [
                            {
                              "ID": "__OpenWireRootUnit__.CharToText1.InputPin"
                            }
                          ]
                        },
                        "ConnectedOutputPin": {
                          "SinkPins": [
                            {
                              "ID": "__OpenWireRootUnit__.Delay1.StartInputPin"
                            }
                          ]
                        },
                        "InputPin": {
                          "SourcePins": [
                            {
                              "ID": "__OpenWireRootUnit__.TextValue1.OutputPin"
                            }
                          ]
                        },
                        "+": "TArduinoESP32WiFiTCPServerSocket"
                      }
                    ]
                  },
                  "Ethernet": {
                    "HostName": ""
                  },
                  "+": "TArduinoESP32WiFiModule"
                },
                {
                  "+": "TArduinoEEPROMModule"
                },
                {
                  "+": "TArduinoESP32_S3ProcessorModule"
                },
                {
                  "DeviceName": "",
                  "+": "TArduinoESP32BluetoothLEModule"
                },
                {
                  "+": "TArduinoESP32_S3_MouseModule"
                },
                {
                  "+": "TArduinoESP32_S3_KeyboardModule"
                },
                {
                  "+": "TArduinoESP32S3_CanBusModule"
                },
                {
                  "+": "TArduinoESP32MatterModule"
                },
                {
                  "Channels": {
                    "*": [
                      {
                        "+": "TArduinoNanoESP32_Board_LED_RGB_Red"
                      },
                      {
                        "+": "TArduinoNanoESP32_Board_LED_RGB_Green"
                      },
                      {
                        "+": "TArduinoNanoESP32_Board_LED_RGB_Blue"
                      }
                    ]
                  },
                  "+": "TArduinoNanoESP32_Board_LED_RGB"
                }
              ]
            },
            "I2SChannels": {
              "*": [
                {
                  "+": "TArduino_ESP32_S3_I2SPDM"
                },
                {
                  "+": "TArduino_ESP32_S3_I2SPDM"
                }
              ]
            },
            "I2CChannels": {
              "*": [
                {
                  "+": "TArduinoNanoESP32_Board_I2C"
                },
                {
                  "+": "TArduinoESP32_Generic_I2C_2"
                }
              ]
            },
            "SPIChannels": {
              "*": [
                {
                  "+": "TArduinoNanoESP32_Board_SPI"
                },
                {
                  "+": "TArduinoESP32_Generic_SPI1"
                },
                {
                  "+": "TArduinoESP32_Generic_SPI2"
                }
              ]
            },
            "Serial": {
              "*": [
                {
                  "+": "TArduinoEssentialESP32_S3_USBSerial"
                },
                {
                  "+": "TArduinoHardwareSerialESP32_S3_Serial"
                },
                {
                  "+": "TArduinoHardwareSerialESP32_S3_Serial1"
                },
                {
                  "+": "TArduinoHardwareSerialESP32_S3_Serial2"
                }
              ]
            },
            "BoardType": "Arduino Nano ESP32",
            "+": "TArduinoBoard"
          },
          "X": 624,
          "Height": 3472,
          "Y": 256,
          "Type": "Component"
        },
        {
          "Name": "Delay1",
          "Width": 112,
          "Instance": {
            "Interval": 200000,
            "StartInputPin": {
              "SourcePins": [
                {
                  "ID": "__OpenWireRootUnit__.Arduino.Modules._Item0.Sockets._Item0.ConnectedOutputPin",
                  "Name": "__OpenWireRootUnit__.Arduino.Modules.WiFi.Sockets.TCP Server1 [80].ConnectedOutputPin"
                }
              ]
            },
            "OutputPin": {
              "SinkPins": [
                {
                  "ID": "__OpenWireRootUnit__.TextValue1.ClockInputPin"
                }
              ]
            },
            "+": "TArduinoDelay"
          },
          "X": 960,
          "Height": 64,
          "Y": 432,
          "Type": "Component"
        },
        {
          "Name": "Delay2",
          "Width": 112,
          "Instance": {
            "StartInputPin": {
              "SourcePins": [
                {
                  "ID": "__OpenWireRootUnit__.TextValue1.OutputPin"
                }
              ]
            },
            "OutputPin": {
              "SinkPins": [
                {
                  "ID": "__OpenWireRootUnit__.Arduino.Modules._Item0.Sockets._Item0.DisconnectInputPin",
                  "Name": "__OpenWireRootUnit__.Arduino.Modules.WiFi.Sockets.TCP Server1 [80].DisconnectInputPin"
                }
              ]
            },
            "+": "TArduinoDelay"
          },
          "X": 448,
          "Height": 64,
          "Y": 496,
          "Type": "Component"
        },
        {
          "Name": "SplitJSON1",
          "Width": 128,
          "Instance": {
            "Elements": {
              "*": [
                {
                  "Name": "r",
                  "OutputPin": {
                    "SinkPins": [
                      {
                        "ID": "__OpenWireRootUnit__.MapRange1.InputPin"
                      }
                    ]
                  },
                  "+": "TArduinoSplitJSONUnsignedElement"
                },
                {
                  "Name": "g",
                  "OutputPin": {
                    "SinkPins": [
                      {
                        "ID": "__OpenWireRootUnit__.MapRange2.InputPin"
                      }
                    ]
                  },
                  "+": "TArduinoSplitJSONUnsignedElement"
                },
                {
                  "Name": "b",
                  "OutputPin": {
                    "SinkPins": [
                      {
                        "ID": "__OpenWireRootUnit__.MapRange3.InputPin"
                      }
                    ]
                  },
                  "+": "TArduinoSplitJSONUnsignedElement"
                },
                {
                  "Name": "br",
                  "OutputPin": {
                    "SinkPins": [
                      {
                        "ID": "__OpenWireRootUnit__.MapRange4.InputPin"
                      }
                    ]
                  },
                  "+": "TArduinoSplitJSONUnsignedElement"
                }
              ]
            },
            "InputPin": {
              "SourcePin": {
                "ID": "__OpenWireRootUnit__.CharToText1.OutputPin"
              }
            },
            "+": "TArduinoSplitJSON"
          },
          "X": 1120,
          "Height": 256,
          "Y": 544,
          "Type": "Component"
        },
        {
          "Name": "CharToText1",
          "Width": 128,
          "Instance": {
            "OutputPin": {
              "SinkPins": [
                {
                  "ID": "__OpenWireRootUnit__.SplitJSON1.InputPin"
                }
              ]
            },
            "UpdateOnEachChar": true,
            "Truncate": true,
            "InputPin": {
              "SourcePin": {
                "ID": "__OpenWireRootUnit__.Arduino.Modules._Item0.Sockets._Item0.OutputPin",
                "Name": "__OpenWireRootUnit__.Arduino.Modules.WiFi.Sockets.TCP Server1 [80].OutputPin"
              }
            },
            "+": "TArduinoCharToText"
          },
          "X": 960,
          "Height": 96,
          "Y": 544,
          "Type": "Component"
        },
        {
          "Name": "MapRange1",
          "Width": 96,
          "Instance": {
            "OutputPin": {
              "SinkPins": [
                {
                  "ID": "__OpenWireRootUnit__.AnalogToColor1.RedInputPin"
                }
              ]
            },
            "InputRange": {
              "Max": 255
            },
            "InputPin": {
              "SourcePin": {
                "ID": "__OpenWireRootUnit__.SplitJSON1.Elements._Item0.OutputPin",
                "Name": "__OpenWireRootUnit__.SplitJSON1.Elements.r.OutputPin"
              }
            },
            "+": "TArduinoMapRange"
          },
          "X": 1296,
          "Height": 48,
          "Y": 560,
          "Type": "Component"
        },
        {
          "Name": "MapRange3",
          "Width": 96,
          "Instance": {
            "OutputPin": {
              "SinkPins": [
                {
                  "ID": "__OpenWireRootUnit__.AnalogToColor1.BlueInputPin"
                }
              ]
            },
            "InputRange": {
              "Max": 255
            },
            "InputPin": {
              "SourcePin": {
                "ID": "__OpenWireRootUnit__.SplitJSON1.Elements._Item2.OutputPin",
                "Name": "__OpenWireRootUnit__.SplitJSON1.Elements.b.OutputPin"
              }
            },
            "+": "TArduinoMapRange"
          },
          "X": 1296,
          "Height": 48,
          "Y": 688,
          "Type": "Component"
        },
        {
          "Name": "MapRange2",
          "Width": 96,
          "Instance": {
            "OutputPin": {
              "SinkPins": [
                {
                  "ID": "__OpenWireRootUnit__.AnalogToColor1.GreenInputPin"
                }
              ]
            },
            "InputRange": {
              "Max": 255
            },
            "InputPin": {
              "SourcePin": {
                "ID": "__OpenWireRootUnit__.SplitJSON1.Elements._Item1.OutputPin",
                "Name": "__OpenWireRootUnit__.SplitJSON1.Elements.g.OutputPin"
              }
            },
            "+": "TArduinoMapRange"
          },
          "X": 1296,
          "Height": 48,
          "Y": 624,
          "Type": "Component"
        },
        {
          "Name": "AnalogToColor1",
          "Width": 112,
          "Instance": {
            "GreenInputPin": {
              "SourcePin": {
                "ID": "__OpenWireRootUnit__.MapRange2.OutputPin"
              }
            },
            "OutputPin": {
              "SinkPins": [
                {
                  "ID": "__OpenWireRootUnit__.NeoPixels1.PixelGroups._Item0.ColorInputPin",
                  "Name": "__OpenWireRootUnit__.NeoPixels1.PixelGroups.Color1.ColorInputPin"
                }
              ]
            },
            "RedInputPin": {
              "SourcePin": {
                "ID": "__OpenWireRootUnit__.MapRange1.OutputPin"
              }
            },
            "BlueInputPin": {
              "SourcePin": {
                "ID": "__OpenWireRootUnit__.MapRange3.OutputPin"
              }
            },
            "+": "TArduinoAnalogToColor"
          },
          "X": 1472,
          "Height": 80,
          "Y": 608,
          "Type": "Component"
        },
        {
          "Name": "NeoPixels1",
          "Width": 144,
          "Instance": {
            "OutputPin": {
              "SinkPins": [
                {
                  "ID": "__OpenWireRootUnit__.Arduino.Digital._Item2.DigitalInputPin",
                  "Name": "__OpenWireRootUnit__.Arduino.Digital.Digital[ 2 ].DigitalInputPin"
                }
              ]
            },
            "PixelGroups": {
              "*": [
                {
                  "ColorInputPin": {
                    "SourcePin": {
                      "ID": "__OpenWireRootUnit__.AnalogToColor1.OutputPin"
                    }
                  },
                  "Name": "Color1",
                  "CountPixels": 16,
                  "+": "TArduinoLedPixelsSingleColorGroup"
                }
              ]
            },
            "@": [
              {
                "SourcePin": {
                  "ID": "__OpenWireRootUnit__.IgnoreValues1.OutputPin"
                },
                "@": "Brightness",
                "Component": "NeoPixels1",
                "PinName": "Brightness",
                "+": "TOWSingleSinkPinBinding"
              }
            ],
            "+": "TArduinoNeoPixels"
          },
          "X": 272,
          "Height": 128,
          "Y": 896,
          "Type": "Component"
        },
        {
          "Name": "TextValue1",
          "Width": 112,
          "Instance": {
            "+": "TArduinoTextValue",
            "ClockInputPin": {
              "SourcePins": [
                {
                  "ID": "__OpenWireRootUnit__.Delay1.OutputPin"
                }
              ]
            },
            "OutputPin": {
              "SinkPins": [
                {
                  "ID": "__OpenWireRootUnit__.Arduino.Modules._Item0.Sockets._Item0.InputPin",
                  "Name": "__OpenWireRootUnit__.Arduino.Modules.WiFi.Sockets.TCP Server1 [80].InputPin"
                },
                {
                  "ID": "__OpenWireRootUnit__.Delay2.StartInputPin"
                }
              ]
            },
            "Value": "<!DOCTYPE HTML>\r\n<html>\r\n<head>\r\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\r\n<style>\r\nbody {\r\n  font-family: Arial, sans-serif;\r\n  text-align: center;\r\n  font-size: 22px;\r\n  padding: 10px;\r\n}\r\ninput[type=color], input[type=range] {\r\n  width: 90%;\r\n  max-width: 300px;\r\n  margin-top: 20px;\r\n}\r\ninput[type=color] {\r\n  height: 80px;\r\n  border: none;\r\n}\r\n<\/style>\r\n<\/head>\r\n\r\n<body>\r\n\r\n<h2>NeoPixel RGB Control<\/h2>\r\n\r\n<input type=\"color\" id=\"colorPicker\" value=\"#ff0000\">\r\n<br>\r\n<label for=\"brightness\">Brightness: <span id=\"brightnessValue\">100<\/span>%<\/label>\r\n<input type=\"range\" id=\"brightness\" min=\"1\" max=\"100\" value=\"100\">\r\n\r\n<script>\r\nconst picker = document.getElementById(\"colorPicker\");\r\nconst brightnessSlider = document.getElementById(\"brightness\");\r\nconst brightnessValue = document.getElementById(\"brightnessValue\");\r\nlet timeout;\r\n\r\nfunction sendColor() {\r\n  const c = picker.value;\r\n  const r = parseInt(c.substr(1,2),16);\r\n  const g = parseInt(c.substr(3,2),16);\r\n  const b = parseInt(c.substr(5,2),16);\r\n  const br = parseInt(brightnessSlider.value);\r\n\r\n  clearTimeout(timeout);\r\n  timeout = setTimeout(() => {\r\n    fetch('\/set', {\r\n      method: 'POST',\r\n      headers: {'Content-Type':'application\/json'},\r\n      body: JSON.stringify({r: r, g: g, b: b, br: br})\r\n    })\r\n    .then(response => response.json())  \/\/ parse JSON\r\n    .then(data => {\r\n      console.log('Feedback:', data); \/\/ {r,g,b,br}\r\n\r\n      \/\/ update UI with server-corrected values\r\n      picker.value = \"#\" + ((1 << 24) + (data.r << 16) + (data.g << 8) + data.b).toString(16).slice(1);\r\n      brightnessSlider.value = data.br;\r\n      brightnessValue.textContent = data.br;\r\n    });\r\n  }, 200);\r\n}\r\n\r\n\/\/ events\r\npicker.addEventListener(\"input\", sendColor);\r\nbrightnessSlider.addEventListener(\"input\", () => {\r\n  brightnessValue.textContent = brightnessSlider.value;\r\n  sendColor();\r\n});\r\n<\/script>\r\n\r\n<\/body>\r\n<\/html>\r\n"
          },
          "X": 256,
          "Height": 48,
          "Y": 560,
          "Type": "Component"
        },
        {
          "Name": "MapRange4",
          "Width": 96,
          "Instance": {
            "OutputPin": {
              "SinkPins": [
                {
                  "ID": "__OpenWireRootUnit__.IgnoreValues1.InputPin"
                }
              ]
            },
            "InputRange": {
              "Max": 100
            },
            "InputPin": {
              "SourcePin": {
                "ID": "__OpenWireRootUnit__.SplitJSON1.Elements._Item3.OutputPin",
                "Name": "__OpenWireRootUnit__.SplitJSON1.Elements.br.OutputPin"
              }
            },
            "+": "TArduinoMapRange"
          },
          "X": 1296,
          "Height": 48,
          "Y": 752,
          "Type": "Component"
        },
        {
          "Name": "IgnoreValues1",
          "Width": 112,
          "Instance": {
            "InputPin": {
              "SourcePin": {
                "ID": "__OpenWireRootUnit__.MapRange4.OutputPin"
              }
            },
            "OutputPin": {
              "SinkPins": [
                {
                  "ID": "__OpenWireRootUnit__.NeoPixels1.BrightnessInputPin",
                  "Name": "__OpenWireRootUnit__.NeoPixels1.Brightness"
                }
              ]
            },
            "+": "TArduinoIgnoreAnalogValues"
          },
          "X": 1440,
          "Height": 48,
          "Y": 752,
          "Type": "Component"
        }
      ],
      "Type": "Diagram"
    }
  ],
  "Version": "2",
  "Content": "OpenWire Diagram",
  "Product": "Visuino Pro - Visual Arduino Programming"
}
