├── .github ├── scripts │ ├── genpackage.php │ ├── package_deauther_index.ARM.tpl.json │ └── package_deauther_index.tpl.json └── workflows │ └── genpackage.yml ├── .gitignore ├── .travis.yml ├── LICENSE ├── README.md ├── boards.txt ├── bootloaders └── eboot │ ├── LICENSE │ ├── Makefile │ ├── eboot.c │ ├── eboot.elf │ ├── eboot.ld │ ├── eboot_command.c │ ├── eboot_command.h │ ├── flash.c │ ├── flash.h │ └── rom.ld ├── cores └── esp8266 │ ├── Arduino.h │ ├── Client.h │ ├── Esp.cpp │ ├── Esp.h │ ├── FS.cpp │ ├── FS.h │ ├── FSImpl.h │ ├── HardwareSerial.cpp │ ├── HardwareSerial.h │ ├── IPAddress.cpp │ ├── IPAddress.h │ ├── MD5Builder.cpp │ ├── MD5Builder.h │ ├── Print.cpp │ ├── Print.h │ ├── Printable.h │ ├── Server.h │ ├── Stream.cpp │ ├── Stream.h │ ├── StreamString.cpp │ ├── StreamString.h │ ├── Tone.cpp │ ├── Udp.h │ ├── Updater.cpp │ ├── Updater.h │ ├── WCharacter.h │ ├── WMath.cpp │ ├── WString.cpp │ ├── WString.h │ ├── abi.cpp │ ├── binary.h │ ├── cbuf.h │ ├── cont.S │ ├── cont.h │ ├── cont_util.c │ ├── core_esp8266_eboot_command.c │ ├── core_esp8266_flash_utils.c │ ├── core_esp8266_i2s.c │ ├── core_esp8266_main.cpp │ ├── core_esp8266_noniso.c │ ├── core_esp8266_phy.c │ ├── core_esp8266_postmortem.c │ ├── core_esp8266_si2c.c │ ├── core_esp8266_sigma_delta.c.unused │ ├── core_esp8266_timer.c │ ├── core_esp8266_wiring.c │ ├── core_esp8266_wiring_analog.c │ ├── core_esp8266_wiring_digital.c │ ├── core_esp8266_wiring_pulse.c │ ├── core_esp8266_wiring_pwm.c │ ├── core_esp8266_wiring_shift.c │ ├── debug.cpp │ ├── debug.h │ ├── eboot_command.h │ ├── esp8266_peri.h │ ├── flash_utils.h │ ├── i2s.h │ ├── interrupts.h │ ├── libc_replacements.c │ ├── md5.h │ ├── pgmspace.cpp │ ├── pgmspace.h │ ├── sigma_delta.h │ ├── spiffs │ ├── INTEGRATION │ ├── LICENSE │ ├── README │ ├── TECH_SPEC │ ├── TODO │ ├── spiffs.h │ ├── spiffs_cache.c │ ├── spiffs_check.c │ ├── spiffs_config.h │ ├── spiffs_gc.c │ ├── spiffs_hydrogen.c │ ├── spiffs_nucleus.c │ └── spiffs_nucleus.h │ ├── spiffs_api.cpp │ ├── spiffs_hal.cpp │ ├── stdlib_noniso.h │ ├── time.c │ ├── twi.h │ ├── user_config.h │ └── wiring_private.h ├── doc ├── ESP01_connect.jpg ├── ESP_improved_stability.png ├── ESP_min.png ├── ESP_to_serial.png ├── boards.md ├── changes.md ├── eclipse │ ├── 1_Install_New_Software.png │ ├── 2_Install_software.png │ └── eclipse.md ├── esp12.png ├── esp12.svg ├── esp8266_tcp_active_close.png ├── exception_causes.md ├── filesystem.md ├── installing.md ├── libraries.md ├── ota_updates │ ├── ota-ide-module-joined-wifi.png │ ├── ota-ide-ota-port-selection.png │ ├── ota-ide-ota-upload-complete.png │ ├── ota-ide-ota-upload-configuration.png │ ├── ota-ide-python-configuration.png │ ├── ota-ide-serial-upload-configuration.png │ ├── ota-ide-sketch-selection.png │ ├── ota-ide-ssid-pass-entry.png │ ├── ota-web-browser-form-ok.png │ ├── ota-web-browser-form.png │ ├── ota-web-path-to-binary.png │ ├── ota-web-serial-monitor-ready.png │ ├── ota-web-serial-monitor-reboot.png │ ├── ota-web-show-verbose-compilation.png │ └── ota_updates.md ├── pin_functions.png ├── reference.md ├── reference_items.yml └── rgisters_dump.txt ├── libraries ├── Adafruit_NeoPixel-1.1.6 │ ├── Adafruit_NeoPixel.cpp │ ├── Adafruit_NeoPixel.h │ ├── COPYING │ ├── README.md │ ├── esp8266.c │ ├── examples │ │ ├── RGBWstrandtest │ │ │ └── RGBWstrandtest.ino │ │ ├── StrandtestBLE │ │ │ ├── BLESerial.cpp │ │ │ ├── BLESerial.h │ │ │ └── StrandtestBLE.ino │ │ ├── buttoncycler │ │ │ └── buttoncycler.ino │ │ ├── simple │ │ │ └── simple.ino │ │ └── strandtest │ │ │ └── strandtest.ino │ ├── keywords.txt │ └── library.properties ├── ArduinoJson │ ├── ArduinoJson.h │ ├── CHANGELOG.md │ ├── LICENSE.md │ ├── README.md │ ├── examples │ │ ├── JsonConfigFile │ │ │ └── JsonConfigFile.ino │ │ ├── JsonGeneratorExample │ │ │ └── JsonGeneratorExample.ino │ │ ├── JsonHttpClient │ │ │ └── JsonHttpClient.ino │ │ ├── JsonParserExample │ │ │ └── JsonParserExample.ino │ │ ├── JsonServer │ │ │ └── JsonServer.ino │ │ ├── JsonUdpBeacon │ │ │ └── JsonUdpBeacon.ino │ │ ├── ProgmemExample │ │ │ └── ProgmemExample.ino │ │ └── StringExample │ │ │ └── StringExample.ino │ ├── keywords.txt │ ├── library.properties │ └── src │ │ ├── ArduinoJson.h │ │ ├── ArduinoJson.hpp │ │ └── ArduinoJson │ │ ├── Configuration.hpp │ │ ├── Data │ │ ├── Encoding.hpp │ │ ├── JsonBufferAllocated.hpp │ │ ├── JsonFloat.hpp │ │ ├── JsonInteger.hpp │ │ ├── JsonVariantAs.hpp │ │ ├── JsonVariantContent.hpp │ │ ├── JsonVariantDefault.hpp │ │ ├── JsonVariantType.hpp │ │ ├── List.hpp │ │ ├── ListConstIterator.hpp │ │ ├── ListIterator.hpp │ │ ├── ListNode.hpp │ │ ├── NonCopyable.hpp │ │ ├── ReferenceType.hpp │ │ └── ValueSaver.hpp │ │ ├── Deserialization │ │ ├── Comments.hpp │ │ ├── JsonParser.hpp │ │ ├── JsonParserImpl.hpp │ │ └── StringWriter.hpp │ │ ├── DynamicJsonBuffer.hpp │ │ ├── JsonArray.hpp │ │ ├── JsonArrayImpl.hpp │ │ ├── JsonArraySubscript.hpp │ │ ├── JsonBuffer.hpp │ │ ├── JsonBufferBase.hpp │ │ ├── JsonBufferImpl.hpp │ │ ├── JsonObject.hpp │ │ ├── JsonObjectImpl.hpp │ │ ├── JsonObjectSubscript.hpp │ │ ├── JsonPair.hpp │ │ ├── JsonVariant.hpp │ │ ├── JsonVariantBase.hpp │ │ ├── JsonVariantCasts.hpp │ │ ├── JsonVariantComparisons.hpp │ │ ├── JsonVariantImpl.hpp │ │ ├── JsonVariantOr.hpp │ │ ├── JsonVariantSubscripts.hpp │ │ ├── Polyfills │ │ ├── attributes.hpp │ │ ├── ctype.hpp │ │ ├── isFloat.hpp │ │ ├── isInteger.hpp │ │ ├── math.hpp │ │ ├── parseFloat.hpp │ │ └── parseInteger.hpp │ │ ├── RawJson.hpp │ │ ├── Serialization │ │ ├── DummyPrint.hpp │ │ ├── DynamicStringBuilder.hpp │ │ ├── FloatParts.hpp │ │ ├── IndentedPrint.hpp │ │ ├── JsonPrintable.hpp │ │ ├── JsonSerializer.hpp │ │ ├── JsonSerializerImpl.hpp │ │ ├── JsonWriter.hpp │ │ ├── Prettyfier.hpp │ │ ├── StaticStringBuilder.hpp │ │ └── StreamPrintAdapter.hpp │ │ ├── StaticJsonBuffer.hpp │ │ ├── StringTraits │ │ ├── ArduinoStream.hpp │ │ ├── CharPointer.hpp │ │ ├── FlashString.hpp │ │ ├── StdStream.hpp │ │ ├── StdString.hpp │ │ └── StringTraits.hpp │ │ ├── TypeTraits │ │ ├── EnableIf.hpp │ │ ├── FloatTraits.hpp │ │ ├── IsArray.hpp │ │ ├── IsBaseOf.hpp │ │ ├── IsChar.hpp │ │ ├── IsConst.hpp │ │ ├── IsFloatingPoint.hpp │ │ ├── IsIntegral.hpp │ │ ├── IsSame.hpp │ │ ├── IsSignedIntegral.hpp │ │ ├── IsUnsignedIntegral.hpp │ │ ├── IsVariant.hpp │ │ ├── RemoveConst.hpp │ │ └── RemoveReference.hpp │ │ └── version.hpp ├── ArduinoOTA │ ├── ArduinoOTA.cpp │ ├── ArduinoOTA.h │ ├── examples │ │ ├── BasicOTA │ │ │ └── BasicOTA.ino │ │ └── OTALeds │ │ │ └── OTALeds.ino │ ├── keywords.txt │ └── library.properties ├── DNSServer │ ├── examples │ │ ├── CaptivePortal │ │ │ └── CaptivePortal.ino │ │ ├── CaptivePortalAdvanced │ │ │ ├── CaptivePortalAdvanced.ino │ │ │ ├── credentials.ino │ │ │ ├── handleHttp.ino │ │ │ └── tools.ino │ │ └── DNSServer │ │ │ └── DNSServer.ino │ ├── library.properties │ └── src │ │ ├── DNSServer.cpp │ │ └── DNSServer.h ├── EEPROM │ ├── EEPROM.cpp │ ├── EEPROM.h │ ├── examples │ │ ├── eeprom_clear │ │ │ └── eeprom_clear.ino │ │ ├── eeprom_read │ │ │ └── eeprom_read.ino │ │ └── eeprom_write │ │ │ └── eeprom_write.ino │ ├── keywords.txt │ └── library.properties ├── ESP8266AVRISP │ ├── README.md │ ├── examples │ │ └── Arduino_Wifi_AVRISP │ │ │ └── Arduino_Wifi_AVRISP.ino │ ├── library.properties │ └── src │ │ ├── ESP8266AVRISP.cpp │ │ ├── ESP8266AVRISP.h │ │ └── command.h ├── ESP8266HTTPClient │ ├── examples │ │ ├── BasicHttpClient │ │ │ └── BasicHttpClient.ino │ │ ├── ReuseConnection │ │ │ └── ReuseConnection.ino │ │ └── StreamHttpClient │ │ │ └── StreamHttpClient.ino │ ├── library.properties │ └── src │ │ ├── ESP8266HTTPClient.cpp │ │ └── ESP8266HTTPClient.h ├── ESP8266HTTPUpdateServer │ ├── examples │ │ └── WebUpdater │ │ │ └── WebUpdater.ino │ ├── keywords.txt │ ├── library.properties │ └── src │ │ ├── ESP8266HTTPUpdateServer.cpp │ │ └── ESP8266HTTPUpdateServer.h ├── ESP8266SSDP │ ├── ESP8266SSDP.cpp │ ├── ESP8266SSDP.h │ ├── README.md │ ├── examples │ │ └── SSDP │ │ │ └── SSDP.ino │ └── keywords.txt ├── ESP8266WebServer │ ├── examples │ │ ├── AdvancedWebServer │ │ │ └── AdvancedWebServer.ino │ │ ├── FSBrowser │ │ │ ├── FSBrowser.ino │ │ │ └── data │ │ │ │ ├── edit.htm.gz │ │ │ │ ├── favicon.ico │ │ │ │ ├── graphs.js.gz │ │ │ │ └── index.htm │ │ ├── HelloServer │ │ │ └── HelloServer.ino │ │ ├── SDWebServer │ │ │ ├── SDWebServer.ino │ │ │ └── SdRoot │ │ │ │ ├── edit │ │ │ │ └── index.htm │ │ │ │ ├── index.htm │ │ │ │ └── pins.png │ │ ├── SimpleAuthentification │ │ │ └── SimpleAuthentification.ino │ │ └── WebUpdate │ │ │ └── WebUpdate.ino │ ├── keywords.txt │ ├── library.properties │ └── src │ │ ├── ESP8266WebServer.cpp │ │ ├── ESP8266WebServer.h │ │ ├── Parsing.cpp │ │ └── detail │ │ ├── RequestHandler.h │ │ └── RequestHandlersImpl.h ├── ESP8266WiFi │ ├── examples │ │ ├── HTTPSRequest │ │ │ └── HTTPSRequest.ino │ │ ├── NTPClient │ │ │ └── NTPClient.ino │ │ ├── WiFiAccessPoint │ │ │ └── WiFiAccessPoint.ino │ │ ├── WiFiClient │ │ │ └── WiFiClient.ino │ │ ├── WiFiMulti │ │ │ └── WiFiMulti.ino │ │ ├── WiFiScan │ │ │ └── WiFiScan.ino │ │ ├── WiFiTelnetToSerial │ │ │ └── WiFiTelnetToSerial.ino │ │ └── WiFiWebServer │ │ │ └── WiFiWebServer.ino │ ├── keywords.txt │ ├── library.properties │ └── src │ │ ├── ESP8266WiFi.cpp │ │ ├── ESP8266WiFi.h │ │ ├── ESP8266WiFiMulti.cpp │ │ ├── ESP8266WiFiMulti.h │ │ ├── WiFiClient.cpp │ │ ├── WiFiClient.h │ │ ├── WiFiClientSecure.cpp │ │ ├── WiFiClientSecure.h │ │ ├── WiFiServer.cpp │ │ ├── WiFiServer.h │ │ ├── WiFiUdp.cpp │ │ ├── WiFiUdp.h │ │ ├── arch │ │ ├── cc.h │ │ ├── perf.h │ │ └── sys_arch.h │ │ ├── include │ │ ├── ClientContext.h │ │ ├── UdpContext.h │ │ ├── lwipopts.h │ │ ├── slist.h │ │ ├── ssl.h │ │ └── wl_definitions.h │ │ └── lwip │ │ ├── api.h │ │ ├── api_msg.h │ │ ├── arch.h │ │ ├── autoip.h │ │ ├── debug.h │ │ ├── def.h │ │ ├── dhcp.h │ │ ├── dns.h │ │ ├── err.h │ │ ├── icmp.h │ │ ├── igmp.h │ │ ├── inet.h │ │ ├── inet_chksum.h │ │ ├── init.h │ │ ├── ip.h │ │ ├── ip_addr.h │ │ ├── ip_frag.h │ │ ├── mem.h │ │ ├── mem_manager.h │ │ ├── memp.h │ │ ├── memp_std.h │ │ ├── netbuf.h │ │ ├── netdb.h │ │ ├── netif.h │ │ ├── netifapi.h │ │ ├── opt.h │ │ ├── pbuf.h │ │ ├── raw.h │ │ ├── sio.h │ │ ├── snmp.h │ │ ├── snmp_asn1.h │ │ ├── snmp_msg.h │ │ ├── snmp_structs.h │ │ ├── sockets.h │ │ ├── stats.h │ │ ├── sys.h │ │ ├── tcp.h │ │ ├── tcp_impl.h │ │ ├── tcpip.h │ │ ├── timers.h │ │ └── udp.h ├── ESP8266WiFiMesh │ ├── examples │ │ └── HelloMesh │ │ │ └── HelloMesh.ino │ ├── keywords.txt │ ├── library.properties │ └── src │ │ ├── ESP8266WiFiMesh.cpp │ │ └── ESP8266WiFiMesh.h ├── ESP8266httpUpdate │ ├── examples │ │ └── httpUpdate │ │ │ └── httpUpdate.ino │ ├── library.properties │ └── src │ │ ├── ESP8266httpUpdate.cpp │ │ └── ESP8266httpUpdate.h ├── ESP8266mDNS │ ├── ESP8266mDNS.cpp │ ├── ESP8266mDNS.h │ ├── README.md │ ├── examples │ │ ├── OTA-mDNS-SPIFFS │ │ │ ├── OTA-mDNS-SPIFFS.ino │ │ │ └── data │ │ │ │ └── cl_conf.txt │ │ └── mDNS_Web_Server │ │ │ └── mDNS_Web_Server.ino │ └── keywords.txt ├── Ethernet │ ├── README.adoc │ ├── examples │ │ ├── AdvancedChatServer │ │ │ └── AdvancedChatServer.ino │ │ ├── BarometricPressureWebServer │ │ │ └── BarometricPressureWebServer.ino │ │ ├── ChatServer │ │ │ └── ChatServer.ino │ │ ├── DhcpAddressPrinter │ │ │ └── DhcpAddressPrinter.ino │ │ ├── DhcpChatServer │ │ │ └── DhcpChatServer.ino │ │ ├── TelnetClient │ │ │ └── TelnetClient.ino │ │ ├── UDPSendReceiveString │ │ │ └── UDPSendReceiveString.ino │ │ ├── UdpNtpClient │ │ │ └── UdpNtpClient.ino │ │ ├── WebClient │ │ │ └── WebClient.ino │ │ ├── WebClientRepeating │ │ │ └── WebClientRepeating.ino │ │ └── WebServer │ │ │ └── WebServer.ino │ ├── keywords.txt │ ├── library.properties │ └── src │ │ ├── Dhcp.cpp │ │ ├── Dhcp.h │ │ ├── Dns.cpp │ │ ├── Dns.h │ │ ├── Ethernet.cpp │ │ ├── Ethernet.h │ │ ├── EthernetClient.cpp │ │ ├── EthernetClient.h │ │ ├── EthernetServer.cpp │ │ ├── EthernetServer.h │ │ ├── EthernetUdp.cpp │ │ ├── EthernetUdp.h │ │ └── utility │ │ ├── socket.cpp │ │ ├── socket.h │ │ ├── util.h │ │ ├── w5100.cpp │ │ └── w5100.h ├── GDBStub │ ├── README.md │ ├── library.properties │ └── src │ │ ├── GDBStub.c │ │ └── GDBStub.h ├── Hash │ ├── examples │ │ └── sha1 │ │ │ └── sha1.ino │ ├── library.properties │ └── src │ │ ├── Hash.cpp │ │ ├── Hash.h │ │ └── sha1 │ │ ├── sha1.c │ │ └── sha1.h ├── LinkedList │ ├── .gitattributes │ ├── .gitignore │ ├── LICENSE.txt │ ├── LinkedList.h │ ├── README.md │ ├── examples │ │ ├── ClassList │ │ │ └── ClassList.pde │ │ ├── SimpleIntegerList │ │ │ └── SimpleIntegerList.pde │ │ └── Sort │ │ │ └── Sort.ino │ ├── keywords.txt │ ├── library.json │ └── library.properties ├── OneWire │ ├── OneWire.cpp │ ├── OneWire.h │ ├── examples │ │ ├── DS18x20_Temperature │ │ │ └── DS18x20_Temperature.pde │ │ ├── DS2408_Switch │ │ │ └── DS2408_Switch.pde │ │ └── DS250x_PROM │ │ │ └── DS250x_PROM.pde │ └── keywords.txt ├── SD │ ├── README.adoc │ ├── examples │ │ ├── CardInfo │ │ │ └── CardInfo.ino │ │ ├── Datalogger │ │ │ └── Datalogger.ino │ │ ├── DumpFile │ │ │ └── DumpFile.ino │ │ ├── Files │ │ │ └── Files.ino │ │ ├── ReadWrite │ │ │ └── ReadWrite.ino │ │ └── listfiles │ │ │ └── listfiles.ino │ ├── keywords.txt │ ├── library.properties │ └── src │ │ ├── File.cpp │ │ ├── README.txt │ │ ├── SD.cpp │ │ ├── SD.h │ │ └── utility │ │ ├── FatStructs.h │ │ ├── Sd2Card.cpp │ │ ├── Sd2Card.h │ │ ├── Sd2PinMap.h │ │ ├── SdFat.h │ │ ├── SdFatUtil.h │ │ ├── SdFatmainpage.h │ │ ├── SdFile.cpp │ │ ├── SdInfo.h │ │ └── SdVolume.cpp ├── SPI │ ├── SPI.cpp │ ├── SPI.h │ ├── keywords.txt │ └── library.properties ├── Servo │ ├── examples │ │ └── Sweep │ │ │ └── Sweep.ino │ ├── keywords.txt │ ├── library.properties │ └── src │ │ ├── Servo.h │ │ └── esp8266 │ │ ├── Servo.cpp │ │ └── ServoTimers.h ├── SimpleButton │ ├── .gitignore │ ├── LICENSE │ ├── README.md │ ├── examples │ │ ├── AnalogStick │ │ │ └── AnalogStick.ino │ │ ├── Button │ │ │ └── Button.ino │ │ ├── Button_Event │ │ │ └── Button_Event.ino │ │ ├── Button_Matrix │ │ │ └── Button_Matrix.ino │ │ ├── Button_PCF8574 │ │ │ └── Button_PCF8574.ino │ │ ├── I2CEncoder │ │ │ └── I2CEncoder.ino │ │ ├── Lameboy │ │ │ └── Lameboy.ino │ │ ├── PlayStation2_Gamepad │ │ │ └── PlayStation2_Gamepad.ino │ │ ├── PullupButton │ │ │ └── PullupButton.ino │ │ ├── RotaryEncoder │ │ │ └── RotaryEncoder.ino │ │ ├── RotaryEncoder_PCF8574 │ │ │ └── RotaryEncoder_PCF8574.ino │ │ └── Switch │ │ │ └── Switch.ino │ ├── library.json │ ├── library.properties │ └── src │ │ ├── Buttons │ │ ├── AnalogStick.cpp │ │ ├── AnalogStick.h │ │ ├── Button.cpp │ │ ├── Button.h │ │ ├── ButtonAnalog.cpp │ │ ├── ButtonAnalog.h │ │ ├── ButtonGPIOExpander.cpp │ │ ├── ButtonGPIOExpander.h │ │ ├── ButtonPullup.cpp │ │ ├── ButtonPullup.h │ │ ├── ButtonPullupGPIOExpander.cpp │ │ ├── ButtonPullupGPIOExpander.h │ │ ├── PS2Gamepad.cpp │ │ ├── PS2Gamepad.h │ │ ├── RotaryEncoder.cpp │ │ ├── RotaryEncoder.h │ │ ├── RotaryEncoderI2C.cpp │ │ ├── RotaryEncoderI2C.h │ │ ├── Switch.cpp │ │ └── Switch.h │ │ ├── Events │ │ ├── ClickEvent.cpp │ │ ├── ClickEvent.h │ │ ├── DoubleclickEvent.cpp │ │ ├── DoubleclickEvent.h │ │ ├── Event.cpp │ │ ├── Event.h │ │ ├── HoldEvent.cpp │ │ ├── HoldEvent.h │ │ ├── PushEvent.cpp │ │ ├── PushEvent.h │ │ ├── ReleaseEvent.cpp │ │ └── ReleaseEvent.h │ │ ├── SimpleButton.h │ │ └── libs │ │ ├── GPIOExpander.cpp │ │ ├── GPIOExpander.h │ │ ├── MCP23017.cpp │ │ ├── MCP23017.h │ │ ├── PCF8574.cpp │ │ ├── PCF8574.h │ │ ├── PCF8575.cpp │ │ └── PCF8575.h ├── TFT_Touch_Shield_V2 │ ├── License.txt │ ├── README.md │ ├── TFTv2.cpp │ ├── TFTv2.h │ ├── examples │ │ ├── drawCircle │ │ │ └── drawCircle.ino │ │ ├── drawLines │ │ │ └── drawLines.ino │ │ ├── drawNumber │ │ │ └── drawNumber.ino │ │ ├── drawRectangle │ │ │ └── drawRectangle.ino │ │ ├── paint │ │ │ ├── .test.skip │ │ │ └── paint.ino │ │ ├── shapes │ │ │ └── shapes.ino │ │ ├── text │ │ │ └── text.ino │ │ ├── tftbmp │ │ │ ├── .test.skip │ │ │ ├── flower.BMP │ │ │ ├── hibiscus.bmp │ │ │ ├── test.bmp │ │ │ └── tftbmp.ino │ │ └── tftbmp2 │ │ │ ├── .test.skip │ │ │ └── tftbmp2.ino │ ├── font.c │ └── keywords.txt ├── Ticker │ ├── Ticker.cpp │ ├── Ticker.h │ ├── examples │ │ ├── TickerBasic │ │ │ └── TickerBasic.ino │ │ └── TickerParameter │ │ │ └── TickerParameter.ino │ ├── keywords.txt │ └── library.properties ├── Wire │ ├── Wire.cpp │ ├── Wire.h │ ├── keywords.txt │ └── library.properties ├── esp8266-oled-ssd1306-4.0.0 │ ├── .travis.yml │ ├── README.md │ ├── UPGRADE-3.0.md │ ├── UPGRADE-4.0.md │ ├── examples │ │ ├── SSD1306ClockDemo │ │ │ ├── SSD1306ClockDemo.ino │ │ │ └── images.h │ │ ├── SSD1306DrawingDemo │ │ │ └── SSD1306DrawingDemo.ino │ │ ├── SSD1306OTADemo │ │ │ └── SSD1306OTADemo.ino │ │ ├── SSD1306SimpleDemo │ │ │ ├── SSD1306SimpleDemo.ino │ │ │ └── images.h │ │ ├── SSD1306TwoScreenDemo │ │ │ ├── SSD1306TwoScreenDemo.ino │ │ │ └── images.h │ │ └── SSD1306UiDemo │ │ │ ├── SSD1306UiDemo.ino │ │ │ └── images.h │ ├── library.json │ ├── library.properties │ ├── license │ ├── resources │ │ ├── DemoFrame1.jpg │ │ ├── DemoFrame2.jpg │ │ ├── DemoFrame3.jpg │ │ ├── DemoFrame4.jpg │ │ ├── FontTool.png │ │ ├── SPI_version.jpg │ │ ├── glyphEditor.html │ │ ├── glyphEditor.png │ │ └── xbmPreview.png │ └── src │ │ ├── OLEDDisplay.cpp │ │ ├── OLEDDisplay.h │ │ ├── OLEDDisplayFonts.h │ │ ├── OLEDDisplayUi.cpp │ │ ├── OLEDDisplayUi.h │ │ ├── SH1106.h │ │ ├── SH1106Brzo.h │ │ ├── SH1106Spi.h │ │ ├── SH1106Wire.h │ │ ├── SSD1306.h │ │ ├── SSD1306Brzo.h │ │ ├── SSD1306Spi.h │ │ └── SSD1306Wire.h └── esp8266 │ ├── examples │ ├── Blink │ │ └── Blink.ino │ ├── BlinkWithoutDelay │ │ └── BlinkWithoutDelay.ino │ ├── CallSDKFunctions │ │ └── CallSDKFunctions.ino │ ├── CheckFlashConfig │ │ └── CheckFlashConfig.ino │ └── ConfigFile │ │ └── ConfigFile.ino │ ├── library.properties │ └── src │ └── dummy.h ├── package ├── build_boards_manager_package.sh ├── esp8266-arudino-doc.bash ├── merge_packages.py └── package_esp8266com_index.template.json ├── platform.txt ├── programmers.txt ├── screenshots ├── board_manager_sdk.jpg ├── board_manager_urls.jpg ├── board_manager_urls.jpg.jpg ├── screenshot_install_sdk.jpg ├── screenshot_select_board.jpg └── screenshot_select_path.jpg ├── sdk_fix ├── ESP8266WiFi.cpp ├── ESP8266WiFi.h ├── README.md ├── package_deauther_index.json ├── platform.txt └── user_interface.h ├── tests ├── FSWrapper │ └── FSWrapper.ino ├── Time │ └── Time.ino └── common.sh ├── tools ├── espota.py ├── get.py └── sdk │ ├── License │ ├── changelog.txt │ ├── include │ ├── c_types.h │ ├── eagle_soc.h │ ├── espconn.h │ ├── espnow.h │ ├── ets_sys.h │ ├── gpio.h │ ├── i2s_reg.h │ ├── ip_addr.h │ ├── json │ │ ├── json.h │ │ ├── jsonparse.h │ │ └── jsontree.h │ ├── mem.h │ ├── os_type.h │ ├── osapi.h │ ├── ping.h │ ├── pwm.h │ ├── queue.h │ ├── slc_register.h │ ├── smartconfig.h │ ├── sntp.h │ ├── spi_flash.h │ ├── uart_register.h │ ├── upgrade.h │ └── user_interface.h │ ├── ld │ ├── eagle.app.v6.common.ld │ ├── eagle.flash.16m.ld │ ├── eagle.flash.1m128.ld │ ├── eagle.flash.1m256.ld │ ├── eagle.flash.1m512.ld │ ├── eagle.flash.1m64.ld │ ├── eagle.flash.2m.ld │ ├── eagle.flash.4m.ld │ ├── eagle.flash.4m1m.ld │ ├── eagle.flash.512k0.ld │ ├── eagle.flash.512k64.ld │ ├── eagle.flash.8m.ld │ └── eagle.rom.addr.v6.ld │ ├── lib │ ├── libat.a │ ├── libaxtls.a │ ├── libcrypto.a │ ├── libespnow.a │ ├── libhal.a │ ├── libjson.a │ ├── liblwip.a │ ├── liblwip_536.a │ ├── libmain.a │ ├── libnet80211.a │ ├── libphy.a │ ├── libpp.a │ ├── libpwm.a │ ├── libsmartconfig.a │ ├── libssl.a │ ├── libupgrade.a │ ├── libwpa.a │ └── libwps.a │ └── version └── variants ├── adafruit └── pins_arduino.h ├── d1 └── pins_arduino.h ├── d1_mini └── pins_arduino.h ├── dstike └── pins_arduino.h ├── generic └── pins_arduino.h ├── nodemcu └── pins_arduino.h ├── thing └── pins_arduino.h └── wifio ├── WifioProtocol.h ├── WifioWiring.cpp └── pins_arduino.h /.github/scripts/genpackage.php: -------------------------------------------------------------------------------- 1 | 12 | #include 13 | #include 14 | 15 | #define RTC_MEM ((volatile uint32_t*)0x60001200) 16 | 17 | enum action_t { 18 | ACTION_COPY_RAW = 0x00000001, 19 | ACTION_LOAD_APP = 0xffffffff 20 | }; 21 | 22 | #define EBOOT_MAGIC 0xeb001000 23 | #define EBOOT_MAGIC_MASK 0xfffff000 24 | 25 | struct eboot_command { 26 | uint32_t magic; 27 | enum action_t action; 28 | uint32_t args[29]; 29 | uint32_t crc32; 30 | }; 31 | 32 | 33 | int eboot_command_read(struct eboot_command* cmd); 34 | void eboot_command_write(struct eboot_command* cmd); 35 | void eboot_command_clear(); 36 | 37 | #endif //EBOOT_COMMAND_H 38 | -------------------------------------------------------------------------------- /bootloaders/eboot/flash.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2015 Ivan Grokhotkov. All rights reserved. 2 | * This file is part of eboot bootloader. 3 | * 4 | * Redistribution and use is permitted according to the conditions of the 5 | * 3-clause BSD license to be found in the LICENSE file. 6 | */ 7 | 8 | #ifndef FLASH_H 9 | #define FLASH_H 10 | 11 | int SPIEraseBlock(uint32_t block); 12 | int SPIEraseSector(uint32_t sector); 13 | int SPIRead(uint32_t addr, void *dest, size_t size); 14 | int SPIWrite(uint32_t addr, void *src, size_t size); 15 | int SPIEraseAreaEx(const uint32_t start, const uint32_t size); 16 | 17 | #define FLASH_SECTOR_SIZE 0x1000 18 | #define FLASH_BLOCK_SIZE 0x10000 19 | #define APP_START_OFFSET 0x1000 20 | 21 | typedef struct { 22 | unsigned char magic; 23 | unsigned char num_segments; 24 | 25 | /* SPI Flash Interface (0 = QIO, 1 = QOUT, 2 = DIO, 0x3 = DOUT) */ 26 | unsigned char flash_mode; 27 | 28 | /* High four bits: 0 = 512K, 1 = 256K, 2 = 1M, 3 = 2M, 4 = 4M, 29 | Low four bits: 0 = 40MHz, 1= 26MHz, 2 = 20MHz, 0xf = 80MHz */ 30 | unsigned char flash_size_freq; 31 | 32 | uint32_t entry; 33 | } image_header_t; 34 | 35 | 36 | typedef struct { 37 | uint32_t address; 38 | uint32_t size; 39 | } section_header_t; 40 | 41 | 42 | 43 | #endif //FLASH_H 44 | -------------------------------------------------------------------------------- /cores/esp8266/MD5Builder.cpp: -------------------------------------------------------------------------------- 1 | #include "Arduino.h" 2 | #include "md5.h" 3 | #include "MD5Builder.h" 4 | 5 | #define hex_char_to_byte(c) (((c)>='a'&&(c)<='f')?((c)-87):((c)>='A'&&(c)<='F')?((c)-55):((c)>='0'&&(c)<='9')?((c)-48):0) 6 | 7 | void MD5Builder::begin(void){ 8 | memset(_buf, 0x00, 16); 9 | MD5Init(&_ctx); 10 | } 11 | 12 | void MD5Builder::add(uint8_t * data, uint16_t len){ 13 | MD5Update(&_ctx, data, len); 14 | } 15 | 16 | void MD5Builder::addHexString(const char * data){ 17 | uint16_t i, len = strlen(data); 18 | uint8_t * tmp = (uint8_t*)malloc(len/2); 19 | if(tmp == NULL) 20 | return; 21 | for(i=0; i 24 | 25 | class Print; 26 | 27 | /** The Printable class provides a way for new classes to allow themselves to be printed. 28 | By deriving from Printable and implementing the printTo method, it will then be possible 29 | for users to print out instances of this class by passing them into the usual 30 | Print::print and Print::println methods. 31 | */ 32 | 33 | class Printable { 34 | public: 35 | virtual size_t printTo(Print& p) const = 0; 36 | }; 37 | 38 | #endif 39 | 40 | -------------------------------------------------------------------------------- /cores/esp8266/Server.h: -------------------------------------------------------------------------------- 1 | /* 2 | Server.h - Base class that provides Server 3 | Copyright (c) 2011 Adrian McEwen. All right reserved. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef server_h 21 | #define server_h 22 | 23 | #include "Print.h" 24 | 25 | class Server: public Print { 26 | public: 27 | virtual void begin() =0; 28 | }; 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /cores/esp8266/StreamString.h: -------------------------------------------------------------------------------- 1 | /** 2 | StreamString.h 3 | 4 | Copyright (c) 2015 Markus Sattler. All rights reserved. 5 | This file is part of the esp8266 core for Arduino environment. 6 | 7 | This library is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU Lesser General Public 9 | License as published by the Free Software Foundation; either 10 | version 2.1 of the License, or (at your option) any later version. 11 | 12 | This library is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | Lesser General Public License for more details. 16 | 17 | You should have received a copy of the GNU Lesser General Public 18 | License along with this library; if not, write to the Free Software 19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 20 | 21 | */ 22 | 23 | #ifndef STREAMSTRING_H_ 24 | #define STREAMSTRING_H_ 25 | 26 | 27 | class StreamString: public Stream, public String { 28 | 29 | size_t write(const uint8_t *buffer, size_t size); 30 | size_t write(uint8_t data); 31 | 32 | int available(); 33 | int read(); 34 | int peek(); 35 | void flush(); 36 | 37 | }; 38 | 39 | 40 | #endif /* STREAMSTRING_H_ */ 41 | -------------------------------------------------------------------------------- /cores/esp8266/core_esp8266_wiring_analog.c: -------------------------------------------------------------------------------- 1 | /* 2 | analog.c - analogRead implementation for esp8266 3 | 4 | Copyright (c) 2015 Hristo Gochkov. All rights reserved. 5 | This file is part of the esp8266 core for Arduino environment. 6 | 7 | This library is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU Lesser General Public 9 | License as published by the Free Software Foundation; either 10 | version 2.1 of the License, or (at your option) any later version. 11 | 12 | This library is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | Lesser General Public License for more details. 16 | 17 | You should have received a copy of the GNU Lesser General Public 18 | License along with this library; if not, write to the Free Software 19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 20 | 21 | 22 | 18/06/2015 analogRead bugfix by Testato 23 | */ 24 | 25 | #include "wiring_private.h" 26 | #include "pins_arduino.h" 27 | 28 | 29 | extern int __analogRead(uint8_t pin) { 30 | if(pin == 17){ 31 | return system_adc_read(); 32 | } 33 | return digitalRead(pin) * 1023; 34 | } 35 | 36 | extern int analogRead(uint8_t pin) __attribute__ ((weak, alias("__analogRead"))); 37 | -------------------------------------------------------------------------------- /cores/esp8266/debug.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | debug.cpp - debug helper functions 3 | Copyright (c) 2015 Markus Sattler. All rights reserved. 4 | This file is part of the esp8266 core for Arduino environment. 5 | 6 | This library is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU Lesser General Public 8 | License as published by the Free Software Foundation; either 9 | version 2.1 of the License, or (at your option) any later version. 10 | 11 | This library is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | Lesser General Public License for more details. 15 | 16 | You should have received a copy of the GNU Lesser General Public 17 | License along with this library; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #include "Arduino.h" 22 | #include "debug.h" 23 | 24 | void ICACHE_RAM_ATTR hexdump(uint8_t *mem, uint32_t len, uint8_t cols) { 25 | os_printf("\n[HEXDUMP] Address: 0x%08X len: 0x%X (%d)", (size_t)mem, len, len); 26 | for(uint32_t i = 0; i < len; i++) { 27 | if(i % cols == 0) { 28 | os_printf("\n[0x%08X] 0x%08X: ", (size_t)mem, i); 29 | yield(); 30 | } 31 | os_printf("%02X ", *mem); 32 | mem++; 33 | } 34 | os_printf("\n"); 35 | } 36 | 37 | -------------------------------------------------------------------------------- /cores/esp8266/debug.h: -------------------------------------------------------------------------------- 1 | #ifndef ARD_DEBUG_H 2 | #define ARD_DEBUG_H 3 | 4 | #include 5 | #include 6 | 7 | //#define DEBUGV(...) ets_printf(__VA_ARGS__) 8 | 9 | #ifndef DEBUGV 10 | #define DEBUGV(...) 11 | #endif 12 | 13 | #ifdef __cplusplus 14 | void hexdump(uint8_t *mem, uint32_t len, uint8_t cols = 16); 15 | #else 16 | void hexdump(uint8_t *mem, uint32_t len, uint8_t cols); 17 | #endif 18 | 19 | #ifdef __cplusplus 20 | extern "C" { 21 | #endif 22 | 23 | void __panic_func(const char* file, int line, const char* func) __attribute__((noreturn)); 24 | #define panic() __panic_func(__FILE__, __LINE__, __func__) 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | 30 | 31 | #endif//ARD_DEBUG_H 32 | -------------------------------------------------------------------------------- /cores/esp8266/eboot_command.h: -------------------------------------------------------------------------------- 1 | #ifndef EBOOT_COMMAND_H 2 | #define EBOOT_COMMAND_H 3 | 4 | #include 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | #define RTC_MEM ((volatile uint32_t*)0x60001200) 11 | 12 | enum action_t { 13 | ACTION_COPY_RAW = 0x00000001, 14 | ACTION_LOAD_APP = 0xffffffff 15 | }; 16 | 17 | #define EBOOT_MAGIC 0xeb001000 18 | #define EBOOT_MAGIC_MASK 0xfffff000 19 | 20 | struct eboot_command { 21 | uint32_t magic; 22 | enum action_t action; 23 | uint32_t args[29]; 24 | uint32_t crc32; 25 | }; 26 | 27 | 28 | int eboot_command_read(struct eboot_command* cmd); 29 | void eboot_command_write(struct eboot_command* cmd); 30 | void eboot_command_clear(); 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | 36 | #endif //EBOOT_COMMAND_H 37 | -------------------------------------------------------------------------------- /cores/esp8266/interrupts.h: -------------------------------------------------------------------------------- 1 | #ifndef INTERRUPTS_H 2 | #define INTERRUPTS_H 3 | 4 | #include 5 | #include 6 | extern "C" { 7 | #include "c_types.h" 8 | #include "ets_sys.h" 9 | } 10 | 11 | // these auto classes wrap up xt_rsil so your code can be simplier, but can only be 12 | // used in an ino or cpp files. 13 | 14 | // InterruptLock is used when you want to completely disable locks 15 | //{ 16 | // { 17 | // InterruptLock lock; 18 | // // do work within interrupt lock here 19 | // } 20 | // do work outside of interrupt lock here outside its scope 21 | //} 22 | // 23 | 24 | class InterruptLock { 25 | public: 26 | InterruptLock() { 27 | _state = xt_rsil(15); 28 | } 29 | 30 | ~InterruptLock() { 31 | xt_wsr_ps(_state); 32 | } 33 | 34 | protected: 35 | uint32_t _state; 36 | }; 37 | 38 | // AutoInterruptLock is when you need to set a specific level, A normal use pattern is like 39 | // 40 | //{ 41 | // { 42 | // AutoInterruptLock(1); // this routine will allow level 2 and above 43 | // // do work within interrupt lock here 44 | // } 45 | // do work outside of interrupt lock here outside its scope 46 | //} 47 | // 48 | #define AutoInterruptLock(intrLevel) \ 49 | class _AutoDisableIntr { \ 50 | public: \ 51 | _AutoDisableIntr() { _savedPS = xt_rsil(intrLevel); } \ 52 | ~_AutoDisableIntr() { xt_wsr_ps(_savedPS); } \ 53 | private: \ 54 | uint32_t _savedPS; \ 55 | }; \ 56 | _AutoDisableIntr _autoDisableIntr 57 | 58 | #endif //INTERRUPTS_H 59 | -------------------------------------------------------------------------------- /cores/esp8266/sigma_delta.h: -------------------------------------------------------------------------------- 1 | /* 2 | sigma_delta.h - esp8266 sigma-delta source 3 | 4 | Copyright (c) 2014 Ivan Grokhotkov. All rights reserved. 5 | This file is part of the esp8266 core for Arduino environment. 6 | 7 | This library is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU Lesser General Public 9 | License as published by the Free Software Foundation; either 10 | version 2.1 of the License, or (at your option) any later version. 11 | 12 | This library is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | Lesser General Public License for more details. 16 | 17 | You should have received a copy of the GNU Lesser General Public 18 | License along with this library; if not, write to the Free Software 19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef SIGMA_DELTA_H 23 | #define SIGMA_DELTA_H 24 | 25 | #include 26 | 27 | void sigma_delta_close(uint32_t gpio); 28 | void set_sigma_target(uint8_t target); 29 | void set_sigma_prescale(uint8_t prescale); 30 | void set_sigma_duty_312KHz(uint8_t duty); 31 | 32 | #endif//SIGMA_DELTA_H 33 | -------------------------------------------------------------------------------- /cores/esp8266/spiffs/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013-2015 Peter Andersson (pelleplutt1976gmail.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /cores/esp8266/spiffs/TODO: -------------------------------------------------------------------------------- 1 | * When mending lost pages, also see if they fit into length specified in object index header 2 | 3 | SPIFFS2 thoughts 4 | 5 | * Instead of exact object id:s in the object lookup tables, use a hash of span index and object id. 6 | Eg. object id xor:ed with bit-reversed span index. 7 | This should decrease number of actual pages that needs to be visited when looking thru the obj lut. 8 | 9 | * Logical number of each block. When moving stuff in a garbage collected page, the free 10 | page is assigned the same number as the garbage collected. Thus, object index pages do not have to 11 | be rewritten. 12 | 13 | * Steal one page, use as a bit parity page. When starting an fs modification operation, write one bit 14 | as zero. When ending, write another bit as zero. On mount, if number of zeroes in page is uneven, a 15 | check is automatically run. -------------------------------------------------------------------------------- /cores/esp8266/twi.h: -------------------------------------------------------------------------------- 1 | /* 2 | twi.h - Software I2C library for esp8266 3 | 4 | Copyright (c) 2015 Hristo Gochkov. All rights reserved. 5 | This file is part of the esp8266 core for Arduino environment. 6 | 7 | This library is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU Lesser General Public 9 | License as published by the Free Software Foundation; either 10 | version 2.1 of the License, or (at your option) any later version. 11 | 12 | This library is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | Lesser General Public License for more details. 16 | 17 | You should have received a copy of the GNU Lesser General Public 18 | License along with this library; if not, write to the Free Software 19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | #ifndef SI2C_h 22 | #define SI2C_h 23 | #include "Arduino.h" 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | void twi_init(unsigned char sda, unsigned char scl); 30 | void twi_stop(void); 31 | void twi_setClock(unsigned int freq); 32 | uint8_t twi_writeTo(unsigned char address, unsigned char * buf, unsigned int len, unsigned char sendStop); 33 | uint8_t twi_readFrom(unsigned char address, unsigned char * buf, unsigned int len, unsigned char sendStop); 34 | 35 | #ifdef __cplusplus 36 | } 37 | #endif 38 | 39 | #endif -------------------------------------------------------------------------------- /cores/esp8266/user_config.h: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /cores/esp8266/wiring_private.h: -------------------------------------------------------------------------------- 1 | /* 2 | wiring_private.h - Internal header file. 3 | Part of Arduino - http://www.arduino.cc/ 4 | 5 | Copyright (c) 2005-2006 David A. Mellis 6 | 7 | This library is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU Lesser General Public 9 | License as published by the Free Software Foundation; either 10 | version 2.1 of the License, or (at your option) any later version. 11 | 12 | This library is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | Lesser General Public License for more details. 16 | 17 | You should have received a copy of the GNU Lesser General 18 | Public License along with this library; if not, write to the 19 | Free Software Foundation, Inc., 59 Temple Place, Suite 330, 20 | Boston, MA 02111-1307 USA 21 | 22 | $Id: wiring.h 239 2007-01-12 17:58:39Z mellis $ 23 | */ 24 | 25 | #ifndef WiringPrivate_h 26 | #define WiringPrivate_h 27 | 28 | #include 29 | #include 30 | 31 | #include "Arduino.h" 32 | 33 | #ifdef __cplusplus 34 | extern "C" { 35 | #endif 36 | 37 | typedef void (*voidFuncPtr)(void); 38 | 39 | void initPins(); 40 | 41 | #ifdef __cplusplus 42 | } // extern "C" 43 | #endif 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /doc/ESP01_connect.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/doc/ESP01_connect.jpg -------------------------------------------------------------------------------- /doc/ESP_improved_stability.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/doc/ESP_improved_stability.png -------------------------------------------------------------------------------- /doc/ESP_min.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/doc/ESP_min.png -------------------------------------------------------------------------------- /doc/ESP_to_serial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/doc/ESP_to_serial.png -------------------------------------------------------------------------------- /doc/eclipse/1_Install_New_Software.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/doc/eclipse/1_Install_New_Software.png -------------------------------------------------------------------------------- /doc/eclipse/2_Install_software.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/doc/eclipse/2_Install_software.png -------------------------------------------------------------------------------- /doc/esp12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/doc/esp12.png -------------------------------------------------------------------------------- /doc/esp8266_tcp_active_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/doc/esp8266_tcp_active_close.png -------------------------------------------------------------------------------- /doc/exception_causes.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/doc/exception_causes.md -------------------------------------------------------------------------------- /doc/ota_updates/ota-ide-module-joined-wifi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/doc/ota_updates/ota-ide-module-joined-wifi.png -------------------------------------------------------------------------------- /doc/ota_updates/ota-ide-ota-port-selection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/doc/ota_updates/ota-ide-ota-port-selection.png -------------------------------------------------------------------------------- /doc/ota_updates/ota-ide-ota-upload-complete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/doc/ota_updates/ota-ide-ota-upload-complete.png -------------------------------------------------------------------------------- /doc/ota_updates/ota-ide-ota-upload-configuration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/doc/ota_updates/ota-ide-ota-upload-configuration.png -------------------------------------------------------------------------------- /doc/ota_updates/ota-ide-python-configuration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/doc/ota_updates/ota-ide-python-configuration.png -------------------------------------------------------------------------------- /doc/ota_updates/ota-ide-serial-upload-configuration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/doc/ota_updates/ota-ide-serial-upload-configuration.png -------------------------------------------------------------------------------- /doc/ota_updates/ota-ide-sketch-selection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/doc/ota_updates/ota-ide-sketch-selection.png -------------------------------------------------------------------------------- /doc/ota_updates/ota-ide-ssid-pass-entry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/doc/ota_updates/ota-ide-ssid-pass-entry.png -------------------------------------------------------------------------------- /doc/ota_updates/ota-web-browser-form-ok.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/doc/ota_updates/ota-web-browser-form-ok.png -------------------------------------------------------------------------------- /doc/ota_updates/ota-web-browser-form.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/doc/ota_updates/ota-web-browser-form.png -------------------------------------------------------------------------------- /doc/ota_updates/ota-web-path-to-binary.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/doc/ota_updates/ota-web-path-to-binary.png -------------------------------------------------------------------------------- /doc/ota_updates/ota-web-serial-monitor-ready.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/doc/ota_updates/ota-web-serial-monitor-ready.png -------------------------------------------------------------------------------- /doc/ota_updates/ota-web-serial-monitor-reboot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/doc/ota_updates/ota-web-serial-monitor-reboot.png -------------------------------------------------------------------------------- /doc/ota_updates/ota-web-show-verbose-compilation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/doc/ota_updates/ota-web-show-verbose-compilation.png -------------------------------------------------------------------------------- /doc/pin_functions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/doc/pin_functions.png -------------------------------------------------------------------------------- /doc/reference_items.yml: -------------------------------------------------------------------------------- 1 | # This file defines the order in which documents will appear in the menu 2 | 3 | - path: /doc/installing.html 4 | 5 | - path: /doc/reference.html 6 | 7 | - path: /doc/libraries.html 8 | 9 | - path: /doc/filesystem.html 10 | 11 | - path: /doc/ota_updates/ota_updates.html 12 | 13 | - path: /doc/boards.html 14 | 15 | - path: /doc/changes.html 16 | -------------------------------------------------------------------------------- /libraries/Adafruit_NeoPixel-1.1.6/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map For Adafruit_NeoPixel 3 | ####################################### 4 | # Class 5 | ####################################### 6 | 7 | Adafruit_NeoPixel KEYWORD1 8 | 9 | ####################################### 10 | # Methods and Functions 11 | ####################################### 12 | 13 | setPixelColor KEYWORD2 14 | setPin KEYWORD2 15 | setBrightness KEYWORD2 16 | numPixels KEYWORD2 17 | getPixelColor KEYWORD2 18 | Color KEYWORD2 19 | show KEYWORD2 20 | 21 | clear KEYWORD2 22 | updateLength KEYWORD2 23 | updateType KEYWORD2 24 | getPixels KEYWORD2 25 | getBrightness KEYWORD2 26 | getPin KEYWORD2 27 | canShow KEYWORD2 28 | 29 | 30 | ####################################### 31 | # Constants 32 | ####################################### 33 | 34 | NEO_COLMASK LITERAL1 35 | NEO_SPDMASK LITERAL1 36 | NEO_KHZ800 LITERAL1 37 | NEO_KHZ400 LITERAL1 38 | NEO_GRB LITERAL1 39 | NEO_RGB LITERAL1 40 | NEO_RGBW LITERAL1 41 | -------------------------------------------------------------------------------- /libraries/Adafruit_NeoPixel-1.1.6/library.properties: -------------------------------------------------------------------------------- 1 | name=Adafruit NeoPixel 2 | version=1.1.6 3 | author=Adafruit 4 | maintainer=Adafruit 5 | sentence=Arduino library for controlling single-wire-based LED pixels and strip. 6 | paragraph=Arduino library for controlling single-wire-based LED pixels and strip. 7 | category=Display 8 | url=https://github.com/adafruit/Adafruit_NeoPixel 9 | architectures=* 10 | -------------------------------------------------------------------------------- /libraries/ArduinoJson/ArduinoJson.h: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2018 3 | // MIT License 4 | 5 | #include "src/ArduinoJson.h" 6 | -------------------------------------------------------------------------------- /libraries/ArduinoJson/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | --------------------- 3 | 4 | Copyright © 2014-2018 Benoit BLANCHON 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 7 | 8 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 9 | 10 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 11 | -------------------------------------------------------------------------------- /libraries/ArduinoJson/keywords.txt: -------------------------------------------------------------------------------- 1 | JsonArray KEYWORD1 2 | JsonObject KEYWORD1 3 | JsonVariant KEYWORD1 4 | StaticJsonBuffer KEYWORD1 5 | DynamicJsonBuffer KEYWORD1 6 | add KEYWORD2 7 | createArray KEYWORD2 8 | createNestedArray KEYWORD2 9 | createNestedObject KEYWORD2 10 | createObject KEYWORD2 11 | parseArray KEYWORD2 12 | parseObject KEYWORD2 13 | prettyPrintTo KEYWORD2 14 | printTo KEYWORD2 15 | success KEYWORD2 16 | -------------------------------------------------------------------------------- /libraries/ArduinoJson/library.properties: -------------------------------------------------------------------------------- 1 | name=ArduinoJson 2 | version=5.13.4 3 | author=Benoit Blanchon 4 | maintainer=Benoit Blanchon 5 | sentence=An efficient and elegant JSON library for Arduino. 6 | paragraph=ArduinoJson supports ✔ serialization, ✔ deserialization, ✔ fixed allocation, ✔ zero-copy, ✔ streams, and more. It is the most popular Arduino library on GitHub ❤❤❤❤❤. Check out arduinojson.org for a comprehensive documentation. 7 | category=Data Processing 8 | url=https://arduinojson.org/?utm_source=meta&utm_medium=library.properties 9 | architectures=* 10 | repository=https://github.com/bblanchon/ArduinoJson.git 11 | license=MIT 12 | -------------------------------------------------------------------------------- /libraries/ArduinoJson/src/ArduinoJson.h: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2018 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #ifdef __cplusplus 8 | 9 | #include "ArduinoJson.hpp" 10 | 11 | using namespace ArduinoJson; 12 | 13 | #else 14 | 15 | #error ArduinoJson requires a C++ compiler, please change file extension to .cc or .cpp 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /libraries/ArduinoJson/src/ArduinoJson.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2018 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include "ArduinoJson/version.hpp" 8 | 9 | #include "ArduinoJson/DynamicJsonBuffer.hpp" 10 | #include "ArduinoJson/JsonArray.hpp" 11 | #include "ArduinoJson/JsonObject.hpp" 12 | #include "ArduinoJson/StaticJsonBuffer.hpp" 13 | 14 | #include "ArduinoJson/Deserialization/JsonParserImpl.hpp" 15 | #include "ArduinoJson/JsonArrayImpl.hpp" 16 | #include "ArduinoJson/JsonBufferImpl.hpp" 17 | #include "ArduinoJson/JsonObjectImpl.hpp" 18 | #include "ArduinoJson/JsonVariantImpl.hpp" 19 | #include "ArduinoJson/Serialization/JsonSerializerImpl.hpp" 20 | -------------------------------------------------------------------------------- /libraries/ArduinoJson/src/ArduinoJson/Data/Encoding.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2018 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | namespace ArduinoJson { 8 | namespace Internals { 9 | 10 | class Encoding { 11 | public: 12 | // Optimized for code size on a 8-bit AVR 13 | static char escapeChar(char c) { 14 | const char *p = escapeTable(false); 15 | while (p[0] && p[1] != c) { 16 | p += 2; 17 | } 18 | return p[0]; 19 | } 20 | 21 | // Optimized for code size on a 8-bit AVR 22 | static char unescapeChar(char c) { 23 | const char *p = escapeTable(true); 24 | for (;;) { 25 | if (p[0] == '\0') return c; 26 | if (p[0] == c) return p[1]; 27 | p += 2; 28 | } 29 | } 30 | 31 | private: 32 | static const char *escapeTable(bool excludeIdenticals) { 33 | return &"\"\"\\\\b\bf\fn\nr\rt\t"[excludeIdenticals ? 4 : 0]; 34 | } 35 | }; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /libraries/ArduinoJson/src/ArduinoJson/Data/JsonBufferAllocated.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2018 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include "../JsonBuffer.hpp" 8 | 9 | namespace ArduinoJson { 10 | namespace Internals { 11 | 12 | class JsonBufferAllocated { 13 | public: 14 | void *operator new(size_t n, JsonBuffer *jsonBuffer) throw() { 15 | if (!jsonBuffer) return NULL; 16 | return jsonBuffer->alloc(n); 17 | } 18 | 19 | void operator delete(void *, JsonBuffer *)throw(); 20 | }; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /libraries/ArduinoJson/src/ArduinoJson/Data/JsonFloat.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2018 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include "../Configuration.hpp" 8 | 9 | namespace ArduinoJson { 10 | namespace Internals { 11 | 12 | #if ARDUINOJSON_USE_DOUBLE 13 | typedef double JsonFloat; 14 | #else 15 | typedef float JsonFloat; 16 | #endif 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /libraries/ArduinoJson/src/ArduinoJson/Data/JsonInteger.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2018 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include "../Configuration.hpp" 8 | 9 | namespace ArduinoJson { 10 | namespace Internals { 11 | 12 | #if ARDUINOJSON_USE_LONG_LONG 13 | typedef long long JsonInteger; 14 | typedef unsigned long long JsonUInt; 15 | #elif ARDUINOJSON_USE_INT64 16 | typedef __int64 JsonInteger; 17 | typedef unsigned _int64 JsonUInt; 18 | #else 19 | typedef long JsonInteger; 20 | typedef unsigned long JsonUInt; 21 | #endif 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /libraries/ArduinoJson/src/ArduinoJson/Data/JsonVariantAs.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2018 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | namespace ArduinoJson { 8 | namespace Internals { 9 | 10 | // A metafunction that returns the type of the value returned by 11 | // JsonVariant::as() 12 | template 13 | struct JsonVariantAs { 14 | typedef T type; 15 | }; 16 | 17 | template <> 18 | struct JsonVariantAs { 19 | typedef const char* type; 20 | }; 21 | 22 | template <> 23 | struct JsonVariantAs { 24 | typedef JsonArray& type; 25 | }; 26 | 27 | template <> 28 | struct JsonVariantAs { 29 | typedef const JsonArray& type; 30 | }; 31 | 32 | template <> 33 | struct JsonVariantAs { 34 | typedef JsonObject& type; 35 | }; 36 | 37 | template <> 38 | struct JsonVariantAs { 39 | typedef const JsonObject& type; 40 | }; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /libraries/ArduinoJson/src/ArduinoJson/Data/JsonVariantContent.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2018 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include "JsonFloat.hpp" 8 | #include "JsonInteger.hpp" 9 | 10 | namespace ArduinoJson { 11 | 12 | // Forward declarations 13 | class JsonArray; 14 | class JsonObject; 15 | 16 | namespace Internals { 17 | // A union that defines the actual content of a JsonVariant. 18 | // The enum JsonVariantType determines which member is in use. 19 | union JsonVariantContent { 20 | JsonFloat asFloat; // used for double and float 21 | JsonUInt asInteger; // used for bool, char, short, int and longs 22 | const char* asString; // asString can be null 23 | JsonArray* asArray; // asArray cannot be null 24 | JsonObject* asObject; // asObject cannot be null 25 | }; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /libraries/ArduinoJson/src/ArduinoJson/Data/JsonVariantDefault.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2018 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | namespace ArduinoJson { 8 | namespace Internals { 9 | 10 | template 11 | struct JsonVariantDefault { 12 | static T get() { 13 | return T(); 14 | } 15 | }; 16 | 17 | template 18 | struct JsonVariantDefault : JsonVariantDefault {}; 19 | 20 | template 21 | struct JsonVariantDefault : JsonVariantDefault {}; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /libraries/ArduinoJson/src/ArduinoJson/Data/JsonVariantType.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2018 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | namespace ArduinoJson { 8 | class JsonArray; 9 | class JsonObject; 10 | 11 | namespace Internals { 12 | 13 | // Enumerated type to know the current type of a JsonVariant. 14 | // The value determines which member of JsonVariantContent is used. 15 | enum JsonVariantType { 16 | JSON_UNDEFINED, // JsonVariant has not been initialized 17 | JSON_UNPARSED, // JsonVariant contains an unparsed string 18 | JSON_STRING, // JsonVariant stores a const char* 19 | JSON_BOOLEAN, // JsonVariant stores a bool 20 | JSON_POSITIVE_INTEGER, // JsonVariant stores an JsonUInt 21 | JSON_NEGATIVE_INTEGER, // JsonVariant stores an JsonUInt that must be negated 22 | JSON_ARRAY, // JsonVariant stores a pointer to a JsonArray 23 | JSON_OBJECT, // JsonVariant stores a pointer to a JsonObject 24 | JSON_FLOAT // JsonVariant stores a JsonFloat 25 | }; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /libraries/ArduinoJson/src/ArduinoJson/Data/ListConstIterator.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2018 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include "ListNode.hpp" 8 | 9 | namespace ArduinoJson { 10 | namespace Internals { 11 | 12 | // A read-only forward itertor for List 13 | template 14 | class ListConstIterator { 15 | public: 16 | explicit ListConstIterator(const ListNode *node = NULL) : _node(node) {} 17 | 18 | const T &operator*() const { 19 | return _node->content; 20 | } 21 | const T *operator->() { 22 | return &_node->content; 23 | } 24 | 25 | bool operator==(const ListConstIterator &other) const { 26 | return _node == other._node; 27 | } 28 | 29 | bool operator!=(const ListConstIterator &other) const { 30 | return _node != other._node; 31 | } 32 | 33 | ListConstIterator &operator++() { 34 | if (_node) _node = _node->next; 35 | return *this; 36 | } 37 | 38 | ListConstIterator &operator+=(size_t distance) { 39 | while (_node && distance) { 40 | _node = _node->next; 41 | --distance; 42 | } 43 | return *this; 44 | } 45 | 46 | private: 47 | const ListNode *_node; 48 | }; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /libraries/ArduinoJson/src/ArduinoJson/Data/ListIterator.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2018 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include "ListConstIterator.hpp" 8 | #include "ListNode.hpp" 9 | 10 | namespace ArduinoJson { 11 | namespace Internals { 12 | 13 | template 14 | class List; 15 | 16 | // A read-write forward iterator for List 17 | template 18 | class ListIterator { 19 | friend class List; 20 | 21 | public: 22 | explicit ListIterator(ListNode *node = NULL) : _node(node) {} 23 | 24 | T &operator*() const { 25 | return _node->content; 26 | } 27 | T *operator->() { 28 | return &_node->content; 29 | } 30 | 31 | bool operator==(const ListIterator &other) const { 32 | return _node == other._node; 33 | } 34 | 35 | bool operator!=(const ListIterator &other) const { 36 | return _node != other._node; 37 | } 38 | 39 | ListIterator &operator++() { 40 | if (_node) _node = _node->next; 41 | return *this; 42 | } 43 | 44 | ListIterator &operator+=(size_t distance) { 45 | while (_node && distance) { 46 | _node = _node->next; 47 | --distance; 48 | } 49 | return *this; 50 | } 51 | 52 | operator ListConstIterator() const { 53 | return ListConstIterator(_node); 54 | } 55 | 56 | private: 57 | ListNode *_node; 58 | }; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /libraries/ArduinoJson/src/ArduinoJson/Data/ListNode.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2018 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include // for NULL 8 | 9 | #include "JsonBufferAllocated.hpp" 10 | 11 | namespace ArduinoJson { 12 | namespace Internals { 13 | 14 | // A node for a singly-linked list. 15 | // Used by List and its iterators. 16 | template 17 | struct ListNode : public Internals::JsonBufferAllocated { 18 | ListNode() throw() : next(NULL) {} 19 | 20 | ListNode *next; 21 | T content; 22 | }; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /libraries/ArduinoJson/src/ArduinoJson/Data/NonCopyable.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2018 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | namespace ArduinoJson { 8 | namespace Internals { 9 | 10 | // A type that cannot be copied 11 | class NonCopyable { 12 | protected: 13 | NonCopyable() {} 14 | 15 | private: 16 | // copy constructor is private 17 | NonCopyable(const NonCopyable&); 18 | 19 | // copy operator is private 20 | NonCopyable& operator=(const NonCopyable&); 21 | }; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /libraries/ArduinoJson/src/ArduinoJson/Data/ReferenceType.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2018 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | namespace ArduinoJson { 8 | namespace Internals { 9 | 10 | // A type that is meant to be used by reference only (JsonArray and JsonObject) 11 | class ReferenceType { 12 | public: 13 | bool operator==(const ReferenceType& other) const { 14 | // two JsonArray are equal if they are the same instance 15 | // (we don't compare the content) 16 | return this == &other; 17 | } 18 | 19 | bool operator!=(const ReferenceType& other) const { 20 | return this != &other; 21 | } 22 | }; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /libraries/ArduinoJson/src/ArduinoJson/Deserialization/StringWriter.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2018 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | namespace ArduinoJson { 8 | namespace Internals { 9 | 10 | template 11 | class StringWriter { 12 | public: 13 | class String { 14 | public: 15 | String(TChar** ptr) : _writePtr(ptr), _startPtr(*ptr) {} 16 | 17 | void append(char c) { 18 | *(*_writePtr)++ = TChar(c); 19 | } 20 | 21 | const char* c_str() const { 22 | *(*_writePtr)++ = 0; 23 | return reinterpret_cast(_startPtr); 24 | } 25 | 26 | private: 27 | TChar** _writePtr; 28 | TChar* _startPtr; 29 | }; 30 | 31 | StringWriter(TChar* buffer) : _ptr(buffer) {} 32 | 33 | String startString() { 34 | return String(&_ptr); 35 | } 36 | 37 | private: 38 | TChar* _ptr; 39 | }; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /libraries/ArduinoJson/src/ArduinoJson/JsonArrayImpl.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2018 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include "JsonArray.hpp" 8 | #include "JsonArraySubscript.hpp" 9 | #include "JsonObject.hpp" 10 | 11 | namespace ArduinoJson { 12 | 13 | inline JsonArray &JsonArray::createNestedArray() { 14 | if (!_buffer) return JsonArray::invalid(); 15 | JsonArray &array = _buffer->createArray(); 16 | add(array); 17 | return array; 18 | } 19 | 20 | inline JsonObject &JsonArray::createNestedObject() { 21 | if (!_buffer) return JsonObject::invalid(); 22 | JsonObject &object = _buffer->createObject(); 23 | add(object); 24 | return object; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /libraries/ArduinoJson/src/ArduinoJson/JsonBufferImpl.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2018 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include "Deserialization/JsonParser.hpp" 8 | 9 | inline ArduinoJson::JsonArray &ArduinoJson::JsonBuffer::createArray() { 10 | JsonArray *ptr = new (this) JsonArray(this); 11 | return ptr ? *ptr : JsonArray::invalid(); 12 | } 13 | 14 | inline ArduinoJson::JsonObject &ArduinoJson::JsonBuffer::createObject() { 15 | JsonObject *ptr = new (this) JsonObject(this); 16 | return ptr ? *ptr : JsonObject::invalid(); 17 | } 18 | -------------------------------------------------------------------------------- /libraries/ArduinoJson/src/ArduinoJson/JsonObjectImpl.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2018 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include "JsonArray.hpp" 8 | #include "JsonObject.hpp" 9 | #include "JsonObjectSubscript.hpp" 10 | 11 | namespace ArduinoJson { 12 | 13 | template 14 | inline JsonArray &JsonObject::createNestedArray_impl(TStringRef key) { 15 | if (!_buffer) return JsonArray::invalid(); 16 | JsonArray &array = _buffer->createArray(); 17 | set(key, array); 18 | return array; 19 | } 20 | 21 | template 22 | inline JsonObject &JsonObject::createNestedObject_impl(TStringRef key) { 23 | if (!_buffer) return JsonObject::invalid(); 24 | JsonObject &object = _buffer->createObject(); 25 | set(key, object); 26 | return object; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /libraries/ArduinoJson/src/ArduinoJson/JsonPair.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2018 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include "JsonVariant.hpp" 8 | 9 | namespace ArduinoJson { 10 | 11 | // A key value pair for JsonObject. 12 | struct JsonPair { 13 | const char* key; 14 | JsonVariant value; 15 | }; 16 | } 17 | -------------------------------------------------------------------------------- /libraries/ArduinoJson/src/ArduinoJson/JsonVariantBase.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2018 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include "JsonVariantCasts.hpp" 8 | #include "JsonVariantComparisons.hpp" 9 | #include "JsonVariantOr.hpp" 10 | #include "JsonVariantSubscripts.hpp" 11 | #include "Serialization/JsonPrintable.hpp" 12 | 13 | namespace ArduinoJson { 14 | namespace Internals { 15 | 16 | template 17 | class JsonVariantBase : public JsonPrintable, 18 | public JsonVariantCasts, 19 | public JsonVariantComparisons, 20 | public JsonVariantOr, 21 | public JsonVariantSubscripts, 22 | public JsonVariantTag {}; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /libraries/ArduinoJson/src/ArduinoJson/Polyfills/attributes.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2018 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #ifdef _MSC_VER // Visual Studio 8 | 9 | #define FORCE_INLINE // __forceinline causes C4714 when returning std::string 10 | #define NO_INLINE __declspec(noinline) 11 | #define DEPRECATED(msg) __declspec(deprecated(msg)) 12 | 13 | #elif defined(__GNUC__) // GCC or Clang 14 | 15 | #define FORCE_INLINE __attribute__((always_inline)) 16 | #define NO_INLINE __attribute__((noinline)) 17 | #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5) 18 | #define DEPRECATED(msg) __attribute__((deprecated(msg))) 19 | #else 20 | #define DEPRECATED(msg) __attribute__((deprecated)) 21 | #endif 22 | 23 | #else // Other compilers 24 | 25 | #define FORCE_INLINE 26 | #define NO_INLINE 27 | #define DEPRECATED(msg) 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /libraries/ArduinoJson/src/ArduinoJson/Polyfills/ctype.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2018 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | namespace ArduinoJson { 8 | namespace Internals { 9 | 10 | inline bool isdigit(char c) { 11 | return '0' <= c && c <= '9'; 12 | } 13 | 14 | inline bool issign(char c) { 15 | return '-' == c || c == '+'; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /libraries/ArduinoJson/src/ArduinoJson/Polyfills/isFloat.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2018 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include // for strcmp 8 | #include "./ctype.hpp" 9 | 10 | namespace ArduinoJson { 11 | namespace Internals { 12 | 13 | inline bool isFloat(const char* s) { 14 | if (!s) return false; 15 | 16 | if (!strcmp(s, "NaN")) return true; 17 | if (issign(*s)) s++; 18 | if (!strcmp(s, "Infinity")) return true; 19 | if (*s == '\0') return false; 20 | 21 | while (isdigit(*s)) s++; 22 | 23 | if (*s == '.') { 24 | s++; 25 | while (isdigit(*s)) s++; 26 | } 27 | 28 | if (*s == 'e' || *s == 'E') { 29 | s++; 30 | if (issign(*s)) s++; 31 | if (!isdigit(*s)) return false; 32 | while (isdigit(*s)) s++; 33 | } 34 | 35 | return *s == '\0'; 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /libraries/ArduinoJson/src/ArduinoJson/Polyfills/isInteger.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2018 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include "./ctype.hpp" 8 | 9 | namespace ArduinoJson { 10 | namespace Internals { 11 | 12 | inline bool isInteger(const char* s) { 13 | if (!s || !*s) return false; 14 | if (issign(*s)) s++; 15 | while (isdigit(*s)) s++; 16 | return *s == '\0'; 17 | } 18 | } // namespace Internals 19 | } // namespace ArduinoJson 20 | -------------------------------------------------------------------------------- /libraries/ArduinoJson/src/ArduinoJson/Polyfills/math.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2018 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | namespace ArduinoJson { 8 | namespace Internals { 9 | template 10 | bool isNaN(T x) { 11 | return x != x; 12 | } 13 | 14 | template 15 | bool isInfinity(T x) { 16 | return x != 0.0 && x * 2 == x; 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /libraries/ArduinoJson/src/ArduinoJson/Polyfills/parseInteger.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2018 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include 8 | 9 | #include "../Configuration.hpp" 10 | #include "./ctype.hpp" 11 | 12 | namespace ArduinoJson { 13 | namespace Internals { 14 | template 15 | T parseInteger(const char *s) { 16 | if (!s) return 0; // NULL 17 | 18 | if (*s == 't') return 1; // "true" 19 | 20 | T result = 0; 21 | bool negative_result = false; 22 | 23 | switch (*s) { 24 | case '-': 25 | negative_result = true; 26 | s++; 27 | break; 28 | case '+': 29 | s++; 30 | break; 31 | } 32 | 33 | while (isdigit(*s)) { 34 | result = T(result * 10 + T(*s - '0')); 35 | s++; 36 | } 37 | 38 | return negative_result ? T(~result + 1) : result; 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /libraries/ArduinoJson/src/ArduinoJson/RawJson.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2018 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | namespace ArduinoJson { 8 | 9 | namespace Internals { 10 | // A special type of data that can be used to insert pregenerated JSON portions. 11 | template 12 | class RawJsonString { 13 | public: 14 | explicit RawJsonString(T str) : _str(str) {} 15 | operator T() const { 16 | return _str; 17 | } 18 | 19 | private: 20 | T _str; 21 | }; 22 | 23 | template 24 | struct StringTraits, void> { 25 | static bool is_null(RawJsonString source) { 26 | return StringTraits::is_null(static_cast(source)); 27 | } 28 | 29 | typedef RawJsonString duplicate_t; 30 | 31 | template 32 | static duplicate_t duplicate(RawJsonString source, Buffer* buffer) { 33 | return duplicate_t(StringTraits::duplicate(source, buffer)); 34 | } 35 | 36 | static const bool has_append = false; 37 | static const bool has_equals = false; 38 | static const bool should_duplicate = StringTraits::should_duplicate; 39 | }; 40 | } 41 | 42 | template 43 | inline Internals::RawJsonString RawJson(T str) { 44 | return Internals::RawJsonString(str); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /libraries/ArduinoJson/src/ArduinoJson/Serialization/DummyPrint.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2018 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | namespace ArduinoJson { 8 | namespace Internals { 9 | 10 | // A dummy Print implementation used in JsonPrintable::measureLength() 11 | class DummyPrint { 12 | public: 13 | size_t print(char) { 14 | return 1; 15 | } 16 | 17 | size_t print(const char* s) { 18 | return strlen(s); 19 | } 20 | }; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /libraries/ArduinoJson/src/ArduinoJson/Serialization/DynamicStringBuilder.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2018 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include "../StringTraits/StringTraits.hpp" 8 | 9 | namespace ArduinoJson { 10 | namespace Internals { 11 | 12 | // A Print implementation that allows to write in a String 13 | template 14 | class DynamicStringBuilder { 15 | public: 16 | DynamicStringBuilder(TString &str) : _str(str) {} 17 | 18 | size_t print(char c) { 19 | StringTraits::append(_str, c); 20 | return 1; 21 | } 22 | 23 | size_t print(const char *s) { 24 | size_t initialLen = _str.length(); 25 | StringTraits::append(_str, s); 26 | return _str.length() - initialLen; 27 | } 28 | 29 | private: 30 | DynamicStringBuilder &operator=(const DynamicStringBuilder &); 31 | 32 | TString &_str; 33 | }; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /libraries/ArduinoJson/src/ArduinoJson/Serialization/JsonSerializer.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2018 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include "JsonWriter.hpp" 8 | 9 | namespace ArduinoJson { 10 | 11 | class JsonArray; 12 | class JsonObject; 13 | class JsonVariant; 14 | 15 | namespace Internals { 16 | 17 | class JsonArraySubscript; 18 | template 19 | class JsonObjectSubscript; 20 | 21 | template 22 | class JsonSerializer { 23 | public: 24 | static void serialize(const JsonArray &, Writer &); 25 | static void serialize(const JsonArraySubscript &, Writer &); 26 | static void serialize(const JsonObject &, Writer &); 27 | template 28 | static void serialize(const JsonObjectSubscript &, Writer &); 29 | static void serialize(const JsonVariant &, Writer &); 30 | }; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /libraries/ArduinoJson/src/ArduinoJson/Serialization/StaticStringBuilder.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2018 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | namespace ArduinoJson { 8 | namespace Internals { 9 | 10 | // A Print implementation that allows to write in a char[] 11 | class StaticStringBuilder { 12 | public: 13 | StaticStringBuilder(char *buf, size_t size) : end(buf + size - 1), p(buf) { 14 | *p = '\0'; 15 | } 16 | 17 | size_t print(char c) { 18 | if (p >= end) return 0; 19 | *p++ = c; 20 | *p = '\0'; 21 | return 1; 22 | } 23 | 24 | size_t print(const char *s) { 25 | char *begin = p; 26 | while (p < end && *s) *p++ = *s++; 27 | *p = '\0'; 28 | return size_t(p - begin); 29 | } 30 | 31 | private: 32 | char *end; 33 | char *p; 34 | }; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /libraries/ArduinoJson/src/ArduinoJson/Serialization/StreamPrintAdapter.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2018 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include "../Configuration.hpp" 8 | 9 | #if ARDUINOJSON_ENABLE_STD_STREAM 10 | 11 | #include 12 | 13 | namespace ArduinoJson { 14 | namespace Internals { 15 | 16 | class StreamPrintAdapter { 17 | public: 18 | explicit StreamPrintAdapter(std::ostream& os) : _os(os) {} 19 | 20 | size_t print(char c) { 21 | _os << c; 22 | return 1; 23 | } 24 | 25 | size_t print(const char* s) { 26 | _os << s; 27 | return strlen(s); 28 | } 29 | 30 | private: 31 | // cannot be assigned 32 | StreamPrintAdapter& operator=(const StreamPrintAdapter&); 33 | 34 | std::ostream& _os; 35 | }; 36 | } 37 | } 38 | 39 | #endif // ARDUINOJSON_ENABLE_STD_STREAM 40 | -------------------------------------------------------------------------------- /libraries/ArduinoJson/src/ArduinoJson/StringTraits/StringTraits.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2018 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include 8 | #include "../Configuration.hpp" 9 | #include "../TypeTraits/EnableIf.hpp" 10 | #include "../TypeTraits/IsBaseOf.hpp" 11 | #include "../TypeTraits/IsChar.hpp" 12 | #include "../TypeTraits/IsConst.hpp" 13 | #include "../TypeTraits/RemoveReference.hpp" 14 | 15 | namespace ArduinoJson { 16 | namespace Internals { 17 | 18 | template 19 | struct StringTraits { 20 | static const bool has_append = false; 21 | static const bool has_equals = false; 22 | }; 23 | 24 | template 25 | struct StringTraits : StringTraits {}; 26 | 27 | template 28 | struct StringTraits : StringTraits {}; 29 | } 30 | } 31 | 32 | #include "ArduinoStream.hpp" 33 | #include "CharPointer.hpp" 34 | #include "FlashString.hpp" 35 | #include "StdStream.hpp" 36 | #include "StdString.hpp" 37 | -------------------------------------------------------------------------------- /libraries/ArduinoJson/src/ArduinoJson/TypeTraits/EnableIf.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2018 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | namespace ArduinoJson { 8 | namespace Internals { 9 | 10 | // A meta-function that return the type T if Condition is true. 11 | template 12 | struct EnableIf {}; 13 | 14 | template 15 | struct EnableIf { 16 | typedef T type; 17 | }; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /libraries/ArduinoJson/src/ArduinoJson/TypeTraits/IsArray.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2018 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | namespace ArduinoJson { 8 | namespace Internals { 9 | 10 | // A meta-function that return the type T without the const modifier 11 | template 12 | struct IsArray { 13 | static const bool value = false; 14 | }; 15 | template 16 | struct IsArray { 17 | static const bool value = true; 18 | }; 19 | template 20 | struct IsArray { 21 | static const bool value = true; 22 | }; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /libraries/ArduinoJson/src/ArduinoJson/TypeTraits/IsBaseOf.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2018 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | namespace ArduinoJson { 8 | namespace Internals { 9 | 10 | // A meta-function that returns true if Derived inherits from TBase is an 11 | // integral type. 12 | template 13 | class IsBaseOf { 14 | protected: // <- to avoid GCC's "all member functions in class are private" 15 | typedef char Yes[1]; 16 | typedef char No[2]; 17 | 18 | static Yes &probe(const TBase *); 19 | static No &probe(...); 20 | 21 | public: 22 | enum { 23 | value = sizeof(probe(reinterpret_cast(0))) == sizeof(Yes) 24 | }; 25 | }; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /libraries/ArduinoJson/src/ArduinoJson/TypeTraits/IsChar.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2018 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include "IsSame.hpp" 8 | 9 | namespace ArduinoJson { 10 | namespace Internals { 11 | 12 | // A meta-function that returns true if T is a charater 13 | template 14 | struct IsChar { 15 | static const bool value = IsSame::value || 16 | IsSame::value || 17 | IsSame::value; 18 | }; 19 | 20 | template 21 | struct IsChar : IsChar {}; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /libraries/ArduinoJson/src/ArduinoJson/TypeTraits/IsConst.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2018 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | namespace ArduinoJson { 8 | namespace Internals { 9 | 10 | // A meta-function that return the type T without the const modifier 11 | template 12 | struct IsConst { 13 | static const bool value = false; 14 | }; 15 | 16 | template 17 | struct IsConst { 18 | static const bool value = true; 19 | }; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /libraries/ArduinoJson/src/ArduinoJson/TypeTraits/IsFloatingPoint.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2018 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include "IsSame.hpp" 8 | 9 | namespace ArduinoJson { 10 | namespace Internals { 11 | 12 | // A meta-function that returns true if T is a floating point type 13 | template 14 | struct IsFloatingPoint { 15 | static const bool value = IsSame::value || IsSame::value; 16 | }; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /libraries/ArduinoJson/src/ArduinoJson/TypeTraits/IsIntegral.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2018 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include "IsSame.hpp" 8 | #include "IsSignedIntegral.hpp" 9 | #include "IsUnsignedIntegral.hpp" 10 | 11 | namespace ArduinoJson { 12 | namespace Internals { 13 | 14 | // A meta-function that returns true if T is an integral type. 15 | template 16 | struct IsIntegral { 17 | static const bool value = IsSignedIntegral::value || 18 | IsUnsignedIntegral::value || 19 | IsSame::value; 20 | // CAUTION: differs from std::is_integral as it doesn't include bool 21 | }; 22 | 23 | template 24 | struct IsIntegral : IsIntegral {}; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /libraries/ArduinoJson/src/ArduinoJson/TypeTraits/IsSame.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2018 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | namespace ArduinoJson { 8 | namespace Internals { 9 | 10 | // A meta-function that returns true if types T and U are the same. 11 | template 12 | struct IsSame { 13 | static const bool value = false; 14 | }; 15 | 16 | template 17 | struct IsSame { 18 | static const bool value = true; 19 | }; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /libraries/ArduinoJson/src/ArduinoJson/TypeTraits/IsSignedIntegral.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2018 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include "../Configuration.hpp" 8 | #include "IsSame.hpp" 9 | 10 | namespace ArduinoJson { 11 | namespace Internals { 12 | 13 | // A meta-function that returns true if T is an integral type. 14 | template 15 | struct IsSignedIntegral { 16 | static const bool value = 17 | IsSame::value || IsSame::value || 18 | IsSame::value || IsSame::value || 19 | #if ARDUINOJSON_USE_LONG_LONG 20 | IsSame::value || 21 | #endif 22 | #if ARDUINOJSON_USE_INT64 23 | IsSame::value || 24 | #endif 25 | false; 26 | }; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /libraries/ArduinoJson/src/ArduinoJson/TypeTraits/IsUnsignedIntegral.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2018 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include "../Configuration.hpp" 8 | #include "IsSame.hpp" 9 | 10 | namespace ArduinoJson { 11 | namespace Internals { 12 | 13 | // A meta-function that returns true if T is an integral type. 14 | template 15 | struct IsUnsignedIntegral { 16 | static const bool value = 17 | IsSame::value || IsSame::value || 18 | IsSame::value || IsSame::value || 19 | #if ARDUINOJSON_USE_LONG_LONG 20 | IsSame::value || 21 | #endif 22 | #if ARDUINOJSON_USE_INT64 23 | IsSame::value || 24 | #endif 25 | false; 26 | }; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /libraries/ArduinoJson/src/ArduinoJson/TypeTraits/IsVariant.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2018 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include "IsBaseOf.hpp" 8 | 9 | namespace ArduinoJson { 10 | namespace Internals { 11 | 12 | class JsonVariantTag {}; 13 | 14 | template 15 | struct IsVariant : IsBaseOf {}; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /libraries/ArduinoJson/src/ArduinoJson/TypeTraits/RemoveConst.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2018 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | namespace ArduinoJson { 8 | namespace Internals { 9 | 10 | // A meta-function that return the type T without the const modifier 11 | template 12 | struct RemoveConst { 13 | typedef T type; 14 | }; 15 | template 16 | struct RemoveConst { 17 | typedef T type; 18 | }; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /libraries/ArduinoJson/src/ArduinoJson/TypeTraits/RemoveReference.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2018 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | namespace ArduinoJson { 8 | namespace Internals { 9 | 10 | // A meta-function that return the type T without the reference modifier. 11 | template 12 | struct RemoveReference { 13 | typedef T type; 14 | }; 15 | template 16 | struct RemoveReference { 17 | typedef T type; 18 | }; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /libraries/ArduinoJson/src/ArduinoJson/version.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2018 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #define ARDUINOJSON_VERSION "5.13.4" 8 | #define ARDUINOJSON_VERSION_MAJOR 5 9 | #define ARDUINOJSON_VERSION_MINOR 13 10 | #define ARDUINOJSON_VERSION_REVISION 4 11 | -------------------------------------------------------------------------------- /libraries/ArduinoOTA/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map For Ultrasound 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | ArduinoOTA KEYWORD1 10 | 11 | ####################################### 12 | # Methods and Functions (KEYWORD2) 13 | ####################################### 14 | 15 | begin KEYWORD2 16 | setup KEYWORD2 17 | handle KEYWORD2 18 | onStart KEYWORD2 19 | onEnd KEYWORD2 20 | onError KEYWORD2 21 | onProgress KEYWORD2 22 | 23 | ####################################### 24 | # Constants (LITERAL1) 25 | ####################################### 26 | 27 | -------------------------------------------------------------------------------- /libraries/ArduinoOTA/library.properties: -------------------------------------------------------------------------------- 1 | name=ArduinoOTA 2 | version=1.0 3 | author=Ivan Grokhotkov and Miguel Angel Ajo 4 | maintainer=Ivan Grokhtkov 5 | sentence=Enables Over The Air upgrades, via wifi and espota.py UDP request/TCP download. 6 | paragraph=With this library you can enable your sketch to be upgraded over network. Includes mdns anounces to get discovered by the arduino IDE. 7 | category=Communication 8 | url= 9 | architectures=esp8266 10 | -------------------------------------------------------------------------------- /libraries/DNSServer/examples/CaptivePortal/CaptivePortal.ino: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | const byte DNS_PORT = 53; 6 | IPAddress apIP(192, 168, 1, 1); 7 | DNSServer dnsServer; 8 | ESP8266WebServer webServer(80); 9 | 10 | String responseHTML = "" 11 | "CaptivePortal" 12 | "

Hello World!

This is a captive portal example. All requests will " 13 | "be redirected here.

"; 14 | 15 | void setup() { 16 | WiFi.mode(WIFI_AP); 17 | WiFi.softAPConfig(apIP, apIP, IPAddress(255, 255, 255, 0)); 18 | WiFi.softAP("DNSServer CaptivePortal example"); 19 | 20 | // if DNSServer is started with "*" for domain name, it will reply with 21 | // provided IP to all DNS request 22 | dnsServer.start(DNS_PORT, "*", apIP); 23 | 24 | // replay to all requests with same HTML 25 | webServer.onNotFound([]() { 26 | webServer.send(200, "text/html", responseHTML); 27 | }); 28 | webServer.begin(); 29 | } 30 | 31 | void loop() { 32 | dnsServer.processNextRequest(); 33 | webServer.handleClient(); 34 | } 35 | -------------------------------------------------------------------------------- /libraries/DNSServer/examples/CaptivePortalAdvanced/credentials.ino: -------------------------------------------------------------------------------- 1 | /** Load WLAN credentials from EEPROM */ 2 | void loadCredentials() { 3 | EEPROM.begin(512); 4 | EEPROM.get(0, ssid); 5 | EEPROM.get(0+sizeof(ssid), password); 6 | char ok[2+1]; 7 | EEPROM.get(0+sizeof(ssid)+sizeof(password), ok); 8 | EEPROM.end(); 9 | if (String(ok) != String("OK")) { 10 | ssid[0] = 0; 11 | password[0] = 0; 12 | } 13 | Serial.println("Recovered credentials:"); 14 | Serial.println(ssid); 15 | Serial.println(strlen(password)>0?"********":""); 16 | } 17 | 18 | /** Store WLAN credentials to EEPROM */ 19 | void saveCredentials() { 20 | EEPROM.begin(512); 21 | EEPROM.put(0, ssid); 22 | EEPROM.put(0+sizeof(ssid), password); 23 | char ok[2+1] = "OK"; 24 | EEPROM.put(0+sizeof(ssid)+sizeof(password), ok); 25 | EEPROM.commit(); 26 | EEPROM.end(); 27 | } 28 | -------------------------------------------------------------------------------- /libraries/DNSServer/examples/CaptivePortalAdvanced/tools.ino: -------------------------------------------------------------------------------- 1 | /** Is this an IP? */ 2 | boolean isIp(String str) { 3 | for (int i = 0; i < str.length(); i++) { 4 | int c = str.charAt(i); 5 | if (c != '.' && (c < '0' || c > '9')) { 6 | return false; 7 | } 8 | } 9 | return true; 10 | } 11 | 12 | /** IP to String? */ 13 | String toStringIp(IPAddress ip) { 14 | String res = ""; 15 | for (int i = 0; i < 3; i++) { 16 | res += String((ip >> (8 * i)) & 0xFF) + "."; 17 | } 18 | res += String(((ip >> 8 * 3)) & 0xFF); 19 | return res; 20 | } 21 | 22 | -------------------------------------------------------------------------------- /libraries/DNSServer/examples/DNSServer/DNSServer.ino: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | const byte DNS_PORT = 53; 6 | IPAddress apIP(192, 168, 1, 1); 7 | DNSServer dnsServer; 8 | ESP8266WebServer webServer(80); 9 | 10 | void setup() { 11 | WiFi.mode(WIFI_AP); 12 | WiFi.softAPConfig(apIP, apIP, IPAddress(255, 255, 255, 0)); 13 | WiFi.softAP("DNSServer example"); 14 | 15 | // modify TTL associated with the domain name (in seconds) 16 | // default is 60 seconds 17 | dnsServer.setTTL(300); 18 | // set which return code will be used for all other domains (e.g. sending 19 | // ServerFailure instead of NonExistentDomain will reduce number of queries 20 | // sent by clients) 21 | // default is DNSReplyCode::NonExistentDomain 22 | dnsServer.setErrorReplyCode(DNSReplyCode::ServerFailure); 23 | 24 | // start DNS server for a specific domain name 25 | dnsServer.start(DNS_PORT, "www.example.com", apIP); 26 | 27 | // simple HTTP server to see that DNS server is working 28 | webServer.onNotFound([]() { 29 | String message = "Hello World!\n\n"; 30 | message += "URI: "; 31 | message += webServer.uri(); 32 | 33 | webServer.send(200, "text/plain", message); 34 | }); 35 | webServer.begin(); 36 | } 37 | 38 | void loop() { 39 | dnsServer.processNextRequest(); 40 | webServer.handleClient(); 41 | } 42 | -------------------------------------------------------------------------------- /libraries/DNSServer/library.properties: -------------------------------------------------------------------------------- 1 | name=DNSServer 2 | version=1.1.0 3 | author=Kristijan Novoselić 4 | maintainer=Kristijan Novoselić, 5 | sentence=A simple DNS server for ESP8266. 6 | paragraph=This library implements a simple DNS server. 7 | category=Communication 8 | url= 9 | architectures=esp8266 10 | -------------------------------------------------------------------------------- /libraries/EEPROM/examples/eeprom_clear/eeprom_clear.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * EEPROM Clear 3 | * 4 | * Sets all of the bytes of the EEPROM to 0. 5 | * This example code is in the public domain. 6 | 7 | */ 8 | 9 | #include 10 | 11 | void setup() 12 | { 13 | EEPROM.begin(512); 14 | // write a 0 to all 512 bytes of the EEPROM 15 | for (int i = 0; i < 512; i++) 16 | EEPROM.write(i, 0); 17 | 18 | // turn the LED on when we're done 19 | pinMode(13, OUTPUT); 20 | digitalWrite(13, HIGH); 21 | EEPROM.end(); 22 | } 23 | 24 | void loop() 25 | { 26 | } 27 | -------------------------------------------------------------------------------- /libraries/EEPROM/examples/eeprom_read/eeprom_read.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * EEPROM Read 3 | * 4 | * Reads the value of each byte of the EEPROM and prints it 5 | * to the computer. 6 | * This example code is in the public domain. 7 | */ 8 | 9 | #include 10 | 11 | // start reading from the first byte (address 0) of the EEPROM 12 | int address = 0; 13 | byte value; 14 | 15 | void setup() 16 | { 17 | // initialize serial and wait for port to open: 18 | Serial.begin(9600); 19 | while (!Serial) { 20 | ; // wait for serial port to connect. Needed for Leonardo only 21 | } 22 | EEPROM.begin(512); 23 | } 24 | 25 | void loop() 26 | { 27 | // read a byte from the current address of the EEPROM 28 | value = EEPROM.read(address); 29 | 30 | Serial.print(address); 31 | Serial.print("\t"); 32 | Serial.print(value, DEC); 33 | Serial.println(); 34 | 35 | // advance to the next address of the EEPROM 36 | address = address + 1; 37 | 38 | // there are only 512 bytes of EEPROM, from 0 to 511, so if we're 39 | // on address 512, wrap around to address 0 40 | if (address == 512) 41 | address = 0; 42 | 43 | delay(500); 44 | } 45 | -------------------------------------------------------------------------------- /libraries/EEPROM/examples/eeprom_write/eeprom_write.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * EEPROM Write 3 | * 4 | * Stores values read from analog input 0 into the EEPROM. 5 | * These values will stay in the EEPROM when the board is 6 | * turned off and may be retrieved later by another sketch. 7 | */ 8 | 9 | #include 10 | 11 | // the current address in the EEPROM (i.e. which byte 12 | // we're going to write to next) 13 | int addr = 0; 14 | 15 | void setup() 16 | { 17 | EEPROM.begin(512); 18 | } 19 | 20 | void loop() 21 | { 22 | // need to divide by 4 because analog inputs range from 23 | // 0 to 1023 and each byte of the EEPROM can only hold a 24 | // value from 0 to 255. 25 | int val = analogRead(A0) / 4; 26 | 27 | // write the value to the appropriate byte of the EEPROM. 28 | // these values will remain there when the board is 29 | // turned off. 30 | EEPROM.write(addr, val); 31 | 32 | // advance to the next address. there are 512 bytes in 33 | // the EEPROM, so go back to 0 when we hit 512. 34 | // save all changes to the flash. 35 | addr = addr + 1; 36 | if (addr == 512) 37 | { 38 | addr = 0; 39 | EEPROM.commit(); 40 | } 41 | 42 | delay(100); 43 | } 44 | -------------------------------------------------------------------------------- /libraries/EEPROM/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map For Ultrasound 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | EEPROM KEYWORD1 10 | 11 | ####################################### 12 | # Methods and Functions (KEYWORD2) 13 | ####################################### 14 | 15 | ####################################### 16 | # Constants (LITERAL1) 17 | ####################################### 18 | 19 | -------------------------------------------------------------------------------- /libraries/EEPROM/library.properties: -------------------------------------------------------------------------------- 1 | name=EEPROM 2 | version=1.0 3 | author=Ivan Grokhotkov 4 | maintainer=Ivan Grokhotkov 5 | sentence=Enables reading and writing data to the permanent FLASH storage, up to 4kb. 6 | paragraph= 7 | category=Data Storage 8 | url=http://arduino.cc/en/Reference/EEPROM 9 | architectures=esp8266 10 | -------------------------------------------------------------------------------- /libraries/ESP8266AVRISP/library.properties: -------------------------------------------------------------------------------- 1 | name=ESP8266AVRISP 2 | version=1.0 3 | author=Kiril Zyapkov 4 | maintainer=Kiril Zyapkov 5 | sentence=AVR In-System Programming over WiFi for ESP8266 6 | paragraph=This library allows programming 8-bit AVR ICSP targets via TCP over WiFi with ESP8266. 7 | category=Communication 8 | url= 9 | architectures=esp8266 10 | -------------------------------------------------------------------------------- /libraries/ESP8266HTTPClient/examples/ReuseConnection/ReuseConnection.ino: -------------------------------------------------------------------------------- 1 | /** 2 | * reuseConnection.ino 3 | * 4 | * Created on: 22.11.2015 5 | * 6 | */ 7 | 8 | 9 | #include 10 | 11 | #include 12 | #include 13 | 14 | #include 15 | 16 | #define USE_SERIAL Serial 17 | 18 | ESP8266WiFiMulti WiFiMulti; 19 | 20 | HTTPClient http; 21 | 22 | void setup() { 23 | 24 | USE_SERIAL.begin(115200); 25 | // USE_SERIAL.setDebugOutput(true); 26 | 27 | USE_SERIAL.println(); 28 | USE_SERIAL.println(); 29 | USE_SERIAL.println(); 30 | 31 | for(uint8_t t = 4; t > 0; t--) { 32 | USE_SERIAL.printf("[SETUP] WAIT %d...\n", t); 33 | USE_SERIAL.flush(); 34 | delay(1000); 35 | } 36 | 37 | WiFiMulti.addAP("SSID", "PASSWORD"); 38 | 39 | 40 | } 41 | 42 | void loop() { 43 | // wait for WiFi connection 44 | if((WiFiMulti.run() == WL_CONNECTED)) { 45 | 46 | http.begin("192.168.1.12", 80, "/test.html"); 47 | 48 | int httpCode = http.GET(); 49 | if(httpCode) { 50 | USE_SERIAL.printf("[HTTP] GET... code: %d\n", httpCode); 51 | 52 | // file found at server 53 | if(httpCode == 200) { 54 | http.writeToStream(&USE_SERIAL); 55 | } 56 | } else { 57 | USE_SERIAL.print("[HTTP] GET... failed, no connection or no HTTP server\n"); 58 | } 59 | } 60 | 61 | delay(1000); 62 | } 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /libraries/ESP8266HTTPClient/library.properties: -------------------------------------------------------------------------------- 1 | name=ESP8266HTTPClient 2 | version=1.0 3 | author=Markus Sattler 4 | maintainer=Markus Sattler 5 | sentence=http Client for ESP8266 6 | paragraph= 7 | category=Communication 8 | url=https://github.com/Links2004/Arduino/tree/libraries/ESP8266HTTPClient 9 | architectures=esp8266 10 | -------------------------------------------------------------------------------- /libraries/ESP8266HTTPUpdateServer/examples/WebUpdater/WebUpdater.ino: -------------------------------------------------------------------------------- 1 | /* 2 | To upload through terminal you can use: curl -F "image=@firmware.bin" esp8266-webupdate.local/update 3 | */ 4 | 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | const char* host = "esp8266-webupdate"; 12 | const char* ssid = "........"; 13 | const char* password = "........"; 14 | 15 | ESP8266WebServer httpServer(80); 16 | ESP8266HTTPUpdateServer httpUpdater; 17 | 18 | void setup(void){ 19 | 20 | Serial.begin(115200); 21 | Serial.println(); 22 | Serial.println("Booting Sketch..."); 23 | WiFi.mode(WIFI_AP_STA); 24 | WiFi.begin(ssid, password); 25 | 26 | while(WiFi.waitForConnectResult() != WL_CONNECTED){ 27 | WiFi.begin(ssid, password); 28 | Serial.println("WiFi failed, retrying."); 29 | } 30 | 31 | MDNS.begin(host); 32 | 33 | httpUpdater.setup(&httpServer); 34 | httpServer.begin(); 35 | 36 | MDNS.addService("http", "tcp", 80); 37 | Serial.printf("HTTPUpdateServer ready! Open http://%s.local/update in your browser\n", host); 38 | } 39 | 40 | void loop(void){ 41 | httpServer.handleClient(); 42 | delay(1); 43 | } 44 | -------------------------------------------------------------------------------- /libraries/ESP8266HTTPUpdateServer/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map For HTTPUpdateServer 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | ESP8266HTTPUpdateServer KEYWORD1 10 | 11 | ####################################### 12 | # Methods and Functions (KEYWORD2) 13 | ####################################### 14 | 15 | begin KEYWORD2 16 | setup KEYWORD2 17 | 18 | ####################################### 19 | # Constants (LITERAL1) 20 | ####################################### 21 | -------------------------------------------------------------------------------- /libraries/ESP8266HTTPUpdateServer/library.properties: -------------------------------------------------------------------------------- 1 | name=ESP8266HTTPUpdateServer 2 | version=1.0 3 | author=Ivan Grokhotkov, Miguel Ángel Ajo 4 | maintainer=Ivan Grokhtkov 5 | sentence=Simple HTTP Update server based on the ESP8266WebServer 6 | paragraph=The library accepts HTTP post requests to the /update url, and updates the ESP8266 firmware. 7 | category=Communication 8 | url= 9 | architectures=esp8266 10 | -------------------------------------------------------------------------------- /libraries/ESP8266HTTPUpdateServer/src/ESP8266HTTPUpdateServer.h: -------------------------------------------------------------------------------- 1 | #ifndef __HTTP_UPDATE_SERVER_H 2 | #define __HTTP_UPDATE_SERVER_H 3 | 4 | class ESP8266WebServer; 5 | 6 | class ESP8266HTTPUpdateServer 7 | { 8 | private: 9 | bool _serial_output; 10 | ESP8266WebServer *_server; 11 | static const char *_serverIndex; 12 | public: 13 | ESP8266HTTPUpdateServer(bool serial_debug=false); 14 | void setup(ESP8266WebServer *server=NULL); 15 | }; 16 | 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /libraries/ESP8266SSDP/README.md: -------------------------------------------------------------------------------- 1 | ESP8266 Simple Service Discovery 2 | Copyright (c) 2015 Hristo Gochkov 3 | Original (Arduino) version by Filippo Sallemi, July 23, 2014. 4 | Can be found at: https://github.com/nomadnt/uSSDP 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. -------------------------------------------------------------------------------- /libraries/ESP8266WebServer/examples/FSBrowser/data/edit.htm.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/libraries/ESP8266WebServer/examples/FSBrowser/data/edit.htm.gz -------------------------------------------------------------------------------- /libraries/ESP8266WebServer/examples/FSBrowser/data/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/libraries/ESP8266WebServer/examples/FSBrowser/data/favicon.ico -------------------------------------------------------------------------------- /libraries/ESP8266WebServer/examples/FSBrowser/data/graphs.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/libraries/ESP8266WebServer/examples/FSBrowser/data/graphs.js.gz -------------------------------------------------------------------------------- /libraries/ESP8266WebServer/examples/SDWebServer/SdRoot/index.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ESP Index 6 | 12 | 17 | 18 | 19 |

ESP8266 Pin Functions

20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /libraries/ESP8266WebServer/examples/SDWebServer/SdRoot/pins.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/libraries/ESP8266WebServer/examples/SDWebServer/SdRoot/pins.png -------------------------------------------------------------------------------- /libraries/ESP8266WebServer/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map For Ultrasound 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | ESP8266WebServer KEYWORD1 10 | HTTPMethod KEYWORD1 11 | 12 | ####################################### 13 | # Methods and Functions (KEYWORD2) 14 | ####################################### 15 | 16 | begin KEYWORD2 17 | handleClient KEYWORD2 18 | on KEYWORD2 19 | addHandler KEYWORD2 20 | uri KEYWORD2 21 | method KEYWORD2 22 | client KEYWORD2 23 | send KEYWORD2 24 | arg KEYWORD2 25 | argName KEYWORD2 26 | args KEYWORD2 27 | hasArg KEYWORD2 28 | onNotFound KEYWORD2 29 | 30 | ####################################### 31 | # Constants (LITERAL1) 32 | ####################################### 33 | 34 | HTTP_GET LITERAL1 35 | HTTP_POST LITERAL1 36 | HTTP_ANY LITERAL1 37 | -------------------------------------------------------------------------------- /libraries/ESP8266WebServer/library.properties: -------------------------------------------------------------------------------- 1 | name=ESP8266WebServer 2 | version=1.0 3 | author=Ivan Grokhotkov 4 | maintainer=Ivan Grokhtkov 5 | sentence=Simple web server library 6 | paragraph=The library supports HTTP GET and POST requests, provides argument parsing, handles one client at a time. 7 | category=Communication 8 | url= 9 | architectures=esp8266 10 | -------------------------------------------------------------------------------- /libraries/ESP8266WebServer/src/detail/RequestHandler.h: -------------------------------------------------------------------------------- 1 | #ifndef REQUESTHANDLER_H 2 | #define REQUESTHANDLER_H 3 | 4 | class RequestHandler { 5 | public: 6 | virtual bool canHandle(HTTPMethod method, String uri) { return false; } 7 | virtual bool canUpload(String uri) { return false; } 8 | virtual bool handle(ESP8266WebServer& server, HTTPMethod requestMethod, String requestUri) { return false; } 9 | virtual void upload(ESP8266WebServer& server, String requestUri, HTTPUpload& upload) {} 10 | 11 | RequestHandler* next() { return _next; } 12 | void next(RequestHandler* r) { _next = r; } 13 | 14 | private: 15 | RequestHandler* _next = nullptr; 16 | }; 17 | 18 | #endif //REQUESTHANDLER_H 19 | -------------------------------------------------------------------------------- /libraries/ESP8266WiFi/examples/WiFiMulti/WiFiMulti.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * This sketch trys to Connect to the best AP based on a given list 3 | * 4 | */ 5 | 6 | #include 7 | #include 8 | 9 | ESP8266WiFiMulti wifiMulti; 10 | 11 | void setup() { 12 | Serial.begin(115200); 13 | delay(10); 14 | 15 | wifiMulti.addAP("ssid_from_AP_1", "your_password_for_AP_1"); 16 | wifiMulti.addAP("ssid_from_AP_2", "your_password_for_AP_2"); 17 | wifiMulti.addAP("ssid_from_AP_3", "your_password_for_AP_3"); 18 | 19 | Serial.println("Connecting Wifi..."); 20 | if(wifiMulti.run() == WL_CONNECTED) { 21 | Serial.println(""); 22 | Serial.println("WiFi connected"); 23 | Serial.println("IP address: "); 24 | Serial.println(WiFi.localIP()); 25 | } 26 | } 27 | 28 | void loop() { 29 | if(wifiMulti.run() != WL_CONNECTED) { 30 | Serial.println("WiFi not connected!"); 31 | delay(1000); 32 | } 33 | } -------------------------------------------------------------------------------- /libraries/ESP8266WiFi/examples/WiFiScan/WiFiScan.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * This sketch demonstrates how to scan WiFi networks. 3 | * The API is almost the same as with the WiFi Shield library, 4 | * the most obvious difference being the different file you need to include: 5 | */ 6 | #include "ESP8266WiFi.h" 7 | 8 | void setup() { 9 | Serial.begin(115200); 10 | 11 | // Set WiFi to station mode and disconnect from an AP if it was previously connected 12 | WiFi.mode(WIFI_STA); 13 | WiFi.disconnect(); 14 | delay(100); 15 | 16 | Serial.println("Setup done"); 17 | } 18 | 19 | void loop() { 20 | Serial.println("scan start"); 21 | 22 | // WiFi.scanNetworks will return the number of networks found 23 | int n = WiFi.scanNetworks(); 24 | Serial.println("scan done"); 25 | if (n == 0) 26 | Serial.println("no networks found"); 27 | else 28 | { 29 | Serial.print(n); 30 | Serial.println(" networks found"); 31 | for (int i = 0; i < n; ++i) 32 | { 33 | // Print SSID and RSSI for each network found 34 | Serial.print(i + 1); 35 | Serial.print(": "); 36 | Serial.print(WiFi.SSID(i)); 37 | Serial.print(" ("); 38 | Serial.print(WiFi.RSSI(i)); 39 | Serial.print(")"); 40 | Serial.println((WiFi.encryptionType(i) == ENC_TYPE_NONE)?" ":"*"); 41 | delay(10); 42 | } 43 | } 44 | Serial.println(""); 45 | 46 | // Wait a bit before scanning again 47 | delay(5000); 48 | } 49 | -------------------------------------------------------------------------------- /libraries/ESP8266WiFi/library.properties: -------------------------------------------------------------------------------- 1 | name=ESP8266WiFi 2 | version=1.0 3 | author=Ivan Grokhotkov 4 | maintainer=Ivan Grokhtkov 5 | sentence=Enables network connection (local and Internet) using the ESP8266 built-in WiFi. 6 | paragraph=With this library you can instantiate Servers, Clients and send/receive UDP packets through WiFi. The shield can connect either to open or encrypted networks (WEP, WPA). The IP address can be assigned statically or through a DHCP. The library can also manage DNS. 7 | category=Communication 8 | url= 9 | architectures=esp8266 10 | -------------------------------------------------------------------------------- /libraries/ESP8266WiFi/src/arch/sys_arch.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/libraries/ESP8266WiFi/src/arch/sys_arch.h -------------------------------------------------------------------------------- /libraries/ESP8266WiFi/src/include/slist.h: -------------------------------------------------------------------------------- 1 | #ifndef SLIST_H 2 | #define SLIST_H 3 | 4 | template 5 | class SList { 6 | public: 7 | SList() : _next(0) { } 8 | 9 | protected: 10 | 11 | static void _add(T* self) { 12 | T* tmp = _s_first; 13 | _s_first = self; 14 | self->_next = tmp; 15 | } 16 | 17 | static void _remove(T* self) { 18 | if (_s_first == self) { 19 | _s_first = self->_next; 20 | self->_next = 0; 21 | return; 22 | } 23 | 24 | for (T* prev = _s_first; prev->_next; prev = prev->_next) { 25 | if (prev->_next == self) { 26 | prev->_next = self->_next; 27 | self->_next = 0; 28 | return; 29 | } 30 | } 31 | } 32 | 33 | static T* _s_first; 34 | T* _next; 35 | }; 36 | 37 | 38 | #endif //SLIST_H 39 | -------------------------------------------------------------------------------- /libraries/ESP8266WiFi/src/lwip/icmp.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/libraries/ESP8266WiFi/src/lwip/icmp.h -------------------------------------------------------------------------------- /libraries/ESP8266WiFi/src/lwip/mem_manager.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/libraries/ESP8266WiFi/src/lwip/mem_manager.h -------------------------------------------------------------------------------- /libraries/ESP8266WiFi/src/lwip/netif.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/libraries/ESP8266WiFi/src/lwip/netif.h -------------------------------------------------------------------------------- /libraries/ESP8266WiFi/src/lwip/tcp_impl.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/libraries/ESP8266WiFi/src/lwip/tcp_impl.h -------------------------------------------------------------------------------- /libraries/ESP8266WiFiMesh/examples/HelloMesh/HelloMesh.ino: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | /* Create the mesh node object */ 5 | ESP8266WiFiMesh mesh_node = ESP8266WiFiMesh(ESP.getChipId(), manageRequest); 6 | 7 | /** 8 | * Callback for when other nodes send you data 9 | * 10 | * @request The string received from another node in the mesh 11 | * @returns The string to send back to the other node 12 | */ 13 | String manageRequest(String request) 14 | { 15 | /* Print out received message */ 16 | Serial.print("received: "); 17 | Serial.println(request); 18 | 19 | /* return a string to send back */ 20 | return String("Hello world response."); 21 | } 22 | 23 | void setup() 24 | { 25 | Serial.begin(115200); 26 | delay(10); 27 | 28 | Serial.println(); 29 | Serial.println(); 30 | Serial.println("Setting up mesh node..."); 31 | 32 | /* Initialise the mesh node */ 33 | mesh_node.begin(); 34 | } 35 | 36 | void loop() 37 | { 38 | /* Accept any incoming connections */ 39 | mesh_node.acceptRequest(); 40 | 41 | /* Scan for other nodes and send them a message */ 42 | mesh_node.attemptScan("Hello world request."); 43 | delay(1000); 44 | } 45 | -------------------------------------------------------------------------------- /libraries/ESP8266WiFiMesh/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map For ESP8266WiFiMesh 3 | ####################################### 4 | 5 | ####################################### 6 | # Library (KEYWORD3) 7 | ####################################### 8 | 9 | ESP8266WiFiMesh KEYWORD3 10 | 11 | ####################################### 12 | # Datatypes (KEYWORD1) 13 | ####################################### 14 | 15 | ESP8266WiFiMesh KEYWORD1 16 | 17 | ####################################### 18 | # Methods and Functions (KEYWORD2) 19 | ####################################### 20 | 21 | begin KEYWORD2 22 | attemptScan KEYWORD2 23 | acceptRequest KEYWORD2 24 | -------------------------------------------------------------------------------- /libraries/ESP8266WiFiMesh/library.properties: -------------------------------------------------------------------------------- 1 | name=ESP8266WiFiMesh 2 | version=1.0 3 | author=Julian Fell 4 | maintainer= 5 | sentence=Mesh network library 6 | paragraph=The library sets up a Mesh Node which acts as a router, creating a Mesh Network with other nodes. 7 | category=Communication 8 | url= 9 | architectures=esp8266 10 | -------------------------------------------------------------------------------- /libraries/ESP8266httpUpdate/library.properties: -------------------------------------------------------------------------------- 1 | name=ESP8266httpUpdate 2 | version=1.0 3 | author=Markus Sattler 4 | maintainer=Markus Sattler 5 | sentence=Http Update for ESP8266 6 | paragraph= 7 | category=Data Processing 8 | url=https://github.com/Links2004/Arduino/tree/esp8266/hardware/esp8266com/esp8266/libraries/ESP8266httpUpdate 9 | architectures=esp8266 10 | -------------------------------------------------------------------------------- /libraries/ESP8266mDNS/examples/OTA-mDNS-SPIFFS/data/cl_conf.txt: -------------------------------------------------------------------------------- 1 | YOUR_SSID 2 | YOUR_PSK 3 | -------------------------------------------------------------------------------- /libraries/ESP8266mDNS/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map For Ultrasound 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | ESP8266mDNS KEYWORD1 10 | MDNSResponder KEYWORD1 11 | MDNS KEYWORD1 12 | 13 | ####################################### 14 | # Methods and Functions (KEYWORD2) 15 | ####################################### 16 | 17 | begin KEYWORD2 18 | update KEYWORD2 19 | addService KEYWORD2 20 | enableArduino KEYWORD2 21 | 22 | ####################################### 23 | # Constants (LITERAL1) 24 | ####################################### 25 | 26 | -------------------------------------------------------------------------------- /libraries/Ethernet/README.adoc: -------------------------------------------------------------------------------- 1 | = Ethernet Library for Arduino = 2 | 3 | With the Arduino Ethernet Shield, this library allows an Arduino board to connect to the internet. 4 | 5 | For more information about this library please visit us at 6 | http://www.arduino.cc/en/Reference/Ethernet 7 | 8 | modified to run on the ESP8266 9 | 10 | == License == 11 | 12 | Copyright (c) 2010 Arduino LLC. All right reserved. 13 | 14 | This library is free software; you can redistribute it and/or 15 | modify it under the terms of the GNU Lesser General Public 16 | License as published by the Free Software Foundation; either 17 | version 2.1 of the License, or (at your option) any later version. 18 | 19 | This library is distributed in the hope that it will be useful, 20 | but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 22 | Lesser General Public License for more details. 23 | 24 | You should have received a copy of the GNU Lesser General Public 25 | License along with this library; if not, write to the Free Software 26 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 27 | -------------------------------------------------------------------------------- /libraries/Ethernet/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map For Ethernet 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | Ethernet KEYWORD1 Ethernet 10 | EthernetClient KEYWORD1 EthernetClient 11 | EthernetServer KEYWORD1 EthernetServer 12 | IPAddress KEYWORD1 EthernetIPAddress 13 | 14 | ####################################### 15 | # Methods and Functions (KEYWORD2) 16 | ####################################### 17 | 18 | status KEYWORD2 19 | connect KEYWORD2 20 | write KEYWORD2 21 | available KEYWORD2 22 | read KEYWORD2 23 | peek KEYWORD2 24 | flush KEYWORD2 25 | stop KEYWORD2 26 | connected KEYWORD2 27 | begin KEYWORD2 28 | beginPacket KEYWORD2 29 | endPacket KEYWORD2 30 | parsePacket KEYWORD2 31 | remoteIP KEYWORD2 32 | remotePort KEYWORD2 33 | 34 | ####################################### 35 | # Constants (LITERAL1) 36 | ####################################### 37 | 38 | -------------------------------------------------------------------------------- /libraries/Ethernet/library.properties: -------------------------------------------------------------------------------- 1 | name=Ethernet 2 | version=1.0.4 3 | author=Arduino 4 | maintainer=Arduino 5 | sentence=Enables network connection (local and Internet) using the Arduino Ethernet board or shield. For all Arduino boards. 6 | paragraph=With this library you can use the Arduino Ethernet (shield or board) to connect to Internet. The library provides both Client and server functionalities. The library permits you to connect to a local network also with DHCP and to resolve DNS. 7 | category=Communication 8 | url=http://www.arduino.cc/en/Reference/Ethernet 9 | architectures=* 10 | -------------------------------------------------------------------------------- /libraries/Ethernet/src/Dns.h: -------------------------------------------------------------------------------- 1 | // Arduino DNS client for WizNet5100-based Ethernet shield 2 | // (c) Copyright 2009-2010 MCQN Ltd. 3 | // Released under Apache License, version 2.0 4 | 5 | #ifndef DNSClient_h 6 | #define DNSClient_h 7 | 8 | #include 9 | 10 | class DNSClient 11 | { 12 | public: 13 | // ctor 14 | void begin(const IPAddress& aDNSServer); 15 | 16 | /** Convert a numeric IP address string into a four-byte IP address. 17 | @param aIPAddrString IP address to convert 18 | @param aResult IPAddress structure to store the returned IP address 19 | @result 1 if aIPAddrString was successfully converted to an IP address, 20 | else error code 21 | */ 22 | int inet_aton(const char *aIPAddrString, IPAddress& aResult); 23 | 24 | /** Resolve the given hostname to an IP address. 25 | @param aHostname Name to be resolved 26 | @param aResult IPAddress structure to store the returned IP address 27 | @result 1 if aIPAddrString was successfully converted to an IP address, 28 | else error code 29 | */ 30 | int getHostByName(const char* aHostname, IPAddress& aResult); 31 | 32 | protected: 33 | uint16_t BuildRequest(const char* aName); 34 | uint16_t ProcessResponse(uint16_t aTimeout, IPAddress& aAddress); 35 | 36 | IPAddress iDNSServer; 37 | uint16_t iRequestId; 38 | EthernetUDP iUdp; 39 | }; 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /libraries/Ethernet/src/Ethernet.h: -------------------------------------------------------------------------------- 1 | #ifndef ethernet_h 2 | #define ethernet_h 3 | 4 | #include 5 | //#include "w5100.h" 6 | #include "IPAddress.h" 7 | #include "EthernetClient.h" 8 | #include "EthernetServer.h" 9 | #include "Dhcp.h" 10 | 11 | #define MAX_SOCK_NUM 4 12 | 13 | class EthernetClass { 14 | private: 15 | IPAddress _dnsServerAddress; 16 | DhcpClass* _dhcp; 17 | public: 18 | static uint8_t _state[MAX_SOCK_NUM]; 19 | static uint16_t _server_port[MAX_SOCK_NUM]; 20 | // Initialise the Ethernet shield to use the provided MAC address and gain the rest of the 21 | // configuration through DHCP. 22 | // Returns 0 if the DHCP configuration failed, and 1 if it succeeded 23 | int begin(uint8_t *mac_address); 24 | void begin(uint8_t *mac_address, IPAddress local_ip); 25 | void begin(uint8_t *mac_address, IPAddress local_ip, IPAddress dns_server); 26 | void begin(uint8_t *mac_address, IPAddress local_ip, IPAddress dns_server, IPAddress gateway); 27 | void begin(uint8_t *mac_address, IPAddress local_ip, IPAddress dns_server, IPAddress gateway, IPAddress subnet); 28 | int maintain(); 29 | 30 | IPAddress localIP(); 31 | IPAddress subnetMask(); 32 | IPAddress gatewayIP(); 33 | IPAddress dnsServerIP(); 34 | 35 | friend class EthernetClient; 36 | friend class EthernetServer; 37 | }; 38 | 39 | extern EthernetClass Ethernet; 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /libraries/Ethernet/src/EthernetClient.h: -------------------------------------------------------------------------------- 1 | #ifndef ethernetclient_h 2 | #define ethernetclient_h 3 | #include "Arduino.h" 4 | #include "Print.h" 5 | #include "Client.h" 6 | #include "IPAddress.h" 7 | 8 | class EthernetClient : public Client { 9 | 10 | public: 11 | EthernetClient(); 12 | EthernetClient(uint8_t sock); 13 | 14 | uint8_t status(); 15 | virtual int connect(IPAddress ip, uint16_t port); 16 | virtual int connect(const char *host, uint16_t port); 17 | virtual size_t write(uint8_t); 18 | virtual size_t write(const uint8_t *buf, size_t size); 19 | virtual int available(); 20 | virtual int read(); 21 | virtual int read(uint8_t *buf, size_t size); 22 | virtual int peek(); 23 | virtual void flush(); 24 | virtual void stop(); 25 | virtual uint8_t connected(); 26 | virtual operator bool(); 27 | virtual bool operator==(const bool value) { return bool() == value; } 28 | virtual bool operator!=(const bool value) { return bool() != value; } 29 | virtual bool operator==(const EthernetClient&); 30 | virtual bool operator!=(const EthernetClient& rhs) { return !this->operator==(rhs); }; 31 | 32 | friend class EthernetServer; 33 | 34 | using Print::write; 35 | 36 | private: 37 | static uint16_t _srcport; 38 | uint8_t _sock; 39 | }; 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /libraries/Ethernet/src/EthernetServer.h: -------------------------------------------------------------------------------- 1 | #ifndef ethernetserver_h 2 | #define ethernetserver_h 3 | 4 | #include "Server.h" 5 | 6 | class EthernetClient; 7 | 8 | class EthernetServer : 9 | public Server { 10 | private: 11 | uint16_t _port; 12 | void accept(); 13 | public: 14 | EthernetServer(uint16_t); 15 | EthernetClient available(); 16 | virtual void begin(); 17 | virtual size_t write(uint8_t); 18 | virtual size_t write(const uint8_t *buf, size_t size); 19 | using Print::write; 20 | }; 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /libraries/Ethernet/src/utility/util.h: -------------------------------------------------------------------------------- 1 | #ifndef UTIL_H 2 | #define UTIL_H 3 | 4 | #define htons(x) ( ((x)<< 8 & 0xFF00) | \ 5 | ((x)>> 8 & 0x00FF) ) 6 | #define ntohs(x) htons(x) 7 | 8 | #define htonl(x) ( ((x)<<24 & 0xFF000000UL) | \ 9 | ((x)<< 8 & 0x00FF0000UL) | \ 10 | ((x)>> 8 & 0x0000FF00UL) | \ 11 | ((x)>>24 & 0x000000FFUL) ) 12 | #define ntohl(x) htonl(x) 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /libraries/GDBStub/library.properties: -------------------------------------------------------------------------------- 1 | name=GDBStub 2 | version=0.1 3 | author=Marko Mikulicic (Cesanta) 4 | maintainer=Ivan Grokhotkov 5 | sentence=GDB server stub from Cesanta's Smart.js 6 | paragraph=GDB server stub helps debug crashes when JTAG isn't an option. 7 | category=Uncategorized 8 | url=https://github.com/cesanta/smart.js 9 | architectures=esp8266 10 | -------------------------------------------------------------------------------- /libraries/GDBStub/src/GDBStub.h: -------------------------------------------------------------------------------- 1 | #ifndef GDBSTUB_H 2 | #define GDBSTUB_H 3 | 4 | // this header is intentionally left blank 5 | 6 | #endif //GDBSTUB_H 7 | -------------------------------------------------------------------------------- /libraries/Hash/examples/sha1/sha1.ino: -------------------------------------------------------------------------------- 1 | /** 2 | * simple demo to show sha1 calculation 3 | */ 4 | #include 5 | #include 6 | 7 | void setup() { 8 | Serial.begin(921600); 9 | } 10 | 11 | void loop() { 12 | 13 | // usage as String 14 | // SHA1:a94a8fe5ccb19ba61c4c0873d391e987982fbbd3 15 | 16 | Serial.print("SHA1:"); 17 | Serial.println(sha1("abc")); 18 | 19 | // usage as ptr 20 | // SHA1:a94a8fe5ccb19ba61c4c0873d391e987982fbbd3 21 | uint8_t hash[20]; 22 | sha1("abc", &hash[0]); 23 | 24 | Serial.print("SHA1:"); 25 | for(uint16_t i = 0; i < 20; i++) { 26 | Serial.printf("%02x", hash[i]); 27 | } 28 | Serial.println(); 29 | 30 | delay(1000); 31 | } 32 | 33 | -------------------------------------------------------------------------------- /libraries/Hash/library.properties: -------------------------------------------------------------------------------- 1 | name=Hash 2 | version=1.0 3 | author=Markus Sattler 4 | maintainer=Markus Sattler 5 | sentence=Generate Hash from data 6 | paragraph= 7 | category=Data Processing 8 | url= 9 | architectures=esp8266 10 | -------------------------------------------------------------------------------- /libraries/Hash/src/sha1/sha1.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file sha1.h 3 | * @date 20.05.2015 4 | * @author Steve Reid 5 | * 6 | * from: http://www.virtualbox.org/svn/vbox/trunk/src/recompiler/tests/sha1.c 7 | */ 8 | 9 | /* ================ sha1.h ================ */ 10 | /* 11 | SHA-1 in C 12 | By Steve Reid 13 | 100% Public Domain 14 | */ 15 | 16 | #ifndef SHA1_H_ 17 | #define SHA1_H_ 18 | 19 | typedef struct { 20 | uint32_t state[5]; 21 | uint32_t count[2]; 22 | unsigned char buffer[64]; 23 | } SHA1_CTX; 24 | 25 | void SHA1Transform(uint32_t state[5], uint8_t buffer[64]); 26 | void SHA1Init(SHA1_CTX* context); 27 | void SHA1Update(SHA1_CTX* context, uint8_t* data, uint32_t len); 28 | void SHA1Final(unsigned char digest[20], SHA1_CTX* context); 29 | 30 | #endif /* SHA1_H_ */ 31 | 32 | /* ================ end of sha1.h ================ */ 33 | -------------------------------------------------------------------------------- /libraries/LinkedList/.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /libraries/LinkedList/LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Ivan Seidel 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /libraries/LinkedList/examples/SimpleIntegerList/SimpleIntegerList.pde: -------------------------------------------------------------------------------- 1 | /* 2 | LinkedList Example 3 | Link: http://github.com/ivanseidel/LinkedList 4 | 5 | Example Created by 6 | Tom Stewart, github.com/tastewar 7 | 8 | Edited by: 9 | Ivan Seidel, github.com/ivanseidel 10 | */ 11 | #include 12 | 13 | LinkedList myList = LinkedList(); 14 | 15 | void setup() 16 | { 17 | 18 | Serial.begin(9600); 19 | Serial.println("Hello!"); 20 | 21 | // Add some stuff to the list 22 | int k = -240, 23 | l = 123, 24 | m = -2, 25 | n = 222; 26 | myList.add(n); 27 | myList.add(0); 28 | myList.add(l); 29 | myList.add(17); 30 | myList.add(k); 31 | myList.add(m); 32 | } 33 | 34 | void loop() { 35 | 36 | int listSize = myList.size(); 37 | 38 | Serial.print("There are "); 39 | Serial.print(listSize); 40 | Serial.print(" integers in the list. The negative ones are: "); 41 | 42 | // Print Negative numbers 43 | for (int h = 0; h < listSize; h++) { 44 | 45 | // Get value from list 46 | int val = myList.get(h); 47 | 48 | // If the value is negative, print it 49 | if (val < 0) { 50 | Serial.print(" "); 51 | Serial.print(val); 52 | } 53 | } 54 | 55 | while (true); // nothing else to do, loop forever 56 | } 57 | 58 | 59 | -------------------------------------------------------------------------------- /libraries/LinkedList/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | LinkedList KEYWORD1 10 | ListNode KEYWORD1 11 | 12 | ####################################### 13 | # Methods and Functions (KEYWORD2) 14 | ####################################### 15 | 16 | size KEYWORD2 17 | add KEYWORD2 18 | unshift KEYWORD2 19 | set KEYWORD2 20 | remove KEYWORD2 21 | pop KEYWORD2 22 | shift KEYWORD2 23 | get KEYWORD2 24 | clear KEYWORD2 25 | 26 | ####################################### 27 | # Constants (LITERAL1) 28 | ####################################### 29 | -------------------------------------------------------------------------------- /libraries/LinkedList/library.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "LinkedList", 3 | "keywords": "pattern", 4 | "description": "A fully implemented LinkedList (int, float, objects, Lists or Wales) made to work with Arduino projects", 5 | "repository": 6 | { 7 | "type": "git", 8 | "url": "https://github.com/ivanseidel/LinkedList.git" 9 | }, 10 | "frameworks": "arduino", 11 | "platforms": "*" 12 | } 13 | -------------------------------------------------------------------------------- /libraries/LinkedList/library.properties: -------------------------------------------------------------------------------- 1 | name=LinkedList 2 | version=1.2.3 3 | author=Ivan Seidel 4 | maintainer=Ivan Seidel 5 | sentence=A fully implemented LinkedList made to work with Arduino projects 6 | paragraph=The objective of this library is to create a pattern for projects. If you need to use a List of: int, float, objects, Lists or Wales. This is what you are looking for. 7 | category=Data Processing 8 | url=https://github.com/ivanseidel/LinkedList 9 | architectures=* 10 | -------------------------------------------------------------------------------- /libraries/OneWire/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map For OneWire 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | OneWire KEYWORD1 10 | 11 | ####################################### 12 | # Methods and Functions (KEYWORD2) 13 | ####################################### 14 | 15 | reset KEYWORD2 16 | write_bit KEYWORD2 17 | read_bit KEYWORD2 18 | write KEYWORD2 19 | write_bytes KEYWORD2 20 | read KEYWORD2 21 | read_bytes KEYWORD2 22 | select KEYWORD2 23 | skip KEYWORD2 24 | depower KEYWORD2 25 | reset_search KEYWORD2 26 | search KEYWORD2 27 | crc8 KEYWORD2 28 | crc16 KEYWORD2 29 | check_crc16 KEYWORD2 30 | 31 | ####################################### 32 | # Instances (KEYWORD2) 33 | ####################################### 34 | 35 | 36 | ####################################### 37 | # Constants (LITERAL1) 38 | ####################################### 39 | -------------------------------------------------------------------------------- /libraries/SD/README.adoc: -------------------------------------------------------------------------------- 1 | = SD Library for Arduino = 2 | 3 | The SD library allows for reading from and writing to SD cards. 4 | 5 | For more information about this library please visit us at 6 | http://www.arduino.cc/en/Reference/SD 7 | 8 | == License == 9 | 10 | Copyright (C) 2009 by William Greiman 11 | Copyright (c) 2010 SparkFun Electronics 12 | 13 | This program is free software: you can redistribute it and/or modify 14 | it under the terms of the GNU General Public License as published by 15 | the Free Software Foundation, either version 3 of the License, or 16 | (at your option) any later version. 17 | 18 | This program is distributed in the hope that it will be useful, 19 | but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | GNU General Public License for more details. 22 | 23 | You should have received a copy of the GNU General Public License 24 | along with this program. If not, see . 25 | -------------------------------------------------------------------------------- /libraries/SD/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map SD 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | SD KEYWORD1 SD 10 | File KEYWORD1 SD 11 | 12 | ####################################### 13 | # Methods and Functions (KEYWORD2) 14 | ####################################### 15 | begin KEYWORD2 16 | exists KEYWORD2 17 | mkdir KEYWORD2 18 | remove KEYWORD2 19 | rmdir KEYWORD2 20 | open KEYWORD2 21 | close KEYWORD2 22 | seek KEYWORD2 23 | position KEYWORD2 24 | size KEYWORD2 25 | 26 | ####################################### 27 | # Constants (LITERAL1) 28 | ####################################### 29 | FILE_READ LITERAL1 30 | FILE_WRITE LITERAL1 31 | -------------------------------------------------------------------------------- /libraries/SD/library.properties: -------------------------------------------------------------------------------- 1 | name=SD 2 | version=1.0.5 3 | author=Arduino, SparkFun 4 | maintainer=Arduino 5 | sentence=Enables reading and writing on SD cards. For all Arduino boards. 6 | paragraph=Once an SD memory card is connected to the SPI interfare of the Arduino board you are enabled to create files and read/write on them. You can also move through directories on the SD card. 7 | category=Data Storage 8 | url=http://www.arduino.cc/en/Reference/SD 9 | architectures=* 10 | -------------------------------------------------------------------------------- /libraries/SD/src/README.txt: -------------------------------------------------------------------------------- 1 | 2 | ** SD - a slightly more friendly wrapper for sdfatlib ** 3 | 4 | This library aims to expose a subset of SD card functionality in the 5 | form of a higher level "wrapper" object. 6 | 7 | License: GNU General Public License V3 8 | (Because sdfatlib is licensed with this.) 9 | 10 | (C) Copyright 2010 SparkFun Electronics 11 | 12 | Now better than ever with optimization, multiple file support, directory handling, etc - ladyada! 13 | 14 | -------------------------------------------------------------------------------- /libraries/SPI/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map SPI 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | SPI KEYWORD1 10 | 11 | ####################################### 12 | # Methods and Functions (KEYWORD2) 13 | ####################################### 14 | begin KEYWORD2 15 | end KEYWORD2 16 | transfer KEYWORD2 17 | setBitOrder KEYWORD2 18 | setDataMode KEYWORD2 19 | setClockDivider KEYWORD2 20 | 21 | 22 | ####################################### 23 | # Constants (LITERAL1) 24 | ####################################### 25 | SPI_CLOCK_DIV4 LITERAL1 26 | SPI_CLOCK_DIV16 LITERAL1 27 | SPI_CLOCK_DIV64 LITERAL1 28 | SPI_CLOCK_DIV128 LITERAL1 29 | SPI_CLOCK_DIV2 LITERAL1 30 | SPI_CLOCK_DIV8 LITERAL1 31 | SPI_CLOCK_DIV32 LITERAL1 32 | SPI_CLOCK_DIV64 LITERAL1 33 | SPI_MODE0 LITERAL1 34 | SPI_MODE1 LITERAL1 35 | SPI_MODE2 LITERAL1 36 | SPI_MODE3 LITERAL1 -------------------------------------------------------------------------------- /libraries/SPI/library.properties: -------------------------------------------------------------------------------- 1 | name=SPI 2 | version=1.0 3 | author=Arduino 4 | maintainer=Arduino 5 | sentence=Enables the communication with devices that use the Serial Peripheral Interface (SPI) Bus. For all Arduino boards, BUT Arduino DUE. 6 | paragraph= 7 | category=Signal Input/Output 8 | url=http://arduino.cc/en/Reference/SPI 9 | architectures=esp8266 10 | -------------------------------------------------------------------------------- /libraries/Servo/examples/Sweep/Sweep.ino: -------------------------------------------------------------------------------- 1 | /* Sweep 2 | by BARRAGAN 3 | This example code is in the public domain. 4 | 5 | modified 28 May 2015 6 | by Michael C. Miller 7 | modified 8 Nov 2013 8 | by Scott Fitzgerald 9 | 10 | http://arduino.cc/en/Tutorial/Sweep 11 | */ 12 | 13 | #include 14 | 15 | Servo myservo; // create servo object to control a servo 16 | // twelve servo objects can be created on most boards 17 | 18 | 19 | void setup() 20 | { 21 | myservo.attach(2); // attaches the servo on GIO2 to the servo object 22 | } 23 | 24 | void loop() 25 | { 26 | int pos; 27 | 28 | for(pos = 0; pos <= 180; pos += 1) // goes from 0 degrees to 180 degrees 29 | { // in steps of 1 degree 30 | myservo.write(pos); // tell servo to go to position in variable 'pos' 31 | delay(15); // waits 15ms for the servo to reach the position 32 | } 33 | for(pos = 180; pos>=0; pos-=1) // goes from 180 degrees to 0 degrees 34 | { 35 | myservo.write(pos); // tell servo to go to position in variable 'pos' 36 | delay(15); // waits 15ms for the servo to reach the position 37 | } 38 | } 39 | 40 | -------------------------------------------------------------------------------- /libraries/Servo/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map Servo 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | Servo KEYWORD1 Servo 10 | 11 | ####################################### 12 | # Methods and Functions (KEYWORD2) 13 | ####################################### 14 | attach KEYWORD2 15 | detach KEYWORD2 16 | write KEYWORD2 17 | read KEYWORD2 18 | attached KEYWORD2 19 | writeMicroseconds KEYWORD2 20 | readMicroseconds KEYWORD2 21 | 22 | ####################################### 23 | # Constants (LITERAL1) 24 | ####################################### 25 | -------------------------------------------------------------------------------- /libraries/Servo/library.properties: -------------------------------------------------------------------------------- 1 | name=Servo 2 | version=1.0.2 3 | author=Michael C. Miller 4 | maintainer=GitHub/esp8266/arduino 5 | sentence=Allows Esp8266 boards to control a variety of servo motors. 6 | paragraph=This library can control a great number of servos.
It makes careful use of timers: the library can control 12 servos using only 1 timer.
7 | category=Device Control 8 | url=http://arduino.cc/en/Reference/Servo 9 | architectures=esp8266 10 | -------------------------------------------------------------------------------- /libraries/SimpleButton/.gitignore: -------------------------------------------------------------------------------- 1 | # Prerequisites 2 | *.d 3 | 4 | # Compiled Object files 5 | *.slo 6 | *.lo 7 | *.o 8 | *.obj 9 | 10 | # Precompiled Headers 11 | *.gch 12 | *.pch 13 | 14 | # Compiled Dynamic libraries 15 | *.so 16 | *.dylib 17 | *.dll 18 | 19 | # Fortran module files 20 | *.mod 21 | *.smod 22 | 23 | # Compiled Static libraries 24 | *.lai 25 | *.la 26 | *.a 27 | *.lib 28 | 29 | # Executables 30 | *.exe 31 | *.out 32 | *.app 33 | -------------------------------------------------------------------------------- /libraries/SimpleButton/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Stefan Kremser 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /libraries/SimpleButton/examples/Button/Button.ino: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | using namespace simplebutton; 4 | 5 | /* 6 | One button connected to gpio 12 (D6 on the NodeMCU) 7 | It's the standard wiring as descriped here: https://www.arduino.cc/en/Tutorial/Button 8 | */ 9 | 10 | Button* b = NULL; 11 | 12 | void setup() { 13 | Serial.begin(115200); 14 | Serial.println(); 15 | 16 | b = new Button(12); 17 | 18 | Serial.println("Started"); 19 | } 20 | 21 | void loop() { 22 | b->update(); 23 | 24 | if (b->doubleClicked()) Serial.println("doubleclicked"); 25 | 26 | if (b->clicked()) Serial.println("clicked"); 27 | 28 | if (b->holding()) Serial.println("holding"); 29 | } 30 | -------------------------------------------------------------------------------- /libraries/SimpleButton/examples/Button_Event/Button_Event.ino: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | using namespace simplebutton; 4 | 5 | /* 6 | One button connected to gpio 12 (D6 on the NodeMCU) 7 | It's the standard wiring as descriped here: https://www.arduino.cc/en/Tutorial/Button 8 | */ 9 | 10 | Button* b = NULL; 11 | 12 | void setup() { 13 | Serial.begin(115200); 14 | Serial.println(); 15 | 16 | b = new Button(12); 17 | 18 | b->setOnDoubleClicked([]() { 19 | Serial.println("doubleclicked"); 20 | }); 21 | 22 | b->setOnClicked([]() { 23 | Serial.println("clicked"); 24 | }); 25 | 26 | b->setOnHolding([]() { 27 | Serial.println("holding"); 28 | }); 29 | 30 | Serial.println("Started"); 31 | } 32 | 33 | void loop() { 34 | b->update(); 35 | } -------------------------------------------------------------------------------- /libraries/SimpleButton/examples/Button_Matrix/Button_Matrix.ino: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | using namespace simplebutton; 4 | 5 | /* 6 | A 4x4 Button matrix connected to an ESP8266 (Wemos D1 mini) on pin A0. 7 | */ 8 | 9 | #define MATRIX_SIZE 16 10 | 11 | Button* matrix[MATRIX_SIZE]; 12 | 13 | // these are the analog values of each button, they probably are different on your matrix, so test and change the 14 | // values! 15 | int addresses[] = { 1023, 960, 875, 810, 695, 650, 610, 575, 515, 490, 470, 450, 410, 330, 275, 240 }; 16 | int tolerance = 5; 17 | 18 | void setup() { 19 | Serial.begin(115200); 20 | Serial.println(); 21 | 22 | for (int i = 0; i < MATRIX_SIZE; i++) { 23 | matrix[i] = new ButtonAnalog(A0, addresses[i] - tolerance, addresses[i] + tolerance); 24 | } 25 | 26 | Serial.println("Started"); 27 | } 28 | 29 | void loop() { 30 | // Serial.println(analogRead(A0)); // <- you can use this to read out the value of each button 31 | 32 | for (int i = 0; i < MATRIX_SIZE; i++) { 33 | matrix[i]->update(); 34 | if (matrix[i]->clicked()) { 35 | Serial.println("clicked " + String(i + 1)); 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /libraries/SimpleButton/examples/PullupButton/PullupButton.ino: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | using namespace simplebutton; 4 | 5 | /* 6 | One button is connected to gpio 12 (D6 on the NodeMCU) and GND 7 | */ 8 | 9 | Button* b = NULL; 10 | 11 | void setup() { 12 | Serial.begin(115200); 13 | Serial.println(); 14 | 15 | // ButtonPullup will do "pinMode(12, INPUT_PULLUP)" isntead of "pinMode(12, INPUT)". 16 | // That way you can connect it between the pin and GND and don't need the additional resistor. 17 | b = new ButtonPullup(12); 18 | 19 | Serial.println("Started"); 20 | } 21 | 22 | void loop() { 23 | b->update(); 24 | 25 | if(b->doubleClicked()) Serial.println("doubleclicked"); 26 | if(b->clicked()) Serial.println("clicked"); 27 | if(b->holded()) Serial.println("holded"); 28 | } 29 | -------------------------------------------------------------------------------- /libraries/SimpleButton/examples/RotaryEncoder/RotaryEncoder.ino: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | using namespace simplebutton; 4 | 5 | /* 6 | 1 Rotary encoder is connected to a Wemos D1 mini (ESP8266) 7 | - Rotary encoder "Key" (that's the button) is connected to gpio 12 (D6) 8 | - Rotary encoder "S1" is connected to gpio 5 (D1) - that's channel A 9 | - Rotary encoder "S4" is connected to gpio 4 (D2) - that's channel B 10 | (the labels on your rotary encoder might be different!) 11 | */ 12 | 13 | RotaryEncoder* myEncoder = NULL; 14 | int32_t previousPosition = 0; 15 | 16 | void setup() { 17 | Serial.begin(115200); 18 | Serial.println(); 19 | 20 | myEncoder = new RotaryEncoder(5, 4, 12); // channel-A, channel-B, push button (255 = not used) 21 | // myEncoder->setEncoding(2); // <- if it used x2 encoding (x1 is default) 22 | myEncoder->setMin(-128); 23 | myEncoder->setMax(127); 24 | // myEncoder->setInverted(true); 25 | // myEncoder->enableLoop(true); 26 | 27 | Serial.println("Started"); 28 | } 29 | 30 | void loop() { 31 | myEncoder->update(); 32 | 33 | int32_t currentPosition = myEncoder->getPos(); 34 | 35 | if (currentPosition != previousPosition) { 36 | previousPosition = currentPosition; 37 | Serial.print(currentPosition); 38 | if (myEncoder->incremented()) Serial.println(" up"); 39 | if (myEncoder->decremented()) Serial.println(" down"); 40 | } 41 | 42 | if (myEncoder->clicked()) { 43 | Serial.println("clicked"); 44 | } 45 | } -------------------------------------------------------------------------------- /libraries/SimpleButton/examples/Switch/Switch.ino: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | using namespace simplebutton; 4 | 5 | /* 6 | A on/off switch is connected to gpio 12 7 | - the switch connects gpio 12 to either VCC (3.3V) or GND 8 | */ 9 | 10 | Switch* s = NULL; 11 | 12 | void setup() { 13 | Serial.begin(115200); 14 | Serial.println(); 15 | 16 | s = new Switch(12); 17 | 18 | Serial.println("Started"); 19 | } 20 | 21 | void loop() { 22 | s->update(); 23 | 24 | if (s->clicked()) Serial.println("clicked"); 25 | } -------------------------------------------------------------------------------- /libraries/SimpleButton/library.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "SimpleButton", 3 | "keywords": "simple,button,spacehuhn", 4 | "description": "Manage buttons easily", 5 | "repository": 6 | { 7 | "type": "git", 8 | "url": "https://github.com/spacehuhn/SimpleButton.git" 9 | }, 10 | "frameworks": "arduino", 11 | "platforms": "*" 12 | } 13 | -------------------------------------------------------------------------------- /libraries/SimpleButton/library.properties: -------------------------------------------------------------------------------- 1 | name=SimpleButton 2 | version=1.0.0 3 | author=Stefan Kremser 4 | maintainer=Stefan Kremser 5 | sentence=Manage buttons easily 6 | paragraph=Supports different types of buttons. Manages push, clicked, holding and double-click. 7 | category=Signal Input/Output 8 | url=https://github.com/spacehuhn/SimpleButton 9 | architectures=* 10 | -------------------------------------------------------------------------------- /libraries/SimpleButton/src/Buttons/ButtonAnalog.h: -------------------------------------------------------------------------------- 1 | #ifndef SimpleButton_ButtonAnalog_h 2 | #define SimpleButton_ButtonAnalog_h 3 | 4 | #include "Button.h" 5 | 6 | 7 | namespace simplebutton { 8 | class ButtonAnalog : public Button { 9 | public: 10 | ButtonAnalog(); 11 | ButtonAnalog(uint8_t pin); 12 | ButtonAnalog(uint16_t minValue, uint16_t maxValue); 13 | ButtonAnalog(uint8_t pin, uint16_t minValue, uint16_t maxValue); 14 | 15 | ~ButtonAnalog(); 16 | 17 | void setup(uint8_t pin, uint16_t minValue, uint16_t maxValue); 18 | 19 | int read(); 20 | 21 | void update(); 22 | void update(int state); 23 | 24 | void setMin(uint16_t minValue); 25 | void setMax(uint16_t maxValue); 26 | void setBounds(uint16_t minValue, uint16_t maxValue); 27 | 28 | uint16_t getValue(); 29 | void setValue(int value); 30 | 31 | private: 32 | uint16_t minValue = 0; 33 | uint16_t maxValue = 1024; 34 | uint16_t value = 0; 35 | }; 36 | } 37 | #endif // ifndef SimpleButton_ButtonAnalog_h 38 | -------------------------------------------------------------------------------- /libraries/SimpleButton/src/Buttons/ButtonGPIOExpander.h: -------------------------------------------------------------------------------- 1 | #ifndef SimpleButton_ButtonGPIOExpander_h 2 | #define SimpleButton_ButtonGPIOExpander_h 3 | 4 | #include "Button.h" 5 | #include "libs/GPIOExpander.h" 6 | #include "libs/PCF8574.h" 7 | #include "libs/PCF8575.h" 8 | #include "libs/MCP23017.h" 9 | 10 | namespace simplebutton { 11 | class ButtonGPIOExpander : public Button { 12 | public: 13 | ButtonGPIOExpander(); 14 | ButtonGPIOExpander(GPIOExpander* pcf, uint8_t pin); 15 | ButtonGPIOExpander(GPIOExpander* pcf, uint8_t pin, bool inverted); 16 | 17 | virtual ~ButtonGPIOExpander(); 18 | 19 | void setup(GPIOExpander* pcf, uint8_t pin, bool inverted); 20 | 21 | virtual void enable(); 22 | 23 | virtual int read(); 24 | virtual void update(); 25 | virtual void update(int state); 26 | 27 | protected: 28 | GPIOExpander* pcf = NULL; 29 | }; 30 | } 31 | 32 | #endif // ifndef SimpleButton_ButtonGPIOExpander_h -------------------------------------------------------------------------------- /libraries/SimpleButton/src/Buttons/ButtonPullup.cpp: -------------------------------------------------------------------------------- 1 | #include "ButtonPullup.h" 2 | 3 | namespace simplebutton { 4 | ButtonPullup::ButtonPullup() { 5 | setup(255); 6 | } 7 | 8 | ButtonPullup::ButtonPullup(uint8_t pin) { 9 | setup(pin); 10 | } 11 | 12 | ButtonPullup::~ButtonPullup() {} 13 | 14 | void ButtonPullup::setup(uint8_t pin) { 15 | this->button_pin = pin; 16 | this->button_inverted = true; 17 | enable(); 18 | } 19 | 20 | void ButtonPullup::enable() { 21 | button_enabled = true; 22 | 23 | if ((button_pin < 255) && !button_setup) { 24 | pinMode(button_pin, INPUT_PULLUP); 25 | button_setup = true; 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /libraries/SimpleButton/src/Buttons/ButtonPullup.h: -------------------------------------------------------------------------------- 1 | #ifndef SimpleButton_ButtonPullup_h 2 | #define SimpleButton_ButtonPullup_h 3 | 4 | #include "Button.h" 5 | 6 | namespace simplebutton { 7 | class ButtonPullup : public Button { 8 | public: 9 | ButtonPullup(); 10 | ButtonPullup(uint8_t pin); 11 | 12 | ~ButtonPullup(); 13 | 14 | void setup(uint8_t pin); 15 | 16 | void enable(); 17 | }; 18 | } 19 | 20 | #endif // ifndef SimpleButton_ButtonPullup_h -------------------------------------------------------------------------------- /libraries/SimpleButton/src/Buttons/ButtonPullupGPIOExpander.cpp: -------------------------------------------------------------------------------- 1 | #include "ButtonPullupGPIOExpander.h" 2 | 3 | namespace simplebutton { 4 | ButtonPullupGPIOExpander::ButtonPullupGPIOExpander() { 5 | setup(NULL, 255); 6 | } 7 | 8 | ButtonPullupGPIOExpander::ButtonPullupGPIOExpander(GPIOExpander* pcf, uint8_t pin) { 9 | setup(pcf, pin); 10 | } 11 | 12 | ButtonPullupGPIOExpander::~ButtonPullupGPIOExpander() {} 13 | 14 | void ButtonPullupGPIOExpander::setup(GPIOExpander* pcf, uint8_t pin) { 15 | this->pcf = pcf; 16 | this->button_pin = pin; 17 | this->button_inverted = true; 18 | enable(); 19 | } 20 | 21 | void ButtonPullupGPIOExpander::enable() { 22 | button_enabled = true; 23 | 24 | if (pcf) { 25 | pcf->write(button_pin, 1); 26 | if (pcf->connected()) button_setup = true; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /libraries/SimpleButton/src/Buttons/ButtonPullupGPIOExpander.h: -------------------------------------------------------------------------------- 1 | #ifndef SimpleButton_ButtonPullupGPIOExpander_h 2 | #define SimpleButton_ButtonPullupGPIOExpander_h 3 | 4 | #include "ButtonGPIOExpander.h" 5 | 6 | namespace simplebutton { 7 | class ButtonPullupGPIOExpander : public ButtonGPIOExpander { 8 | public: 9 | ButtonPullupGPIOExpander(); 10 | ButtonPullupGPIOExpander(GPIOExpander* pcf, uint8_t pin); 11 | 12 | ~ButtonPullupGPIOExpander(); 13 | 14 | void setup(GPIOExpander* pcf, uint8_t pin); 15 | 16 | void enable(); 17 | }; 18 | } 19 | 20 | #endif // ifndef SimpleButton_ButtonPullupGPIOExpander_h -------------------------------------------------------------------------------- /libraries/SimpleButton/src/Buttons/Switch.h: -------------------------------------------------------------------------------- 1 | #ifndef SimpleButton_Switch_h 2 | #define SimpleButton_Switch_h 3 | 4 | #include "Button.h" 5 | #include "ButtonGPIOExpander.h" 6 | 7 | namespace simplebutton { 8 | class Switch { 9 | public: 10 | Button* button = NULL; 11 | 12 | Switch(); 13 | Switch(uint8_t pin); 14 | Switch(GPIOExpander* pcf, uint8_t pin); 15 | Switch(Button* button); 16 | 17 | ~Switch(); 18 | 19 | void setup(uint8_t pin); 20 | void setup(GPIOExpander* pcf, uint8_t pin); 21 | void setup(Button* button); 22 | 23 | void update(); 24 | void update(bool state); 25 | 26 | void setButton(Button* button); 27 | 28 | bool getState(); 29 | bool clicked(); 30 | 31 | private: 32 | bool tmpState = false; 33 | }; 34 | } 35 | 36 | #endif // ifndef SimpleButton_Switch_h -------------------------------------------------------------------------------- /libraries/SimpleButton/src/Events/ClickEvent.cpp: -------------------------------------------------------------------------------- 1 | #include "ClickEvent.h" 2 | 3 | namespace simplebutton { 4 | ClickEvent::ClickEvent(ButtonEventFunction, uint32_t minPushTime, uint32_t minReleaseTime) { 5 | this->fnct = fnct; 6 | this->minPushTime = minPushTime; 7 | this->minReleaseTime = minReleaseTime; 8 | } 9 | 10 | ClickEvent::~ClickEvent() { 11 | if (next) { 12 | delete next; 13 | next = NULL; 14 | } 15 | } 16 | 17 | uint8_t ClickEvent::getMode() { 18 | return MODE::CLICKED; 19 | } 20 | 21 | uint32_t ClickEvent::getMinPushTime() { 22 | return minPushTime; 23 | } 24 | 25 | uint32_t ClickEvent::getMinReleaseTime() { 26 | return minReleaseTime; 27 | } 28 | } -------------------------------------------------------------------------------- /libraries/SimpleButton/src/Events/ClickEvent.h: -------------------------------------------------------------------------------- 1 | #ifndef SimpleButton_ClickEvent_h 2 | #define SimpleButton_ClickEvent_h 3 | 4 | #include "Event.h" 5 | 6 | namespace simplebutton { 7 | class ClickEvent : public Event { 8 | public: 9 | ClickEvent(ButtonEventFunction, uint32_t minPushTime, uint32_t minReleaseTime); 10 | ~ClickEvent(); 11 | 12 | uint8_t getMode(); 13 | uint32_t getMinPushTime(); 14 | uint32_t getMinReleaseTime(); 15 | 16 | private: 17 | uint32_t minPushTime = 0; 18 | uint32_t minReleaseTime = 0; 19 | }; 20 | } 21 | 22 | #endif // ifndef SimpleButton_ClickEvent_h -------------------------------------------------------------------------------- /libraries/SimpleButton/src/Events/DoubleclickEvent.cpp: -------------------------------------------------------------------------------- 1 | #include "DoubleclickEvent.h" 2 | 3 | namespace simplebutton { 4 | DoubleclickEvent::DoubleclickEvent(ButtonEventFunction, uint32_t minPushTime, uint32_t minReleaseTime, 5 | uint32_t timeSpan) { 6 | this->fnct = fnct; 7 | this->minPushTime = minPushTime; 8 | this->minReleaseTime = minReleaseTime; 9 | this->timeSpan = timeSpan; 10 | } 11 | 12 | DoubleclickEvent::~DoubleclickEvent() { 13 | if (next) { 14 | delete next; 15 | next = NULL; 16 | } 17 | } 18 | 19 | uint8_t DoubleclickEvent::getMode() { 20 | return MODE::DOUBLECLICKED; 21 | } 22 | 23 | uint32_t DoubleclickEvent::getMinPushTime() { 24 | return minPushTime; 25 | } 26 | 27 | uint32_t DoubleclickEvent::getMinReleaseTime() { 28 | return minReleaseTime; 29 | } 30 | 31 | uint32_t DoubleclickEvent::getTimeSpan() { 32 | return timeSpan; 33 | } 34 | } -------------------------------------------------------------------------------- /libraries/SimpleButton/src/Events/DoubleclickEvent.h: -------------------------------------------------------------------------------- 1 | #ifndef SimpleButton_DoubleclickEvent_h 2 | #define SimpleButton_DoubleclickEvent_h 3 | 4 | #include "Event.h" 5 | 6 | namespace simplebutton { 7 | class DoubleclickEvent : public Event { 8 | public: 9 | DoubleclickEvent(ButtonEventFunction, uint32_t minPushTime, uint32_t minReleaseTime, uint32_t timeSpan); 10 | ~DoubleclickEvent(); 11 | 12 | uint8_t getMode(); 13 | uint32_t getMinPushTime(); 14 | uint32_t getMinReleaseTime(); 15 | uint32_t getTimeSpan(); 16 | 17 | private: 18 | uint32_t minPushTime = 0; 19 | uint32_t minReleaseTime = 0; 20 | uint32_t timeSpan = 0; 21 | }; 22 | } 23 | 24 | #endif // ifndef SimpleButton_DoubleclickEvent_h -------------------------------------------------------------------------------- /libraries/SimpleButton/src/Events/Event.cpp: -------------------------------------------------------------------------------- 1 | #include "Event.h" 2 | 3 | namespace simplebutton { 4 | Event::~Event() { 5 | if (next) { 6 | delete next; 7 | next = NULL; 8 | } 9 | } 10 | 11 | void Event::run() { 12 | if (fnct) fnct(); 13 | } 14 | 15 | uint8_t Event::getMode() { 16 | return MODE::NONE; 17 | } 18 | 19 | uint32_t Event::getMinPushTime() { 20 | return 0; 21 | } 22 | 23 | uint32_t Event::getMinReleaseTime() { 24 | return 0; 25 | } 26 | 27 | uint32_t Event::getTimeSpan() { 28 | return 0; 29 | } 30 | 31 | uint32_t Event::getInterval() { 32 | return 0; 33 | } 34 | } -------------------------------------------------------------------------------- /libraries/SimpleButton/src/Events/Event.h: -------------------------------------------------------------------------------- 1 | #ifndef SimpleButton_Event_h 2 | #define SimpleButton_Event_h 3 | 4 | #include "Arduino.h" 5 | #include 6 | 7 | #define ButtonEventFunction std::functionfnct 8 | 9 | namespace simplebutton { 10 | class Event { 11 | public: 12 | Event* next = NULL; 13 | enum MODE { NONE = 0, PUSHED = 1, RELEASED = 2, CLICKED = 3, DOUBLECLICKED = 4, HOLDING = 5 }; 14 | 15 | virtual ~Event(); 16 | 17 | virtual void run(); 18 | 19 | virtual uint8_t getMode(); 20 | virtual uint32_t getMinPushTime(); 21 | virtual uint32_t getMinReleaseTime(); 22 | virtual uint32_t getTimeSpan(); 23 | virtual uint32_t getInterval(); 24 | 25 | protected: 26 | ButtonEventFunction = NULL; 27 | }; 28 | } 29 | 30 | #endif // ifndef Event_h -------------------------------------------------------------------------------- /libraries/SimpleButton/src/Events/HoldEvent.cpp: -------------------------------------------------------------------------------- 1 | #include "HoldEvent.h" 2 | 3 | namespace simplebutton { 4 | HoldEvent::HoldEvent(ButtonEventFunction, uint32_t interval) { 5 | this->fnct = fnct; 6 | this->interval = interval; 7 | } 8 | 9 | HoldEvent::~HoldEvent() { 10 | if (next) { 11 | delete next; 12 | next = NULL; 13 | } 14 | } 15 | 16 | uint8_t HoldEvent::getMode() { 17 | return MODE::HOLDING; 18 | } 19 | 20 | uint32_t HoldEvent::getInterval() { 21 | return interval; 22 | } 23 | } -------------------------------------------------------------------------------- /libraries/SimpleButton/src/Events/HoldEvent.h: -------------------------------------------------------------------------------- 1 | #ifndef SimpleButton_HoldEvent_h 2 | #define SimpleButton_HoldEvent_h 3 | 4 | #include "Event.h" 5 | namespace simplebutton { 6 | class HoldEvent : public Event { 7 | public: 8 | HoldEvent(ButtonEventFunction, uint32_t interval); 9 | ~HoldEvent(); 10 | 11 | uint8_t getMode(); 12 | uint32_t getInterval(); 13 | 14 | private: 15 | uint32_t interval = 0; 16 | }; 17 | } 18 | 19 | #endif // ifndef SimpleButton_HoldEvent_h -------------------------------------------------------------------------------- /libraries/SimpleButton/src/Events/PushEvent.cpp: -------------------------------------------------------------------------------- 1 | #include "PushEvent.h" 2 | 3 | namespace simplebutton { 4 | PushEvent::PushEvent(ButtonEventFunction) { 5 | this->fnct = fnct; 6 | } 7 | 8 | PushEvent::~PushEvent() { 9 | if (next) { 10 | delete next; 11 | next = NULL; 12 | } 13 | } 14 | 15 | uint8_t PushEvent::getMode() { 16 | return MODE::PUSHED; 17 | } 18 | } -------------------------------------------------------------------------------- /libraries/SimpleButton/src/Events/PushEvent.h: -------------------------------------------------------------------------------- 1 | #ifndef SimpleButton_PushEvent_h 2 | #define SimpleButton_PushEvent_h 3 | 4 | #include "Event.h" 5 | 6 | namespace simplebutton { 7 | class PushEvent : public Event { 8 | public: 9 | PushEvent(ButtonEventFunction); 10 | ~PushEvent(); 11 | 12 | uint8_t getMode(); 13 | }; 14 | } 15 | 16 | #endif // ifndef SimpleButton_PushEvent_h -------------------------------------------------------------------------------- /libraries/SimpleButton/src/Events/ReleaseEvent.cpp: -------------------------------------------------------------------------------- 1 | #include "ReleaseEvent.h" 2 | 3 | namespace simplebutton { 4 | ReleaseEvent::ReleaseEvent(ButtonEventFunction) { 5 | this->fnct = fnct; 6 | } 7 | 8 | ReleaseEvent::~ReleaseEvent() { 9 | if (next) { 10 | delete next; 11 | next = NULL; 12 | } 13 | } 14 | 15 | uint8_t ReleaseEvent::getMode() { 16 | return MODE::RELEASED; 17 | } 18 | } -------------------------------------------------------------------------------- /libraries/SimpleButton/src/Events/ReleaseEvent.h: -------------------------------------------------------------------------------- 1 | #ifndef SimpleButton_ReleaseEvent_h 2 | #define SimpleButton_ReleaseEvent_h 3 | 4 | #include "Event.h" 5 | 6 | namespace simplebutton { 7 | class ReleaseEvent : public Event { 8 | public: 9 | ReleaseEvent(ButtonEventFunction); 10 | ~ReleaseEvent(); 11 | 12 | uint8_t getMode(); 13 | }; 14 | } 15 | 16 | #endif // ifndef SimpleButton_ReleaseEvent_h -------------------------------------------------------------------------------- /libraries/SimpleButton/src/SimpleButton.h: -------------------------------------------------------------------------------- 1 | #ifndef SimpleButton_h 2 | #define SimpleButton_h 3 | 4 | #include "Buttons/Button.h" 5 | #include "Buttons/ButtonGPIOExpander.h" 6 | #include "Buttons/ButtonPullup.h" 7 | #include "Buttons/ButtonPullupGPIOExpander.h" 8 | #include "Buttons/ButtonAnalog.h" 9 | #include "Buttons/Switch.h" 10 | #include "Buttons/RotaryEncoder.h" 11 | #include "Buttons/RotaryEncoderI2C.h" 12 | #include "Buttons/AnalogStick.h" 13 | #include "Buttons/PS2Gamepad.h" 14 | 15 | #endif // ifndef SimpleButton_h 16 | -------------------------------------------------------------------------------- /libraries/SimpleButton/src/libs/GPIOExpander.cpp: -------------------------------------------------------------------------------- 1 | #include "GPIOExpander.h" 2 | 3 | namespace simplebutton { 4 | void GPIOExpander::setup(uint8_t address) { 5 | this->wire = &Wire; 6 | this->address = address; 7 | write(0); 8 | } 9 | 10 | void GPIOExpander::setup(uint8_t address, TwoWire* wire) { 11 | this->wire = wire; 12 | this->address = address; 13 | write(0); 14 | } 15 | 16 | bool GPIOExpander::connected() { 17 | return error == 0; 18 | } 19 | 20 | String GPIOExpander::getError() { 21 | String msg; 22 | 23 | switch (error) { 24 | case 0: 25 | msg += String(F("OK")); 26 | break; 27 | 28 | case 1: 29 | msg += String(F("Data too long to fit in transmit buffer")); 30 | break; 31 | 32 | case 2: 33 | msg += String(F("Received NACK on transmit of address")); 34 | break; 35 | 36 | case 3: 37 | msg += String(F("Received NACK on transmit of data")); 38 | 39 | case 4: 40 | msg += String(F("Unknown transmission error")); 41 | break; 42 | 43 | case 5: 44 | msg += String(F("Pin error")); 45 | break; 46 | 47 | case 6: 48 | msg += String(F("I2C error")); 49 | break; 50 | } 51 | 52 | return msg; 53 | } 54 | } -------------------------------------------------------------------------------- /libraries/SimpleButton/src/libs/GPIOExpander.h: -------------------------------------------------------------------------------- 1 | #ifndef SimpleButton_GPIOExpander_h 2 | #define SimpleButton_GPIOExpander_h 3 | 4 | #include "Arduino.h" 5 | #include 6 | 7 | #define PCF_PIN_ERROR 5 8 | #define PCF_I2C_ERROR 6 9 | 10 | namespace simplebutton { 11 | class GPIOExpander { 12 | public: 13 | virtual ~GPIOExpander() = default; 14 | 15 | virtual void setup(uint8_t address); 16 | virtual void setup(uint8_t address, TwoWire* wire); 17 | 18 | virtual int read() = 0; 19 | virtual int read(uint8_t pin) = 0; 20 | 21 | virtual void write(int value) = 0; 22 | virtual void write(uint8_t pin, bool value) = 0; 23 | 24 | virtual void toggle() = 0; 25 | virtual void toggle(uint8_t pin) = 0; 26 | 27 | virtual bool connected(); 28 | virtual String getError(); 29 | 30 | protected: 31 | uint8_t error = 0; 32 | 33 | TwoWire* wire; 34 | uint8_t address; 35 | }; 36 | } 37 | #endif // ifndef SimpleButton_GPIOExpander_h -------------------------------------------------------------------------------- /libraries/SimpleButton/src/libs/MCP23017.h: -------------------------------------------------------------------------------- 1 | #ifndef SimpleButton_MCP23017_h 2 | #define SimpleButton_MCP23017_h 3 | 4 | #include "GPIOExpander.h" 5 | 6 | namespace simplebutton { 7 | class MCP23017 : public GPIOExpander { 8 | public: 9 | MCP23017(uint8_t address); 10 | MCP23017(uint8_t address, TwoWire* wire); 11 | 12 | ~MCP23017(); 13 | 14 | void setup(uint8_t address); 15 | void setup(uint8_t address, TwoWire* wire); 16 | 17 | int read(); 18 | int read(uint8_t pin); 19 | 20 | void write(int value); 21 | void write(uint8_t pin, bool value); 22 | 23 | void toggle(); 24 | void toggle(uint8_t pin); 25 | 26 | private: 27 | uint16_t pinData = 0x0000; 28 | uint16_t pinModes = 0x0000; 29 | uint16_t pinPullups = 0x0000; 30 | 31 | void setIO(); 32 | void setPullups(); 33 | 34 | void setPinMode(uint8_t pin, uint8_t mode); 35 | uint8_t getPinMode(uint8_t pin); 36 | 37 | bool getPinState(uint8_t pin); 38 | 39 | uint8_t readRegister8(uint8_t address); 40 | uint16_t readRegister16(uint8_t address); 41 | 42 | void writeRegister(uint8_t address, uint16_t value); 43 | }; 44 | } 45 | 46 | #endif // ifndef SimpleButton_MCP23017_h -------------------------------------------------------------------------------- /libraries/SimpleButton/src/libs/PCF8574.h: -------------------------------------------------------------------------------- 1 | #ifndef SimpleButton_PCF8574_h 2 | #define SimpleButton_PCF8574_h 3 | 4 | #include "GPIOExpander.h" 5 | 6 | namespace simplebutton { 7 | class PCF8574 : public GPIOExpander { 8 | public: 9 | PCF8574(uint8_t address); 10 | PCF8574(uint8_t address, TwoWire* wire); 11 | ~PCF8574(); 12 | 13 | int read(); 14 | int read(uint8_t pin); 15 | 16 | void write(int value); 17 | void write(uint8_t pin, bool value); 18 | 19 | void toggle(); 20 | void toggle(uint8_t pin); 21 | 22 | private: 23 | uint8_t data; 24 | uint8_t pinModeMask; 25 | }; 26 | } 27 | 28 | #endif // ifndef SimpleButton_PCF8574_h -------------------------------------------------------------------------------- /libraries/SimpleButton/src/libs/PCF8575.h: -------------------------------------------------------------------------------- 1 | #ifndef SimpleButton_PCF8575_h 2 | #define SimpleButton_PCF8575_h 3 | 4 | #include "GPIOExpander.h" 5 | 6 | namespace simplebutton { 7 | class PCF8575 : public GPIOExpander { 8 | public: 9 | PCF8575(uint8_t address); 10 | PCF8575(uint8_t address, TwoWire* wire); 11 | 12 | ~PCF8575(); 13 | 14 | int read(); 15 | int read(uint8_t pin); 16 | 17 | void write(int value); 18 | void write(uint8_t pin, bool value); 19 | 20 | void toggle(); 21 | void toggle(uint8_t pin); 22 | 23 | private: 24 | uint16_t data; 25 | uint16_t pinModeMask; 26 | }; 27 | } 28 | #endif // ifndef SimpleButton_PCF8575_h -------------------------------------------------------------------------------- /libraries/TFT_Touch_Shield_V2/License.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013 Seeed Technology Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /libraries/TFT_Touch_Shield_V2/examples/drawCircle/drawCircle.ino: -------------------------------------------------------------------------------- 1 | /* Demo of draw circle's APP 2 | drawCircle(int poX, int poY, int r,INT16U color); 3 | fillCircle(int poX, int poY, int r,INT16U color); 4 | */ 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | void setup() 11 | { 12 | TFT_BL_ON; //turn on the background light 13 | 14 | Tft.TFTinit(); //init TFT library 15 | 16 | Tft.drawCircle(100, 100, 30,YELLOW); //center: (100, 100), r = 30 ,color : YELLOW 17 | 18 | Tft.drawCircle(100, 200, 40,CYAN); // center: (100, 200), r = 10 ,color : CYAN 19 | 20 | Tft.fillCircle(200, 100, 30,RED); //center: (200, 100), r = 30 ,color : RED 21 | 22 | Tft.fillCircle(200, 200, 30,BLUE); //center: (200, 200), r = 30 ,color : BLUE 23 | } 24 | 25 | void loop() 26 | { 27 | 28 | } 29 | 30 | /********************************************************************************************************* 31 | END FILE 32 | *********************************************************************************************************/ -------------------------------------------------------------------------------- /libraries/TFT_Touch_Shield_V2/examples/drawLines/drawLines.ino: -------------------------------------------------------------------------------- 1 | /* Demo of draw line's APP 2 | drawLine(unsigned int x0,unsigned int y0,unsigned int x1,unsigned int y1,unsigned int color); 3 | drawVerticalLine(unsigned int poX, unsigned int poY,unsigned int length,unsigned int color); 4 | drawHorizontalLine(unsigned int poX, unsigned int poY,unsigned int length,unsigned int color); 5 | */ 6 | 7 | #include 8 | #include 9 | #include 10 | void setup() 11 | { 12 | TFT_BL_ON; // turn on the background light 13 | Tft.TFTinit(); //init TFT library 14 | 15 | Tft.drawLine(0,0,239,319,RED); //start: (0, 0) end: (239, 319), color : RED 16 | 17 | Tft.drawVerticalLine(60,100,100,GREEN); // Draw a vertical line 18 | // start: (60, 100) length: 100 color: green 19 | 20 | Tft.drawHorizontalLine(30,60,150,BLUE); //Draw a horizontal line 21 | //start: (30, 60), high: 150, color: blue 22 | } 23 | 24 | void loop() 25 | { 26 | 27 | } 28 | 29 | /********************************************************************************************************* 30 | END FILE 31 | *********************************************************************************************************/ -------------------------------------------------------------------------------- /libraries/TFT_Touch_Shield_V2/examples/drawRectangle/drawRectangle.ino: -------------------------------------------------------------------------------- 1 | /* Draw Boxes - Demonstrate drawRectangle and fillRectangle 2 | fillScreen(INT16U XL,INT16U XR,INT16U YU,INT16U YD,INT16U color); 3 | fillRectangle(INT16U poX, INT16U poY, INT16U length, INT16U width, INT16U color); 4 | drawRectangle(INT16U poX, INT16U poY, INT16U length,INT16U width,INT16U color); 5 | */ 6 | #include 7 | #include 8 | #include 9 | 10 | void setup() 11 | { 12 | TFT_BL_ON; // turn on the background light 13 | Tft.TFTinit(); // init TFT library 14 | 15 | Tft.fillScreen(80, 160, 50, 150,RED); 16 | Tft.fillRectangle(30, 120, 100,65,YELLOW); 17 | Tft.drawRectangle(100, 170, 120,60,BLUE); 18 | } 19 | 20 | void loop() 21 | { 22 | 23 | } 24 | /********************************************************************************************************* 25 | END FILE 26 | *********************************************************************************************************/ -------------------------------------------------------------------------------- /libraries/TFT_Touch_Shield_V2/examples/paint/.test.skip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/libraries/TFT_Touch_Shield_V2/examples/paint/.test.skip -------------------------------------------------------------------------------- /libraries/TFT_Touch_Shield_V2/examples/shapes/shapes.ino: -------------------------------------------------------------------------------- 1 | // Draw Boxes - Demonstrate drawRectangle and fillRectangle 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | void setup() 8 | { 9 | TFT_BL_ON; // turn on the background light 10 | Tft.TFTinit(); // init TFT library 11 | } 12 | 13 | void loop() 14 | { 15 | for(int r=0;r<115;r=r+2) //set r : 0--115 16 | { 17 | Tft.drawCircle(119,160,r,random(0xFFFF)); //draw circle, center:(119, 160), color: random 18 | } 19 | delay(10); 20 | } 21 | /********************************************************************************************************* 22 | END FILE 23 | *********************************************************************************************************/ -------------------------------------------------------------------------------- /libraries/TFT_Touch_Shield_V2/examples/text/text.ino: -------------------------------------------------------------------------------- 1 | /* draw text's APP 2 | drawChar(INT8U ascii,INT16U poX, INT16U poY,INT16U size, INT16U fgcolor); 3 | drawString(char *string,INT16U poX, INT16U poY,INT16U size,INT16U fgcolor); 4 | */ 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | void setup() 11 | { 12 | TFT_BL_ON; // turn on the background light 13 | Tft.TFTinit(); // init TFT library 14 | 15 | Tft.drawChar('S',0,0,1,RED); // draw char: 'S', (0, 0), size: 1, color: RED 16 | 17 | Tft.drawChar('E',10,10,2,BLUE); // draw char: 'E', (10, 10), size: 2, color: BLUE 18 | 19 | Tft.drawChar('E',20,40,3,GREEN); // draw char: 'E', (20, 40), size: 3, color: GREEN 20 | 21 | Tft.drawChar('E',30,80,4,YELLOW); // draw char: 'E', (30, 80), size: 4, color: YELLOW 22 | 23 | Tft.drawChar('D',40,120,4,YELLOW); // draw char: 'D', (40, 120), size: 4, color: YELLOW 24 | 25 | Tft.drawString("Hello",0,180,3,CYAN); // draw string: "hello", (0, 180), size: 3, color: CYAN 26 | 27 | Tft.drawString("World!!",60,220,4,WHITE); // draw string: "world!!", (80, 230), size: 4, color: WHITE 28 | 29 | 30 | } 31 | 32 | void loop() 33 | { 34 | 35 | } 36 | -------------------------------------------------------------------------------- /libraries/TFT_Touch_Shield_V2/examples/tftbmp/.test.skip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/libraries/TFT_Touch_Shield_V2/examples/tftbmp/.test.skip -------------------------------------------------------------------------------- /libraries/TFT_Touch_Shield_V2/examples/tftbmp/flower.BMP: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/libraries/TFT_Touch_Shield_V2/examples/tftbmp/flower.BMP -------------------------------------------------------------------------------- /libraries/TFT_Touch_Shield_V2/examples/tftbmp/hibiscus.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/libraries/TFT_Touch_Shield_V2/examples/tftbmp/hibiscus.bmp -------------------------------------------------------------------------------- /libraries/TFT_Touch_Shield_V2/examples/tftbmp/test.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/libraries/TFT_Touch_Shield_V2/examples/tftbmp/test.bmp -------------------------------------------------------------------------------- /libraries/TFT_Touch_Shield_V2/examples/tftbmp2/.test.skip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/libraries/TFT_Touch_Shield_V2/examples/tftbmp2/.test.skip -------------------------------------------------------------------------------- /libraries/Ticker/examples/TickerBasic/TickerBasic.ino: -------------------------------------------------------------------------------- 1 | /* 2 | Basic Ticker usage 3 | 4 | Ticker is an object that will call a given function with a certain period. 5 | Each Ticker calls one function. You can have as many Tickers as you like, 6 | memory being the only limitation. 7 | 8 | A function may be attached to a ticker and detached from the ticker. 9 | There are two variants of the attach function: attach and attach_ms. 10 | The first one takes period in seconds, the second one in milliseconds. 11 | 12 | An LED connected to GPIO1 will be blinking. Use a built-in LED on ESP-01 13 | or connect an external one to TXD on other boards. 14 | */ 15 | 16 | #include 17 | 18 | Ticker flipper; 19 | 20 | int count = 0; 21 | 22 | void flip() 23 | { 24 | int state = digitalRead(1); // get the current state of GPIO1 pin 25 | digitalWrite(1, !state); // set pin to the opposite state 26 | 27 | ++count; 28 | // when the counter reaches a certain value, start blinking like crazy 29 | if (count == 20) 30 | { 31 | flipper.attach(0.1, flip); 32 | } 33 | // when the counter reaches yet another value, stop blinking 34 | else if (count == 120) 35 | { 36 | flipper.detach(); 37 | } 38 | } 39 | 40 | void setup() { 41 | pinMode(1, OUTPUT); 42 | digitalWrite(1, LOW); 43 | 44 | // flip the pin every 0.3s 45 | flipper.attach(0.3, flip); 46 | } 47 | 48 | void loop() { 49 | } 50 | -------------------------------------------------------------------------------- /libraries/Ticker/examples/TickerParameter/TickerParameter.ino: -------------------------------------------------------------------------------- 1 | /* 2 | Passing paramters to Ticker callbacks 3 | 4 | Apart from void(void) functions, the Ticker library supports 5 | functions taking one argument. This argument's size has to be less or 6 | equal to 4 bytes (so char, short, int, float, void*, char* types will do). 7 | 8 | This sample runs two tickers that both call one callback function, 9 | but with different arguments. 10 | 11 | An LED connected to GPIO1 will be pulsing. Use a built-in LED on ESP-01 12 | or connect an external one to TXD on other boards. 13 | */ 14 | 15 | #include 16 | 17 | Ticker tickerSetHigh; 18 | Ticker tickerSetLow; 19 | 20 | void setPin(int state) { 21 | digitalWrite(1, state); 22 | } 23 | 24 | void setup() { 25 | pinMode(1, OUTPUT); 26 | digitalWrite(1, LOW); 27 | 28 | // every 25 ms, call setPin(0) 29 | tickerSetLow.attach_ms(25, setPin, 0); 30 | 31 | // every 26 ms, call setPin(1) 32 | tickerSetHigh.attach_ms(26, setPin, 1); 33 | } 34 | 35 | void loop() { 36 | } 37 | -------------------------------------------------------------------------------- /libraries/Ticker/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map For Wire 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | ####################################### 10 | # Methods and Functions (KEYWORD2) 11 | ####################################### 12 | 13 | attach KEYWORD2 14 | attach_ms KEYWORD2 15 | once KEYWORD2 16 | once_ms KEYWORD2 17 | detach KEYWORD2 18 | 19 | ####################################### 20 | # Instances (KEYWORD2) 21 | ####################################### 22 | 23 | Ticker KEYWORD2 24 | 25 | ####################################### 26 | # Constants (LITERAL1) 27 | ####################################### 28 | 29 | -------------------------------------------------------------------------------- /libraries/Ticker/library.properties: -------------------------------------------------------------------------------- 1 | name=Ticker 2 | version=1.0 3 | author=Ivan Grokhtokov 4 | maintainer=Ivan Grokhtokov 5 | sentence=Allows to call functions with a given interval. 6 | paragraph= 7 | category=Timing 8 | url= 9 | architectures=esp8266 10 | -------------------------------------------------------------------------------- /libraries/Wire/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map For Wire 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | ####################################### 10 | # Methods and Functions (KEYWORD2) 11 | ####################################### 12 | 13 | begin KEYWORD2 14 | setClock KEYWORD2 15 | beginTransmission KEYWORD2 16 | endTransmission KEYWORD2 17 | requestFrom KEYWORD2 18 | send KEYWORD2 19 | receive KEYWORD2 20 | onReceive KEYWORD2 21 | onRequest KEYWORD2 22 | 23 | ####################################### 24 | # Instances (KEYWORD2) 25 | ####################################### 26 | 27 | Wire KEYWORD2 28 | 29 | ####################################### 30 | # Constants (LITERAL1) 31 | ####################################### 32 | 33 | -------------------------------------------------------------------------------- /libraries/Wire/library.properties: -------------------------------------------------------------------------------- 1 | name=Wire 2 | version=1.0 3 | author=Arduino 4 | maintainer=Ivan Grokhotkov 5 | sentence=Allows the communication between devices or sensors connected via Two Wire Interface Bus. For esp8266 boards. 6 | paragraph= 7 | category=Signal Input/Output 8 | url=http://arduino.cc/en/Reference/Wire 9 | architectures=esp8266 10 | -------------------------------------------------------------------------------- /libraries/esp8266-oled-ssd1306-4.0.0/.travis.yml: -------------------------------------------------------------------------------- 1 | language: python 2 | python: 3 | - "2.7" 4 | 5 | # Cache PlatformIO packages using Travis CI container-based infrastructure 6 | sudo: false 7 | cache: 8 | directories: 9 | - "~/.platformio" 10 | 11 | env: 12 | - PLATFORMIO_CI_SRC=examples/SSD1306UiDemo 13 | - PLATFORMIO_CI_SRC=examples/SSD1306SimpleDemo 14 | - PLATFORMIO_CI_SRC=examples/SSD1306DrawingDemo 15 | - PLATFORMIO_CI_SRC=examples/SSD1306OTADemo 16 | - PLATFORMIO_CI_SRC=examples/SSD1306ClockDemo 17 | - PLATFORMIO_CI_SRC=examples/SSD1306TwoScreenDemo 18 | 19 | 20 | install: 21 | - pip install -U platformio 22 | - platformio lib install 44 23 | 24 | script: 25 | - platformio ci --lib="." --board=nodemcuv2 26 | -------------------------------------------------------------------------------- /libraries/esp8266-oled-ssd1306-4.0.0/UPGRADE-4.0.md: -------------------------------------------------------------------------------- 1 | # Upgrade from 3.x to 4.0 2 | 3 | There are changes that breaks compatibility with older versions. 4 | 5 | 1. You'll have to change data type for all your binary resources such as images and fonts from 6 | 7 | ```c 8 | const char MySymbol[] PROGMEM = { 9 | ``` 10 | 11 | to 12 | 13 | ```c 14 | const uint8_t MySymbol[] PROGMEM = { 15 | ``` 16 | 17 | 1. Arguments of `setContrast` from `char` to `uint8_t` 18 | 19 | ```c++ 20 | void OLEDDisplay::setContrast(char contrast, char precharge, char comdetect); 21 | ``` 22 | 23 | to 24 | 25 | ```c++ 26 | void OLEDDisplay::setContrast(uint8_t contrast, uint8_t precharge, uint8_t comdetect); 27 | ``` 28 | -------------------------------------------------------------------------------- /libraries/esp8266-oled-ssd1306-4.0.0/examples/SSD1306ClockDemo/images.h: -------------------------------------------------------------------------------- 1 | const unsigned char activeSymbol[] PROGMEM = { 2 | B00000000, 3 | B00000000, 4 | B00011000, 5 | B00100100, 6 | B01000010, 7 | B01000010, 8 | B00100100, 9 | B00011000 10 | }; 11 | 12 | const unsigned char inactiveSymbol[] PROGMEM = { 13 | B00000000, 14 | B00000000, 15 | B00000000, 16 | B00000000, 17 | B00011000, 18 | B00011000, 19 | B00000000, 20 | B00000000 21 | }; 22 | -------------------------------------------------------------------------------- /libraries/esp8266-oled-ssd1306-4.0.0/library.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ESP8266_SSD1306", 3 | "version": "4.0.0", 4 | "keywords": "ssd1306, oled, display, i2c", 5 | "description": "A I2C display driver for SSD1306 oled displays connected to an ESP8266 or ESP32", 6 | "repository": 7 | { 8 | "type": "git", 9 | "url": "https://github.com/squix78/esp8266-oled-ssd1306.git" 10 | }, 11 | "authors": 12 | [ 13 | { 14 | "name": "Daniel Eichhorn, ThingPulse", 15 | "email": "squix78@gmail.com", 16 | "url": "https://thingpulse.com" 17 | }, 18 | { 19 | "name": "Fabrice Weinberg", 20 | "email": "fabrice@weinberg.me" 21 | } 22 | ], 23 | "frameworks": "arduino", 24 | "platforms": [ 25 | "espressif8266", 26 | "espressif32" 27 | ] 28 | } 29 | -------------------------------------------------------------------------------- /libraries/esp8266-oled-ssd1306-4.0.0/library.properties: -------------------------------------------------------------------------------- 1 | name=ESP8266 and ESP32 Oled Driver for SSD1306 display 2 | version=4.0.0 3 | author=Daniel Eichhorn, Fabrice Weinberg 4 | maintainer=Daniel Eichhorn 5 | sentence=A I2C display driver for SSD1306 oled displays connected to an ESP8266 or ESP32 6 | paragraph=A I2C display driver for SSD1306 oled displays connected to an ESP8266 or ESP32 7 | category=Display 8 | url=https://github.com/ThingPulse/esp8266-oled-ssd1306 9 | architectures=esp8266,esp32 10 | -------------------------------------------------------------------------------- /libraries/esp8266-oled-ssd1306-4.0.0/license: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 by Daniel Eichhorn 4 | Copyright (c) 2016 by Fabrice Weinberg 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. 23 | 24 | See more at http://blog.squix.ch 25 | -------------------------------------------------------------------------------- /libraries/esp8266-oled-ssd1306-4.0.0/resources/DemoFrame1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/libraries/esp8266-oled-ssd1306-4.0.0/resources/DemoFrame1.jpg -------------------------------------------------------------------------------- /libraries/esp8266-oled-ssd1306-4.0.0/resources/DemoFrame2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/libraries/esp8266-oled-ssd1306-4.0.0/resources/DemoFrame2.jpg -------------------------------------------------------------------------------- /libraries/esp8266-oled-ssd1306-4.0.0/resources/DemoFrame3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/libraries/esp8266-oled-ssd1306-4.0.0/resources/DemoFrame3.jpg -------------------------------------------------------------------------------- /libraries/esp8266-oled-ssd1306-4.0.0/resources/DemoFrame4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/libraries/esp8266-oled-ssd1306-4.0.0/resources/DemoFrame4.jpg -------------------------------------------------------------------------------- /libraries/esp8266-oled-ssd1306-4.0.0/resources/FontTool.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/libraries/esp8266-oled-ssd1306-4.0.0/resources/FontTool.png -------------------------------------------------------------------------------- /libraries/esp8266-oled-ssd1306-4.0.0/resources/SPI_version.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/libraries/esp8266-oled-ssd1306-4.0.0/resources/SPI_version.jpg -------------------------------------------------------------------------------- /libraries/esp8266-oled-ssd1306-4.0.0/resources/glyphEditor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/libraries/esp8266-oled-ssd1306-4.0.0/resources/glyphEditor.png -------------------------------------------------------------------------------- /libraries/esp8266-oled-ssd1306-4.0.0/resources/xbmPreview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/libraries/esp8266-oled-ssd1306-4.0.0/resources/xbmPreview.png -------------------------------------------------------------------------------- /libraries/esp8266/examples/Blink/Blink.ino: -------------------------------------------------------------------------------- 1 | /* 2 | ESP8266 Blink by Simon Peter 3 | Blink the blue LED on the ESP-01 module 4 | This example code is in the public domain 5 | 6 | The blue LED on the ESP-01 module is connected to GPIO1 7 | (which is also the TXD pin; so we cannot use Serial.print() at the same time) 8 | 9 | Note that this sketch uses BUILTIN_LED to find the pin with the internal LED 10 | */ 11 | 12 | void setup() { 13 | pinMode(BUILTIN_LED, OUTPUT); // Initialize the BUILTIN_LED pin as an output 14 | } 15 | 16 | // the loop function runs over and over again forever 17 | void loop() { 18 | digitalWrite(BUILTIN_LED, LOW); // Turn the LED on (Note that LOW is the voltage level 19 | // but actually the LED is on; this is because 20 | // it is acive low on the ESP-01) 21 | delay(1000); // Wait for a second 22 | digitalWrite(BUILTIN_LED, HIGH); // Turn the LED off by making the voltage HIGH 23 | delay(2000); // Wait for two seconds (to demonstrate the active low LED) 24 | } 25 | -------------------------------------------------------------------------------- /libraries/esp8266/examples/BlinkWithoutDelay/BlinkWithoutDelay.ino: -------------------------------------------------------------------------------- 1 | /* 2 | ESP8266 BlinkWithoutDelay by Simon Peter 3 | Blink the blue LED on the ESP-01 module 4 | Based on the Arduino Blink without Delay example 5 | This example code is in the public domain 6 | 7 | The blue LED on the ESP-01 module is connected to GPIO1 8 | (which is also the TXD pin; so we cannot use Serial.print() at the same time) 9 | 10 | Note that this sketch uses BUILTIN_LED to find the pin with the internal LED 11 | */ 12 | 13 | int ledState = LOW; 14 | 15 | unsigned long previousMillis = 0; 16 | const long interval = 1000; 17 | 18 | void setup() { 19 | pinMode(BUILTIN_LED, OUTPUT); 20 | } 21 | 22 | void loop() 23 | { 24 | unsigned long currentMillis = millis(); 25 | if(currentMillis - previousMillis >= interval) { 26 | previousMillis = currentMillis; 27 | if (ledState == LOW) 28 | ledState = HIGH; // Note that this switches the LED *off* 29 | else 30 | ledState = LOW; // Note that this switches the LED *on* 31 | digitalWrite(BUILTIN_LED, ledState); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /libraries/esp8266/examples/CallSDKFunctions/CallSDKFunctions.ino: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * NativeSdk by Simon Peter 4 | * Access functionality from the Espressif ESP8266 SDK 5 | * This example code is in the public domain 6 | * 7 | * This is for advanced users. 8 | * Note that this makes your code dependent on the ESP8266, which is generally 9 | * a bad idea. So you should try to use esp8266/Arduino functionality 10 | * where possible instead, in order to abstract away the hardware dependency. 11 | */ 12 | 13 | // Expose Espressif SDK functionality - wrapped in ifdef so that it still 14 | // compiles on other platforms 15 | #ifdef ESP8266 16 | extern "C" { 17 | #include "user_interface.h" 18 | } 19 | #endif 20 | 21 | void setup() { 22 | Serial.begin(115200); 23 | } 24 | 25 | void loop() { 26 | // Call Espressif SDK functionality - wrapped in ifdef so that it still 27 | // compiles on other platforms 28 | #ifdef ESP8266 29 | Serial.print("wifi_station_get_hostname: "); 30 | Serial.println(wifi_station_get_hostname()); 31 | #endif 32 | delay(1000); 33 | } 34 | -------------------------------------------------------------------------------- /libraries/esp8266/examples/CheckFlashConfig/CheckFlashConfig.ino: -------------------------------------------------------------------------------- 1 | /* 2 | ESP8266 CheckFlashConfig by Markus Sattler 3 | 4 | This sketch tests if the EEPROM settings of the IDE match to the Hardware 5 | 6 | */ 7 | 8 | void setup(void) { 9 | Serial.begin(115200); 10 | } 11 | 12 | void loop() { 13 | 14 | uint32_t realSize = ESP.getFlashChipRealSize(); 15 | uint32_t ideSize = ESP.getFlashChipSize(); 16 | FlashMode_t ideMode = ESP.getFlashChipMode(); 17 | 18 | Serial.printf("Flash real id: %08X\n", ESP.getFlashChipId()); 19 | Serial.printf("Flash real size: %u\n\n", realSize); 20 | 21 | Serial.printf("Flash ide size: %u\n", ideSize); 22 | Serial.printf("Flash ide speed: %u\n", ESP.getFlashChipSpeed()); 23 | Serial.printf("Flash ide mode: %s\n", (ideMode == FM_QIO ? "QIO" : ideMode == FM_QOUT ? "QOUT" : ideMode == FM_DIO ? "DIO" : ideMode == FM_DOUT ? "DOUT" : "UNKNOWN")); 24 | 25 | if(ideSize != realSize) { 26 | Serial.println("Flash Chip configuration wrong!\n"); 27 | } else { 28 | Serial.println("Flash Chip configuration ok.\n"); 29 | } 30 | 31 | delay(5000); 32 | } 33 | -------------------------------------------------------------------------------- /libraries/esp8266/library.properties: -------------------------------------------------------------------------------- 1 | name=ESP8266 2 | version=1.0 3 | author=Simon Peter,Markus Sattler,Ivan Grokhotkov 4 | maintainer=Ivan Grokhtkov 5 | sentence=ESP8266 sketches examples 6 | paragraph= 7 | category=Other 8 | url= 9 | architectures=esp8266 10 | -------------------------------------------------------------------------------- /libraries/esp8266/src/dummy.h: -------------------------------------------------------------------------------- 1 | // This file is here only to silence warnings from Arduino IDE 2 | // Currently IDE doesn't support no-code libraries, like this collection of example sketches. 3 | -------------------------------------------------------------------------------- /programmers.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/programmers.txt -------------------------------------------------------------------------------- /screenshots/board_manager_sdk.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/screenshots/board_manager_sdk.jpg -------------------------------------------------------------------------------- /screenshots/board_manager_urls.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/screenshots/board_manager_urls.jpg -------------------------------------------------------------------------------- /screenshots/board_manager_urls.jpg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/screenshots/board_manager_urls.jpg.jpg -------------------------------------------------------------------------------- /screenshots/screenshot_install_sdk.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/screenshots/screenshot_install_sdk.jpg -------------------------------------------------------------------------------- /screenshots/screenshot_select_board.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/screenshots/screenshot_select_board.jpg -------------------------------------------------------------------------------- /screenshots/screenshot_select_path.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/screenshots/screenshot_select_path.jpg -------------------------------------------------------------------------------- /sdk_fix/README.md: -------------------------------------------------------------------------------- 1 | 1) In Arduino go to `File` > `Preferences` 2 | 3 | 2) Add `http://arduino.esp8266.com/stable/package_esp8266com_index.json` to the Additional Boards Manager URLs. (source: https://github.com/esp8266/Arduino) 4 | 5 | 3) Go to `Tools` > `Board` > `Boards Manager` and search for `esp8266` 6 | 7 | 4) Select version `2.0.0` and click on `Install` (**must be version 2.0.0!**) 8 | ![selecting the right sdk](https://raw.githubusercontent.com/tobozo/Arduino/deauther/screenshots/screenshot_install_sdk.jpg) 9 | 10 | 5) Go to `File` > `Preferences` and open the folder path under `More preferences can be edited directly in the file` 11 | ![opening path](https://raw.githubusercontent.com/tobozo/Arduino/deauther/screenshots/screenshot_select_path.jpg) 12 | 13 | 6) Replace following files: 14 | `platform.txt` -> `\packages\esp8266\hardware\esp8266\2.0.0\platform.txt` 15 | 16 | `user_interface.h` -> `\packages\esp8266\hardware\esp8266\2.0.0\tools\sdk\include` 17 | 18 | `ESP8266WiFi.cpp` 19 | `ESP8266WiFi.h` -> `\packages\esp8266\hardware\esp8266\2.0.0\libraries\ESP8266WiFi\src` 20 | 21 | 7) Install following libraries: 22 | 23 | https://github.com/bblanchon/ArduinoJson 24 | https://github.com/ivanseidel/LinkedList 25 | https://github.com/squix78/esp8266-oled-ssd1306 26 | -------------------------------------------------------------------------------- /tests/Time/Time.ino: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | const char* ssid = ".........."; 5 | const char* password = ".........."; 6 | 7 | int timezone = 3; 8 | int dst = 0; 9 | 10 | void setup() { 11 | Serial.begin(115200); 12 | Serial.setDebugOutput(true); 13 | 14 | WiFi.mode(WIFI_STA); 15 | WiFi.begin(ssid, password); 16 | Serial.println("\nConnecting to WiFi"); 17 | while (WiFi.status() != WL_CONNECTED) { 18 | Serial.print("."); 19 | delay(1000); 20 | } 21 | 22 | configTime(3 * 3600, 0, "pool.ntp.org", "time.nist.gov"); 23 | Serial.println("\nWaiting for time"); 24 | while (!time(nullptr)) { 25 | Serial.print("."); 26 | delay(1000); 27 | } 28 | Serial.println(""); 29 | } 30 | 31 | void loop() { 32 | time_t now = time(nullptr); 33 | Serial.println(ctime(&now)); 34 | delay(1000); 35 | } 36 | -------------------------------------------------------------------------------- /tests/common.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function build_sketches() 4 | { 5 | local arduino=$1 6 | local srcpath=$2 7 | local sketches=$(find $srcpath -name *.ino) 8 | for sketch in $sketches; do 9 | local sketchdir=$(dirname $sketch) 10 | if [[ -f "$sketchdir/.test.skip" ]]; then 11 | echo -e "\n\n ------------ Skipping $sketch ------------ \n\n"; 12 | continue 13 | fi 14 | echo -e "\n\n ------------ Building $sketch ------------ \n\n"; 15 | $arduino --verify --verbose $sketch; 16 | local result=$? 17 | if [ $result -ne 0 ]; then 18 | echo "Build failed ($1)" 19 | return $result 20 | fi 21 | done 22 | } 23 | 24 | function install_libraries() 25 | { 26 | mkdir -p $HOME/Arduino/libraries 27 | pushd $HOME/Arduino/libraries 28 | 29 | # install ArduinoJson library 30 | wget https://github.com/bblanchon/ArduinoJson/releases/download/v4.6.1/ArduinoJson-v4.6.1.zip && unzip ArduinoJson-v4.6.1.zip 31 | 32 | popd 33 | } 34 | -------------------------------------------------------------------------------- /tools/sdk/License: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/tools/sdk/License -------------------------------------------------------------------------------- /tools/sdk/include/mem.h: -------------------------------------------------------------------------------- 1 | #ifndef __MEM_H__ 2 | #define __MEM_H__ 3 | 4 | //void *pvPortMalloc( size_t xWantedSize ); 5 | //void vPortFree( void *pv ); 6 | //void *pvPortZalloc(size_t size); 7 | 8 | #define os_malloc pvPortMalloc 9 | #define os_free vPortFree 10 | #define os_zalloc pvPortZalloc 11 | #define os_realloc pvPortRealloc 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /tools/sdk/include/os_type.h: -------------------------------------------------------------------------------- 1 | /* 2 | * copyright (c) Espressif System 2010 3 | * 4 | * mapping to ETS structures 5 | * 6 | */ 7 | #ifndef _OS_TYPES_H_ 8 | #define _OS_TYPES_H_ 9 | 10 | #include "ets_sys.h" 11 | 12 | #define os_signal_t ETSSignal 13 | #define os_param_t ETSParam 14 | #define os_event_t ETSEvent 15 | #define os_task_t ETSTask 16 | #define os_timer_t ETSTimer 17 | #define os_timer_func_t ETSTimerFunc 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /tools/sdk/include/ping.h: -------------------------------------------------------------------------------- 1 | #ifndef __PING_H__ 2 | #define __PING_H__ 3 | 4 | 5 | typedef void (* ping_recv_function)(void* arg, void *pdata); 6 | typedef void (* ping_sent_function)(void* arg, void *pdata); 7 | 8 | struct ping_option{ 9 | uint32 count; 10 | uint32 ip; 11 | uint32 coarse_time; 12 | ping_recv_function recv_function; 13 | ping_sent_function sent_function; 14 | void* reverse; 15 | }; 16 | 17 | struct ping_resp{ 18 | uint32 total_count; 19 | uint32 resp_time; 20 | uint32 seqno; 21 | uint32 timeout_count; 22 | uint32 bytes; 23 | uint32 total_bytes; 24 | uint32 total_time; 25 | sint8 ping_err; 26 | }; 27 | 28 | bool ping_start(struct ping_option *ping_opt); 29 | bool ping_regist_recv(struct ping_option *ping_opt, ping_recv_function ping_recv); 30 | bool ping_regist_sent(struct ping_option *ping_opt, ping_sent_function ping_sent); 31 | 32 | #endif /* __PING_H__ */ 33 | -------------------------------------------------------------------------------- /tools/sdk/include/pwm.h: -------------------------------------------------------------------------------- 1 | #ifndef __PWM_H__ 2 | #define __PWM_H__ 3 | 4 | /*pwm.h: function and macro definition of PWM API , driver level */ 5 | /*user_light.h: user interface for light API, user level*/ 6 | /*user_light_adj: API for color changing and lighting effects, user level*/ 7 | 8 | 9 | /*NOTE!! : DO NOT CHANGE THIS FILE*/ 10 | 11 | /*SUPPORT UP TO 8 PWM CHANNEL*/ 12 | #define PWM_CHANNEL_NUM_MAX 8 13 | 14 | struct pwm_param { 15 | uint32 period; 16 | uint32 freq; 17 | uint32 duty[PWM_CHANNEL_NUM_MAX]; //PWM_CHANNEL<=8 18 | }; 19 | 20 | 21 | /* pwm_init should be called only once, for now */ 22 | void pwm_init(uint32 period, uint32 *duty,uint32 pwm_channel_num,uint32 (*pin_info_list)[3]); 23 | void pwm_start(void); 24 | 25 | void pwm_set_duty(uint32 duty, uint8 channel); 26 | uint32 pwm_get_duty(uint8 channel); 27 | void pwm_set_period(uint32 period); 28 | uint32 pwm_get_period(void); 29 | 30 | uint32 get_pwm_version(void); 31 | void set_pwm_debug_en(uint8 print_en); 32 | 33 | #endif 34 | 35 | -------------------------------------------------------------------------------- /tools/sdk/include/smartconfig.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015 -2018 Espressif System 3 | * 4 | */ 5 | 6 | #ifndef __SMARTCONFIG_H__ 7 | #define __SMARTCONFIG_H__ 8 | 9 | typedef enum { 10 | SC_STATUS_WAIT = 0, 11 | SC_STATUS_FIND_CHANNEL, 12 | SC_STATUS_GETTING_SSID_PSWD, 13 | SC_STATUS_LINK, 14 | SC_STATUS_LINK_OVER, 15 | } sc_status; 16 | 17 | typedef enum { 18 | SC_TYPE_ESPTOUCH = 0, 19 | SC_TYPE_AIRKISS, 20 | } sc_type; 21 | 22 | typedef void (*sc_callback_t)(sc_status status, void *pdata); 23 | 24 | const char *smartconfig_get_version(void); 25 | bool smartconfig_start(sc_callback_t cb, ...); 26 | bool smartconfig_stop(void); 27 | bool esptouch_set_timeout(uint8 time_s); //15s~255s, offset:45s 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /tools/sdk/include/spi_flash.h: -------------------------------------------------------------------------------- 1 | /* 2 | * copyright (c) Espressif System 2010 3 | * 4 | */ 5 | 6 | #ifndef SPI_FLASH_H 7 | #define SPI_FLASH_H 8 | 9 | typedef enum { 10 | SPI_FLASH_RESULT_OK, 11 | SPI_FLASH_RESULT_ERR, 12 | SPI_FLASH_RESULT_TIMEOUT 13 | } SpiFlashOpResult; 14 | 15 | typedef struct{ 16 | uint32 deviceId; 17 | uint32 chip_size; // chip size in byte 18 | uint32 block_size; 19 | uint32 sector_size; 20 | uint32 page_size; 21 | uint32 status_mask; 22 | } SpiFlashChip; 23 | 24 | #define SPI_FLASH_SEC_SIZE 4096 25 | 26 | extern SpiFlashChip * flashchip; // in ram ROM-BIOS 27 | 28 | uint32 spi_flash_get_id(void); 29 | SpiFlashOpResult spi_flash_erase_sector(uint16 sec); 30 | SpiFlashOpResult spi_flash_write(uint32 des_addr, uint32 *src_addr, uint32 size); 31 | SpiFlashOpResult spi_flash_read(uint32 src_addr, uint32 *des_addr, uint32 size); 32 | 33 | typedef SpiFlashOpResult (* user_spi_flash_read)( 34 | SpiFlashChip *spi, 35 | uint32 src_addr, 36 | uint32 *des_addr, 37 | uint32 size); 38 | 39 | void spi_flash_set_read_func(user_spi_flash_read read); 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /tools/sdk/include/upgrade.h: -------------------------------------------------------------------------------- 1 | #ifndef __UPGRADE_H__ 2 | #define __UPGRADE_H__ 3 | 4 | #define SPI_FLASH_SEC_SIZE 4096 5 | #define LIMIT_ERASE_SIZE 0x10000 6 | 7 | #define USER_BIN1 0x00 8 | #define USER_BIN2 0x01 9 | 10 | #define UPGRADE_FLAG_IDLE 0x00 11 | #define UPGRADE_FLAG_START 0x01 12 | #define UPGRADE_FLAG_FINISH 0x02 13 | 14 | #define UPGRADE_FW_BIN1 0x00 15 | #define UPGRADE_FW_BIN2 0x01 16 | 17 | typedef void (*upgrade_states_check_callback)(void * arg); 18 | 19 | //#define UPGRADE_SSL_ENABLE 20 | 21 | struct upgrade_server_info { 22 | uint8 ip[4]; 23 | uint16 port; 24 | 25 | uint8 upgrade_flag; 26 | 27 | uint8 pre_version[16]; 28 | uint8 upgrade_version[16]; 29 | 30 | uint32 check_times; 31 | uint8 *url; 32 | 33 | upgrade_states_check_callback check_cb; 34 | struct espconn *pespconn; 35 | }; 36 | 37 | #define UPGRADE_FLAG_IDLE 0x00 38 | #define UPGRADE_FLAG_START 0x01 39 | #define UPGRADE_FLAG_FINISH 0x02 40 | 41 | void system_upgrade_init(); 42 | void system_upgrade_deinit(); 43 | bool system_upgrade(uint8 *data, uint16 len); 44 | 45 | #ifdef UPGRADE_SSL_ENABLE 46 | bool system_upgrade_start_ssl(struct upgrade_server_info *server); // not supported now 47 | #else 48 | bool system_upgrade_start(struct upgrade_server_info *server); 49 | #endif 50 | #endif 51 | -------------------------------------------------------------------------------- /tools/sdk/ld/eagle.flash.16m.ld: -------------------------------------------------------------------------------- 1 | /* Flash Split for 16M chips */ 2 | /* sketch 1019KB */ 3 | /* eeprom 20KB */ 4 | /* spiffs 15MB */ 5 | 6 | MEMORY 7 | { 8 | dport0_0_seg : org = 0x3FF00000, len = 0x10 9 | dram0_0_seg : org = 0x3FFE8000, len = 0x14000 10 | iram1_0_seg : org = 0x40100000, len = 0x8000 11 | irom0_0_seg : org = 0x40201010, len = 0xfeff0 12 | } 13 | 14 | PROVIDE ( _SPIFFS_start = 0x40300000 ); 15 | PROVIDE ( _SPIFFS_end = 0x41200000 ); 16 | PROVIDE ( _SPIFFS_page = 0x100 ); 17 | PROVIDE ( _SPIFFS_block = 0x2000 ); 18 | 19 | INCLUDE "../ld/eagle.app.v6.common.ld" 20 | -------------------------------------------------------------------------------- /tools/sdk/ld/eagle.flash.1m128.ld: -------------------------------------------------------------------------------- 1 | /* Flash Split for 1M chips */ 2 | /* sketch 871KB */ 3 | /* spiffs 128KB */ 4 | /* eeprom 20KB */ 5 | 6 | MEMORY 7 | { 8 | dport0_0_seg : org = 0x3FF00000, len = 0x10 9 | dram0_0_seg : org = 0x3FFE8000, len = 0x14000 10 | iram1_0_seg : org = 0x40100000, len = 0x8000 11 | irom0_0_seg : org = 0x40201010, len = 0xd9ff0 12 | } 13 | 14 | PROVIDE ( _SPIFFS_start = 0x402DB000 ); 15 | PROVIDE ( _SPIFFS_end = 0x402FB000 ); 16 | PROVIDE ( _SPIFFS_page = 0x100 ); 17 | PROVIDE ( _SPIFFS_block = 0x1000 ); 18 | 19 | INCLUDE "../ld/eagle.app.v6.common.ld" 20 | -------------------------------------------------------------------------------- /tools/sdk/ld/eagle.flash.1m256.ld: -------------------------------------------------------------------------------- 1 | /* Flash Split for 1M chips */ 2 | /* sketch 743KB */ 3 | /* spiffs 256KB */ 4 | /* eeprom 20KB */ 5 | 6 | MEMORY 7 | { 8 | dport0_0_seg : org = 0x3FF00000, len = 0x10 9 | dram0_0_seg : org = 0x3FFE8000, len = 0x14000 10 | iram1_0_seg : org = 0x40100000, len = 0x8000 11 | irom0_0_seg : org = 0x40201010, len = 0xb9ff0 12 | } 13 | 14 | PROVIDE ( _SPIFFS_start = 0x402BB000 ); 15 | PROVIDE ( _SPIFFS_end = 0x402FB000 ); 16 | PROVIDE ( _SPIFFS_page = 0x100 ); 17 | PROVIDE ( _SPIFFS_block = 0x1000 ); 18 | 19 | INCLUDE "../ld/eagle.app.v6.common.ld" 20 | -------------------------------------------------------------------------------- /tools/sdk/ld/eagle.flash.1m512.ld: -------------------------------------------------------------------------------- 1 | /* Flash Split for 1M chips */ 2 | /* sketch 487KB */ 3 | /* spiffs 512KB */ 4 | /* eeprom 20KB */ 5 | 6 | MEMORY 7 | { 8 | dport0_0_seg : org = 0x3FF00000, len = 0x10 9 | dram0_0_seg : org = 0x3FFE8000, len = 0x14000 10 | iram1_0_seg : org = 0x40100000, len = 0x8000 11 | irom0_0_seg : org = 0x40201010, len = 0x79ff0 12 | } 13 | 14 | PROVIDE ( _SPIFFS_start = 0x4027B000 ); 15 | PROVIDE ( _SPIFFS_end = 0x402FB000 ); 16 | PROVIDE ( _SPIFFS_page = 0x100 ); 17 | PROVIDE ( _SPIFFS_block = 0x2000 ); 18 | 19 | INCLUDE "../ld/eagle.app.v6.common.ld" 20 | -------------------------------------------------------------------------------- /tools/sdk/ld/eagle.flash.1m64.ld: -------------------------------------------------------------------------------- 1 | /* Flash Split for 1M chips */ 2 | /* sketch 935KB */ 3 | /* spiffs 64KB */ 4 | /* eeprom 20KB */ 5 | 6 | MEMORY 7 | { 8 | dport0_0_seg : org = 0x3FF00000, len = 0x10 9 | dram0_0_seg : org = 0x3FFE8000, len = 0x14000 10 | iram1_0_seg : org = 0x40100000, len = 0x8000 11 | irom0_0_seg : org = 0x40201010, len = 0xe9ff0 12 | } 13 | 14 | PROVIDE ( _SPIFFS_start = 0x402EB000 ); 15 | PROVIDE ( _SPIFFS_end = 0x402FB000 ); 16 | PROVIDE ( _SPIFFS_page = 0x100 ); 17 | PROVIDE ( _SPIFFS_block = 0x1000 ); 18 | 19 | INCLUDE "../ld/eagle.app.v6.common.ld" 20 | -------------------------------------------------------------------------------- /tools/sdk/ld/eagle.flash.2m.ld: -------------------------------------------------------------------------------- 1 | /* Flash Split for 2M chips */ 2 | /* sketch 1019KB */ 3 | /* spiffs 1004KB */ 4 | /* eeprom 20KB */ 5 | 6 | MEMORY 7 | { 8 | dport0_0_seg : org = 0x3FF00000, len = 0x10 9 | dram0_0_seg : org = 0x3FFE8000, len = 0x14000 10 | iram1_0_seg : org = 0x40100000, len = 0x8000 11 | irom0_0_seg : org = 0x40201010, len = 0xfeff0 12 | } 13 | 14 | PROVIDE ( _SPIFFS_start = 0x40300000 ); 15 | PROVIDE ( _SPIFFS_end = 0x403FB000 ); 16 | PROVIDE ( _SPIFFS_page = 0x100 ); 17 | PROVIDE ( _SPIFFS_block = 0x2000 ); 18 | 19 | INCLUDE "../ld/eagle.app.v6.common.ld" 20 | -------------------------------------------------------------------------------- /tools/sdk/ld/eagle.flash.4m.ld: -------------------------------------------------------------------------------- 1 | /* Flash Split for 4M chips */ 2 | /* sketch 1019KB */ 3 | /* spiffs 3052KB */ 4 | /* eeprom 20KB */ 5 | 6 | MEMORY 7 | { 8 | dport0_0_seg : org = 0x3FF00000, len = 0x10 9 | dram0_0_seg : org = 0x3FFE8000, len = 0x14000 10 | iram1_0_seg : org = 0x40100000, len = 0x8000 11 | irom0_0_seg : org = 0x40201010, len = 0xfeff0 12 | } 13 | 14 | PROVIDE ( _SPIFFS_start = 0x40300000 ); 15 | PROVIDE ( _SPIFFS_end = 0x405FB000 ); 16 | PROVIDE ( _SPIFFS_page = 0x100 ); 17 | PROVIDE ( _SPIFFS_block = 0x2000 ); 18 | 19 | INCLUDE "../ld/eagle.app.v6.common.ld" 20 | -------------------------------------------------------------------------------- /tools/sdk/ld/eagle.flash.4m1m.ld: -------------------------------------------------------------------------------- 1 | /* Flash Split for 4M chips */ 2 | /* sketch 1019KB */ 3 | /* empty 2048KB */ 4 | /* spiffs 1004KB */ 5 | /* eeprom 20KB */ 6 | 7 | MEMORY 8 | { 9 | dport0_0_seg : org = 0x3FF00000, len = 0x10 10 | dram0_0_seg : org = 0x3FFE8000, len = 0x14000 11 | iram1_0_seg : org = 0x40100000, len = 0x8000 12 | irom0_0_seg : org = 0x40201010, len = 0xfeff0 13 | } 14 | 15 | PROVIDE ( _SPIFFS_start = 0x40500000 ); 16 | PROVIDE ( _SPIFFS_end = 0x405FB000 ); 17 | PROVIDE ( _SPIFFS_page = 0x100 ); 18 | PROVIDE ( _SPIFFS_block = 0x2000 ); 19 | 20 | INCLUDE "../ld/eagle.app.v6.common.ld" 21 | -------------------------------------------------------------------------------- /tools/sdk/ld/eagle.flash.512k0.ld: -------------------------------------------------------------------------------- 1 | /* Flash Split for 512K chips, no SPIFFS */ 2 | /* sketch 487KB */ 3 | /* eeprom 20KB */ 4 | 5 | MEMORY 6 | { 7 | dport0_0_seg : org = 0x3FF00000, len = 0x10 8 | dram0_0_seg : org = 0x3FFE8000, len = 0x14000 9 | iram1_0_seg : org = 0x40100000, len = 0x8000 10 | irom0_0_seg : org = 0x40201010, len = 0x79ff0 11 | } 12 | 13 | PROVIDE ( _SPIFFS_start = 0x4027B000 ); 14 | PROVIDE ( _SPIFFS_end = 0x4027B000 ); 15 | PROVIDE ( _SPIFFS_page = 0 ); 16 | PROVIDE ( _SPIFFS_block = 0 ); 17 | 18 | INCLUDE "../ld/eagle.app.v6.common.ld" 19 | -------------------------------------------------------------------------------- /tools/sdk/ld/eagle.flash.512k64.ld: -------------------------------------------------------------------------------- 1 | /* Flash Split for 512K chips */ 2 | /* sketch 423KB */ 3 | /* spiffs 64KB */ 4 | /* eeprom 20KB */ 5 | 6 | MEMORY 7 | { 8 | dport0_0_seg : org = 0x3FF00000, len = 0x10 9 | dram0_0_seg : org = 0x3FFE8000, len = 0x14000 10 | iram1_0_seg : org = 0x40100000, len = 0x8000 11 | irom0_0_seg : org = 0x40201010, len = 0x69ff0 12 | } 13 | 14 | PROVIDE ( _SPIFFS_start = 0x4026B000 ); 15 | PROVIDE ( _SPIFFS_end = 0x4027B000 ); 16 | PROVIDE ( _SPIFFS_page = 0x100 ); 17 | PROVIDE ( _SPIFFS_block = 0x1000 ); 18 | 19 | INCLUDE "../ld/eagle.app.v6.common.ld" 20 | -------------------------------------------------------------------------------- /tools/sdk/ld/eagle.flash.8m.ld: -------------------------------------------------------------------------------- 1 | /* Flash Split for 8M chips */ 2 | /* sketch 1019KB */ 3 | /* eeprom 20KB */ 4 | /* spiffs 7MB */ 5 | 6 | MEMORY 7 | { 8 | dport0_0_seg : org = 0x3FF00000, len = 0x10 9 | dram0_0_seg : org = 0x3FFE8000, len = 0x14000 10 | iram1_0_seg : org = 0x40100000, len = 0x8000 11 | irom0_0_seg : org = 0x40201010, len = 0xfeff0 12 | } 13 | 14 | PROVIDE ( _SPIFFS_start = 0x40300000 ); 15 | PROVIDE ( _SPIFFS_end = 0x40A00000 ); 16 | PROVIDE ( _SPIFFS_page = 0x100 ); 17 | PROVIDE ( _SPIFFS_block = 0x2000 ); 18 | 19 | INCLUDE "../ld/eagle.app.v6.common.ld" 20 | -------------------------------------------------------------------------------- /tools/sdk/lib/libat.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/tools/sdk/lib/libat.a -------------------------------------------------------------------------------- /tools/sdk/lib/libaxtls.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/tools/sdk/lib/libaxtls.a -------------------------------------------------------------------------------- /tools/sdk/lib/libcrypto.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/tools/sdk/lib/libcrypto.a -------------------------------------------------------------------------------- /tools/sdk/lib/libespnow.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/tools/sdk/lib/libespnow.a -------------------------------------------------------------------------------- /tools/sdk/lib/libhal.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/tools/sdk/lib/libhal.a -------------------------------------------------------------------------------- /tools/sdk/lib/libjson.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/tools/sdk/lib/libjson.a -------------------------------------------------------------------------------- /tools/sdk/lib/liblwip.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/tools/sdk/lib/liblwip.a -------------------------------------------------------------------------------- /tools/sdk/lib/liblwip_536.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/tools/sdk/lib/liblwip_536.a -------------------------------------------------------------------------------- /tools/sdk/lib/libmain.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/tools/sdk/lib/libmain.a -------------------------------------------------------------------------------- /tools/sdk/lib/libnet80211.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/tools/sdk/lib/libnet80211.a -------------------------------------------------------------------------------- /tools/sdk/lib/libphy.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/tools/sdk/lib/libphy.a -------------------------------------------------------------------------------- /tools/sdk/lib/libpp.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/tools/sdk/lib/libpp.a -------------------------------------------------------------------------------- /tools/sdk/lib/libpwm.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/tools/sdk/lib/libpwm.a -------------------------------------------------------------------------------- /tools/sdk/lib/libsmartconfig.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/tools/sdk/lib/libsmartconfig.a -------------------------------------------------------------------------------- /tools/sdk/lib/libssl.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/tools/sdk/lib/libssl.a -------------------------------------------------------------------------------- /tools/sdk/lib/libupgrade.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/tools/sdk/lib/libupgrade.a -------------------------------------------------------------------------------- /tools/sdk/lib/libwpa.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/tools/sdk/lib/libwpa.a -------------------------------------------------------------------------------- /tools/sdk/lib/libwps.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tobozo/Arduino/83e5e6b3f31adf7ac91d1ddae404300d561a56c9/tools/sdk/lib/libwps.a -------------------------------------------------------------------------------- /tools/sdk/version: -------------------------------------------------------------------------------- 1 | 1.3.0_15_08_10_p1 --------------------------------------------------------------------------------