├── .codespellrc ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── dependabot.yml ├── stale.yml └── workflows │ ├── auto-github-actions.yml │ ├── check-arduino.yml │ ├── report-size-deltas.yml │ └── spell-check.yml ├── .gitignore ├── CONTRIBUTING.md ├── LibraryPatches ├── Ethernet │ └── src │ │ ├── Ethernet.cpp │ │ ├── Ethernet.h │ │ ├── EthernetServer.cpp │ │ └── utility │ │ ├── w5100.cpp │ │ └── w5100.h ├── Ethernet2 │ └── src │ │ ├── Ethernet2.cpp │ │ ├── Ethernet2.h │ │ ├── EthernetUdp2.cpp │ │ └── EthernetUdp2.h ├── Ethernet3 │ └── src │ │ ├── Ethernet3.cpp │ │ └── Ethernet3.h ├── EthernetLarge │ └── src │ │ ├── EthernetLarge.cpp │ │ ├── EthernetLarge.h │ │ ├── EthernetServer.cpp │ │ └── utility │ │ ├── w5100.cpp │ │ └── w5100.h ├── UIPEthernet-2.0.9 │ ├── UIPEthernet.cpp │ ├── UIPEthernet.h │ └── utility │ │ ├── Enc28J60Network.cpp │ │ └── Enc28J60Network.h ├── UIPEthernet │ ├── UIPEthernet.cpp │ ├── UIPEthernet.h │ └── utility │ │ ├── Enc28J60Network.cpp │ │ └── Enc28J60Network.h └── esp32 │ └── cores │ └── esp32 │ └── Server.h ├── Packages_Patches ├── Fab_SAM_Arduino │ └── hardware │ │ ├── hardware │ │ └── 1.6.18-alpha2 │ │ │ └── boards.txt │ │ └── samd │ │ ├── 1.6.18-alpha2 │ │ └── boards.txt │ │ ├── 1.7.0 │ │ └── boards.txt │ │ ├── 1.8.0 │ │ └── boards.txt │ │ └── 1.9.0 │ │ └── boards.txt ├── Maixduino │ └── hardware │ │ └── k210 │ │ ├── 0.3.10 │ │ └── cores │ │ │ └── arduino │ │ │ └── Stream.h │ │ └── 0.3.11 │ │ └── cores │ │ └── arduino │ │ └── Stream.h ├── STM32 │ └── hardware │ │ └── stm32 │ │ ├── 1.9.0 │ │ ├── system │ │ │ ├── STM32F4xx │ │ │ │ └── stm32f4xx_hal_conf_default.h │ │ │ └── STM32F7xx │ │ │ │ └── stm32f7xx_hal_conf_default.h │ │ └── variants │ │ │ ├── NUCLEO_F767ZI │ │ │ └── variant.h │ │ │ └── NUCLEO_L053R8 │ │ │ └── variant.h │ │ ├── 2.0.0 │ │ ├── system │ │ │ ├── STM32F4xx │ │ │ │ └── stm32f4xx_hal_conf_default.h │ │ │ └── STM32F7xx │ │ │ │ └── stm32f7xx_hal_conf_default.h │ │ └── variants │ │ │ ├── F765Z(G-I)T_F767Z(G-I)T_F777ZIT │ │ │ └── variant_NUCLEO_F767ZI.h │ │ │ ├── L052R(6-8)H_L053R(6-8)H │ │ │ └── variant_generic.h │ │ │ ├── STM32F7xx │ │ │ └── F765Z(G-I)T_F767Z(G-I)T_F777ZIT │ │ │ │ └── variant_NUCLEO_F767ZI.h │ │ │ └── STM32L0xx │ │ │ └── L052R(6-8)T_L053R(6-8)T_L063R8T │ │ │ └── variant_generic.h │ │ ├── 2.1.0 │ │ ├── system │ │ │ ├── STM32F4xx │ │ │ │ └── stm32f4xx_hal_conf_default.h │ │ │ └── STM32F7xx │ │ │ │ └── stm32f7xx_hal_conf_default.h │ │ └── variants │ │ │ ├── STM32F7xx │ │ │ └── F765Z(G-I)T_F767Z(G-I)T_F777ZIT │ │ │ │ └── variant_NUCLEO_F767ZI.h │ │ │ └── STM32L0xx │ │ │ └── L052R(6-8)T_L053R(6-8)T_L063R8T │ │ │ └── variant_generic.h │ │ ├── 2.2.0 │ │ ├── system │ │ │ ├── STM32F4xx │ │ │ │ └── stm32f4xx_hal_conf_default.h │ │ │ └── STM32F7xx │ │ │ │ └── stm32f7xx_hal_conf_default.h │ │ └── variants │ │ │ ├── STM32F7xx │ │ │ └── F765Z(G-I)T_F767Z(G-I)T_F777ZIT │ │ │ │ └── variant_NUCLEO_F767ZI.h │ │ │ └── STM32L0xx │ │ │ └── L052R(6-8)T_L053R(6-8)T_L063R8T │ │ │ └── variant_generic.h │ │ └── 2.3.0 │ │ ├── system │ │ ├── STM32F4xx │ │ │ └── stm32f4xx_hal_conf_default.h │ │ └── STM32F7xx │ │ │ └── stm32f7xx_hal_conf_default.h │ │ └── variants │ │ ├── STM32F7xx │ │ └── F765Z(G-I)T_F767Z(G-I)T_F777ZIT │ │ │ └── variant_NUCLEO_F767ZI.h │ │ └── STM32L0xx │ │ └── L052R(6-8)T_L053R(6-8)T_L063R8T │ │ └── variant_generic.h ├── Seeeduino │ └── hardware │ │ ├── nrf52 │ │ └── 1.0.0 │ │ │ ├── cores │ │ │ └── nRF5 │ │ │ │ ├── Print.cpp │ │ │ │ ├── Print.h │ │ │ │ └── Udp.h │ │ │ └── platform.txt │ │ ├── rp2040 │ │ ├── 1.9.3 │ │ │ └── variants │ │ │ │ └── rpipico │ │ │ │ └── pins_arduino.h │ │ └── 2.7.2 │ │ │ ├── boards.txt │ │ │ └── variants │ │ │ └── Seeed_XIAO_RP2040 │ │ │ └── pins_arduino.h │ │ └── samd │ │ ├── 1.7.0 │ │ └── boards.txt │ │ ├── 1.7.7 │ │ ├── cores │ │ │ └── arduino │ │ │ │ ├── Arduino.h │ │ │ │ ├── Print.cpp │ │ │ │ └── Print.h │ │ └── platform.txt │ │ ├── 1.7.8 │ │ ├── cores │ │ │ └── arduino │ │ │ │ ├── Arduino.h │ │ │ │ ├── Print.cpp │ │ │ │ └── Print.h │ │ └── platform.txt │ │ ├── 1.7.9 │ │ ├── cores │ │ │ └── arduino │ │ │ │ ├── Arduino.h │ │ │ │ ├── Print.cpp │ │ │ │ └── Print.h │ │ └── platform.txt │ │ ├── 1.8.1 │ │ ├── cores │ │ │ └── arduino │ │ │ │ ├── Arduino.h │ │ │ │ ├── Print.cpp │ │ │ │ └── Print.h │ │ └── platform.txt │ │ ├── 1.8.2 │ │ ├── cores │ │ │ └── arduino │ │ │ │ ├── Arduino.h │ │ │ │ ├── Print.cpp │ │ │ │ └── Print.h │ │ └── platform.txt │ │ └── 1.8.3 │ │ ├── cores │ │ └── arduino │ │ │ ├── Arduino.h │ │ │ ├── Print.cpp │ │ │ └── Print.h │ │ └── platform.txt ├── SparkFun │ └── hardware │ │ └── samd │ │ └── 1.8.3 │ │ └── cores │ │ ├── arduino │ │ ├── Print.cpp │ │ └── Print.h │ │ └── arduino51 │ │ ├── Print.cpp │ │ └── Print.h ├── adafruit │ └── hardware │ │ ├── nrf52 │ │ ├── 0.19.0 │ │ │ ├── boards.txt │ │ │ ├── cores │ │ │ │ └── nRF5 │ │ │ │ │ ├── Print.cpp │ │ │ │ │ ├── Print.h │ │ │ │ │ └── Udp.h │ │ │ ├── platform.txt │ │ │ └── variants │ │ │ │ ├── NINA_B112_ublox │ │ │ │ ├── pins_arduino.h │ │ │ │ ├── variant.cpp │ │ │ │ └── variant.h │ │ │ │ └── NINA_B302_ublox │ │ │ │ ├── pins_arduino.h │ │ │ │ ├── variant.cpp │ │ │ │ └── variant.h │ │ ├── 0.20.1 │ │ │ ├── boards.txt │ │ │ ├── cores │ │ │ │ └── nRF5 │ │ │ │ │ ├── Print.cpp │ │ │ │ │ ├── Print.h │ │ │ │ │ └── Udp.h │ │ │ ├── platform.txt │ │ │ └── variants │ │ │ │ ├── NINA_B112_ublox │ │ │ │ ├── pins_arduino.h │ │ │ │ ├── variant.cpp │ │ │ │ └── variant.h │ │ │ │ └── NINA_B302_ublox │ │ │ │ ├── pins_arduino.h │ │ │ │ ├── variant.cpp │ │ │ │ └── variant.h │ │ ├── 0.20.5 │ │ │ ├── boards.txt │ │ │ ├── cores │ │ │ │ └── nRF5 │ │ │ │ │ ├── Print.cpp │ │ │ │ │ ├── Print.h │ │ │ │ │ └── Udp.h │ │ │ ├── platform.txt │ │ │ └── variants │ │ │ │ ├── NINA_B112_ublox │ │ │ │ ├── pins_arduino.h │ │ │ │ ├── variant.cpp │ │ │ │ └── variant.h │ │ │ │ └── NINA_B302_ublox │ │ │ │ ├── pins_arduino.h │ │ │ │ ├── variant.cpp │ │ │ │ └── variant.h │ │ ├── 0.21.0 │ │ │ ├── boards.txt │ │ │ ├── cores │ │ │ │ └── nRF5 │ │ │ │ │ ├── Print.cpp │ │ │ │ │ ├── Print.h │ │ │ │ │ └── Udp.h │ │ │ ├── platform.txt │ │ │ └── variants │ │ │ │ ├── NINA_B112_ublox │ │ │ │ ├── pins_arduino.h │ │ │ │ ├── variant.cpp │ │ │ │ └── variant.h │ │ │ │ └── NINA_B302_ublox │ │ │ │ ├── pins_arduino.h │ │ │ │ ├── variant.cpp │ │ │ │ └── variant.h │ │ ├── 0.22.0 │ │ │ ├── boards.txt │ │ │ ├── cores │ │ │ │ └── nRF5 │ │ │ │ │ ├── Print.cpp │ │ │ │ │ ├── Print.h │ │ │ │ │ └── Udp.h │ │ │ ├── platform.txt │ │ │ └── variants │ │ │ │ ├── NINA_B112_ublox │ │ │ │ ├── pins_arduino.h │ │ │ │ ├── variant.cpp │ │ │ │ └── variant.h │ │ │ │ └── NINA_B302_ublox │ │ │ │ ├── pins_arduino.h │ │ │ │ ├── variant.cpp │ │ │ │ └── variant.h │ │ ├── 0.22.1 │ │ │ ├── boards.txt │ │ │ ├── cores │ │ │ │ └── nRF5 │ │ │ │ │ ├── Print.cpp │ │ │ │ │ ├── Print.h │ │ │ │ │ └── Udp.h │ │ │ ├── platform.txt │ │ │ └── variants │ │ │ │ ├── NINA_B112_ublox │ │ │ │ ├── pins_arduino.h │ │ │ │ ├── variant.cpp │ │ │ │ └── variant.h │ │ │ │ └── NINA_B302_ublox │ │ │ │ ├── pins_arduino.h │ │ │ │ ├── variant.cpp │ │ │ │ └── variant.h │ │ ├── 0.23.0 │ │ │ ├── boards.txt │ │ │ ├── cores │ │ │ │ └── nRF5 │ │ │ │ │ ├── Print.cpp │ │ │ │ │ ├── Print.h │ │ │ │ │ └── Udp.h │ │ │ ├── platform.txt │ │ │ └── variants │ │ │ │ ├── NINA_B112_ublox │ │ │ │ ├── pins_arduino.h │ │ │ │ ├── variant.cpp │ │ │ │ └── variant.h │ │ │ │ └── NINA_B302_ublox │ │ │ │ ├── pins_arduino.h │ │ │ │ ├── variant.cpp │ │ │ │ └── variant.h │ │ ├── 0.24.0 │ │ │ ├── boards.txt │ │ │ ├── cores │ │ │ │ └── nRF5 │ │ │ │ │ ├── Print.cpp │ │ │ │ │ ├── Print.h │ │ │ │ │ └── Udp.h │ │ │ ├── platform.txt │ │ │ └── variants │ │ │ │ ├── NINA_B112_ublox │ │ │ │ ├── pins_arduino.h │ │ │ │ ├── variant.cpp │ │ │ │ └── variant.h │ │ │ │ └── NINA_B302_ublox │ │ │ │ ├── pins_arduino.h │ │ │ │ ├── variant.cpp │ │ │ │ └── variant.h │ │ ├── 1.0.0 │ │ │ ├── boards.txt │ │ │ ├── cores │ │ │ │ └── nRF5 │ │ │ │ │ ├── Print.cpp │ │ │ │ │ ├── Print.h │ │ │ │ │ └── Udp.h │ │ │ ├── platform.txt │ │ │ └── variants │ │ │ │ ├── NINA_B112_ublox │ │ │ │ ├── pins_arduino.h │ │ │ │ ├── variant.cpp │ │ │ │ └── variant.h │ │ │ │ ├── NINA_B302_ublox │ │ │ │ ├── pins_arduino.h │ │ │ │ ├── variant.cpp │ │ │ │ └── variant.h │ │ │ │ └── sparkfun_nrf52840_mini │ │ │ │ ├── variant.cpp │ │ │ │ └── variant.h │ │ ├── 1.1.0 │ │ │ ├── boards.txt │ │ │ ├── cores │ │ │ │ └── nRF5 │ │ │ │ │ ├── Print.cpp │ │ │ │ │ ├── Print.h │ │ │ │ │ └── Udp.h │ │ │ ├── platform.txt │ │ │ └── variants │ │ │ │ ├── NINA_B112_ublox │ │ │ │ ├── pins_arduino.h │ │ │ │ ├── variant.cpp │ │ │ │ └── variant.h │ │ │ │ ├── NINA_B302_ublox │ │ │ │ ├── pins_arduino.h │ │ │ │ ├── variant.cpp │ │ │ │ └── variant.h │ │ │ │ └── sparkfun_nrf52840_mini │ │ │ │ ├── variant.cpp │ │ │ │ └── variant.h │ │ ├── 1.2.0 │ │ │ ├── boards.txt │ │ │ ├── cores │ │ │ │ └── nRF5 │ │ │ │ │ ├── Print.cpp │ │ │ │ │ ├── Print.h │ │ │ │ │ └── Udp.h │ │ │ ├── platform.txt │ │ │ └── variants │ │ │ │ ├── NINA_B112_ublox │ │ │ │ ├── pins_arduino.h │ │ │ │ ├── variant.cpp │ │ │ │ └── variant.h │ │ │ │ ├── NINA_B302_ublox │ │ │ │ ├── pins_arduino.h │ │ │ │ ├── variant.cpp │ │ │ │ └── variant.h │ │ │ │ └── sparkfun_nrf52840_mini │ │ │ │ ├── variant.cpp │ │ │ │ └── variant.h │ │ └── 1.3.0 │ │ │ ├── boards.txt │ │ │ ├── cores │ │ │ └── nRF5 │ │ │ │ ├── Print.cpp │ │ │ │ ├── Print.h │ │ │ │ └── Udp.h │ │ │ ├── platform.txt │ │ │ └── variants │ │ │ ├── NINA_B112_ublox │ │ │ ├── pins_arduino.h │ │ │ ├── variant.cpp │ │ │ └── variant.h │ │ │ ├── NINA_B302_ublox │ │ │ ├── pins_arduino.h │ │ │ ├── variant.cpp │ │ │ └── variant.h │ │ │ └── sparkfun_nrf52840_mini │ │ │ ├── variant.cpp │ │ │ └── variant.h │ │ └── samd │ │ ├── 1.5.14 │ │ ├── cores │ │ │ └── arduino │ │ │ │ ├── Print.cpp │ │ │ │ └── Print.h │ │ └── platform.txt │ │ ├── 1.6.0 │ │ ├── cores │ │ │ └── arduino │ │ │ │ ├── Print.cpp │ │ │ │ └── Print.h │ │ └── platform.txt │ │ ├── 1.6.3 │ │ ├── cores │ │ │ └── arduino │ │ │ │ ├── Print.cpp │ │ │ │ └── Print.h │ │ └── platform.txt │ │ ├── 1.6.4 │ │ ├── cores │ │ │ └── arduino │ │ │ │ ├── Print.cpp │ │ │ │ └── Print.h │ │ └── platform.txt │ │ ├── 1.6.5 │ │ ├── cores │ │ │ └── arduino │ │ │ │ ├── Print.cpp │ │ │ │ └── Print.h │ │ └── platform.txt │ │ ├── 1.6.6 │ │ ├── cores │ │ │ └── arduino │ │ │ │ ├── Print.cpp │ │ │ │ └── Print.h │ │ └── platform.txt │ │ ├── 1.6.7 │ │ ├── cores │ │ │ └── arduino │ │ │ │ ├── Print.cpp │ │ │ │ └── Print.h │ │ └── platform.txt │ │ ├── 1.6.8 │ │ ├── cores │ │ │ └── arduino │ │ │ │ ├── Print.cpp │ │ │ │ └── Print.h │ │ └── platform.txt │ │ ├── 1.7.0 │ │ ├── cores │ │ │ └── arduino │ │ │ │ ├── Print.cpp │ │ │ │ └── Print.h │ │ └── platform.txt │ │ ├── 1.7.1 │ │ ├── cores │ │ │ └── arduino │ │ │ │ ├── Print.cpp │ │ │ │ └── Print.h │ │ └── platform.txt │ │ ├── 1.7.10 │ │ ├── cores │ │ │ └── arduino │ │ │ │ ├── Print.cpp │ │ │ │ └── Print.h │ │ └── platform.txt │ │ ├── 1.7.11 │ │ ├── cores │ │ │ └── arduino │ │ │ │ ├── Print.cpp │ │ │ │ └── Print.h │ │ └── platform.txt │ │ ├── 1.7.2 │ │ ├── cores │ │ │ └── arduino │ │ │ │ ├── Print.cpp │ │ │ │ └── Print.h │ │ └── platform.txt │ │ ├── 1.7.3 │ │ ├── cores │ │ │ └── arduino │ │ │ │ ├── Print.cpp │ │ │ │ └── Print.h │ │ └── platform.txt │ │ ├── 1.7.4 │ │ ├── cores │ │ │ └── arduino │ │ │ │ ├── Print.cpp │ │ │ │ └── Print.h │ │ └── platform.txt │ │ ├── 1.7.5 │ │ ├── cores │ │ │ └── arduino │ │ │ │ ├── Print.cpp │ │ │ │ └── Print.h │ │ └── platform.txt │ │ ├── 1.7.6 │ │ ├── cores │ │ │ └── arduino │ │ │ │ ├── Print.cpp │ │ │ │ └── Print.h │ │ └── platform.txt │ │ ├── 1.7.7 │ │ ├── cores │ │ │ └── arduino │ │ │ │ ├── Print.cpp │ │ │ │ └── Print.h │ │ └── platform.txt │ │ ├── 1.7.8 │ │ ├── cores │ │ │ └── arduino │ │ │ │ ├── Print.cpp │ │ │ │ └── Print.h │ │ └── platform.txt │ │ └── 1.7.9 │ │ ├── cores │ │ └── arduino │ │ │ ├── Print.cpp │ │ │ └── Print.h │ │ └── platform.txt ├── arduino │ └── hardware │ │ ├── mbed_portenta │ │ ├── 2.4.1 │ │ │ ├── cores │ │ │ │ └── arduino │ │ │ │ │ └── mbed │ │ │ │ │ └── connectivity │ │ │ │ │ └── lwipstack │ │ │ │ │ └── include │ │ │ │ │ └── lwipstack │ │ │ │ │ └── lwipopts.h │ │ │ ├── libraries │ │ │ │ └── SocketWrapper │ │ │ │ │ └── src │ │ │ │ │ ├── MbedUdp.cpp │ │ │ │ │ └── MbedUdp.h │ │ │ └── portenta_post_install.sh │ │ ├── 2.5.2 │ │ │ ├── cores │ │ │ │ └── arduino │ │ │ │ │ └── mbed │ │ │ │ │ └── connectivity │ │ │ │ │ └── lwipstack │ │ │ │ │ └── include │ │ │ │ │ └── lwipstack │ │ │ │ │ └── lwipopts.h │ │ │ ├── libraries │ │ │ │ └── SocketWrapper │ │ │ │ │ └── src │ │ │ │ │ ├── MbedUdp.cpp │ │ │ │ │ └── MbedUdp.h │ │ │ └── portenta_post_install.sh │ │ ├── 2.6.1 │ │ │ ├── cores │ │ │ │ └── arduino │ │ │ │ │ └── mbed │ │ │ │ │ └── connectivity │ │ │ │ │ └── lwipstack │ │ │ │ │ └── include │ │ │ │ │ └── lwipstack │ │ │ │ │ └── lwipopts.h │ │ │ ├── libraries │ │ │ │ └── SocketWrapper │ │ │ │ │ └── src │ │ │ │ │ ├── MbedUdp.cpp │ │ │ │ │ └── MbedUdp.h │ │ │ └── portenta_post_install.sh │ │ ├── 2.7.2 │ │ │ ├── cores │ │ │ │ └── arduino │ │ │ │ │ └── mbed │ │ │ │ │ └── connectivity │ │ │ │ │ └── lwipstack │ │ │ │ │ └── include │ │ │ │ │ └── lwipstack │ │ │ │ │ └── lwipopts.h │ │ │ └── portenta_post_install.sh │ │ ├── 2.8.0 │ │ │ ├── cores │ │ │ │ └── arduino │ │ │ │ │ └── mbed │ │ │ │ │ └── connectivity │ │ │ │ │ └── lwipstack │ │ │ │ │ └── include │ │ │ │ │ └── lwipstack │ │ │ │ │ └── lwipopts.h │ │ │ └── portenta_post_install.sh │ │ ├── 3.0.0 │ │ │ ├── cores │ │ │ │ └── arduino │ │ │ │ │ └── mbed │ │ │ │ │ └── connectivity │ │ │ │ │ └── lwipstack │ │ │ │ │ └── include │ │ │ │ │ └── lwipstack │ │ │ │ │ └── lwipopts.h │ │ │ └── portenta_post_install.sh │ │ ├── 3.0.1 │ │ │ ├── cores │ │ │ │ └── arduino │ │ │ │ │ └── mbed │ │ │ │ │ └── connectivity │ │ │ │ │ └── lwipstack │ │ │ │ │ └── include │ │ │ │ │ └── lwipstack │ │ │ │ │ └── lwipopts.h │ │ │ └── portenta_post_install.sh │ │ ├── 3.1.1 │ │ │ ├── cores │ │ │ │ └── arduino │ │ │ │ │ └── mbed │ │ │ │ │ └── connectivity │ │ │ │ │ └── lwipstack │ │ │ │ │ └── include │ │ │ │ │ └── lwipstack │ │ │ │ │ └── lwipopts.h │ │ │ └── portenta_post_install.sh │ │ ├── 3.3.0 │ │ │ └── portenta_post_install.sh │ │ └── 3.4.1 │ │ │ └── portenta_post_install.sh │ │ ├── sam │ │ └── 1.6.12 │ │ │ └── platform.txt │ │ └── samd │ │ ├── 1.8.10 │ │ └── platform.txt │ │ ├── 1.8.11 │ │ └── platform.txt │ │ ├── 1.8.12 │ │ └── platform.txt │ │ ├── 1.8.13 │ │ └── platform.txt │ │ ├── 1.8.6 │ │ ├── cores │ │ │ └── arduino │ │ │ │ └── Arduino.h │ │ └── platform.txt │ │ ├── 1.8.7 │ │ ├── cores │ │ │ └── arduino │ │ │ │ └── Arduino.h │ │ └── platform.txt │ │ ├── 1.8.8 │ │ ├── cores │ │ │ ├── Arduino.h │ │ │ └── arduino │ │ │ │ └── Arduino.h │ │ └── platform.txt │ │ └── 1.8.9 │ │ ├── cores │ │ └── arduino │ │ │ └── Arduino.h │ │ └── platform.txt ├── hardware │ └── teensy │ │ └── avr │ │ ├── boards.txt │ │ └── cores │ │ ├── teensy │ │ ├── Stream.cpp │ │ └── Stream.h │ │ ├── teensy3 │ │ ├── Stream.cpp │ │ └── Stream.h │ │ └── teensy4 │ │ ├── Stream.cpp │ │ └── Stream.h ├── industrialshields │ └── hardware │ │ └── avr │ │ ├── 1.1.36 │ │ └── cores │ │ │ └── industrialshields │ │ │ └── Udp.h │ │ └── 1.1.37 │ │ └── cores │ │ └── industrialshields │ │ └── Udp.h ├── realtek │ └── hardware │ │ └── AmebaD │ │ ├── 3.0.10 │ │ └── cores │ │ │ └── arduino │ │ │ └── avr │ │ │ └── pgmspace.h │ │ ├── 3.0.8 │ │ └── cores │ │ │ └── arduino │ │ │ └── avr │ │ │ └── pgmspace.h │ │ ├── 3.1.0 │ │ └── cores │ │ │ └── arduino │ │ │ └── avr │ │ │ └── pgmspace.h │ │ ├── 3.1.1 │ │ └── cores │ │ │ └── arduino │ │ │ └── avr │ │ │ └── pgmspace.h │ │ ├── 3.1.2 │ │ └── cores │ │ │ └── arduino │ │ │ └── avr │ │ │ └── pgmspace.h │ │ ├── 3.1.3 │ │ └── cores │ │ │ └── ambd │ │ │ └── avr │ │ │ └── pgmspace.h │ │ └── 3.1.4 │ │ └── cores │ │ └── ambd │ │ └── avr │ │ └── pgmspace.h └── rp2040 │ └── hardware │ └── rp2040 │ ├── 1.2.1 │ └── platform.txt │ ├── 1.2.2 │ └── platform.txt │ ├── 1.3.0 │ └── platform.txt │ ├── 1.3.1 │ ├── cores │ │ └── rp2040 │ │ │ └── Arduino.h │ └── platform.txt │ └── 1.4.0 │ ├── cores │ └── rp2040 │ │ └── Arduino.h │ └── platform.txt ├── README.md ├── changelog.md ├── doc-examples └── callbacks.cpp ├── examples ├── ESP │ ├── AirQualitySensor │ │ ├── AirQualitySensor │ │ │ └── AirQualitySensor.ino │ │ └── AirQualitySensor_GP2Y1014AU0F │ │ │ ├── AirQualitySensor_GP2Y1014AU0F.ino │ │ │ └── AirQualitySensor_GP2Y1014AU0F.jpg │ ├── Blinds │ │ └── Blinds.ino │ ├── Camera │ │ ├── Camera.ino │ │ └── select_pins.h │ ├── ContactSensor │ │ └── ContactSensor.ino │ ├── DimSwitch │ │ └── DimSwitch.ino │ ├── Fan │ │ └── Fan.ino │ ├── GarageDoor │ │ └── GarageDoor.ino │ ├── Light │ │ ├── Light │ │ │ └── Light.ino │ │ ├── Light_FastLED_WS2812 │ │ │ └── Light_FastLED_WS2812.ino │ │ └── RGB_LED_Stripe_5050 │ │ │ ├── RGB_LED_Stripe_5050.ino │ │ │ └── RGB_LED_Stripe_5050.png │ ├── Lock │ │ ├── Lock │ │ │ └── Lock.ino │ │ └── Lock_with_feedback │ │ │ └── Lock_with_feedback.ino │ ├── MotionSensor │ │ └── MotionSensor.ino │ ├── PowerSensor │ │ └── PowerSensor.ino │ ├── Speaker │ │ └── Speaker.ino │ ├── Switch │ │ ├── MultiSwitch_advance │ │ │ └── MultiSwitch_advance.ino │ │ ├── MultiSwitch_advance_tactile-button.png │ │ ├── MultiSwitch_beginner │ │ │ └── MultiSwitch_beginner.ino │ │ ├── MultiSwitch_intermediate │ │ │ └── MultiSwitch_intermediate.ino │ │ ├── MutliSwitch_advance_toggle-switch.png │ │ ├── Switch │ │ │ └── Switch.ino │ │ └── WeMosD1_mini_relay_shield │ │ │ └── WeMosD1_mini_relay_shield.ino │ ├── TV │ │ └── TV.ino │ ├── Thermostat │ │ └── Thermostat.ino │ ├── doorbell │ │ └── doorbell.ino │ ├── platformio │ │ └── platformio.ini │ └── temperaturesensor │ │ ├── DHT22_Wiring.png │ │ ├── README.md │ │ └── temperaturesensor.ino ├── Generic │ ├── AirQualitySensor │ │ ├── AirQualitySensor_GP2Y1014AU0F.jpg │ │ ├── Generic_Ethernet_AQSensor │ │ │ ├── Generic_Ethernet_AQSensor.ino │ │ │ └── defines.h │ │ ├── Generic_Ethernet_AQSensor_GP2Y1014AU0F │ │ │ ├── Generic_Ethernet_AQSensor_GP2Y1014AU0F.ino │ │ │ └── defines.h │ │ ├── Generic_WiFiNINA_AQSensor │ │ │ ├── Generic_WiFiNINA_AQSensor.ino │ │ │ └── defines.h │ │ ├── Generic_WiFiNINA_AQSensor_GP2Y1014AU0F │ │ │ ├── Generic_WiFiNINA_AQSensor_GP2Y1014AU0F.ino │ │ │ └── defines.h │ │ ├── SAMD_Ethernet_AQSensor │ │ │ ├── SAMD_Ethernet_AQSensor.ino │ │ │ └── defines.h │ │ ├── SAMD_Ethernet_AQSensor_GP2Y1014AU0F │ │ │ ├── SAMD_Ethernet_AQSensor_GP2Y1014AU0F.ino │ │ │ └── defines.h │ │ ├── SAMD_WiFiNINA_AQSensor │ │ │ ├── SAMD_WiFiNINA_AQSensor.ino │ │ │ └── defines.h │ │ ├── SAMD_WiFiNINA_AQSensor_GP2Y1014AU0F │ │ │ ├── SAMD_WiFiNINA_AQSensor_GP2Y1014AU0F.ino │ │ │ └── defines.h │ │ ├── WIO_Terminal_AQSensor │ │ │ ├── WIO_Terminal_AQSensor.ino │ │ │ └── defines.h │ │ ├── WIO_Terminal_AQSensor_GP2Y1014AU0F │ │ │ ├── WIO_Terminal_AQSensor_GP2Y1014AU0F.ino │ │ │ └── defines.h │ │ ├── nRF52_Ethernet_AQSensor │ │ │ ├── defines.h │ │ │ └── nRF52_Ethernet_AQSensor.ino │ │ ├── nRF52_Ethernet_AQSensor_GP2Y1014AU0F │ │ │ ├── defines.h │ │ │ └── nRF52_Ethernet_AQSensor_GP2Y1014AU0F.ino │ │ ├── nRF52_WiFiNINA_AQSensor │ │ │ ├── defines.h │ │ │ └── nRF52_WiFiNINA_AQSensor.ino │ │ └── nRF52_WiFiNINA_AQSensor_GP2Y1014AU0F │ │ │ ├── defines.h │ │ │ └── nRF52_WiFiNINA_AQSensor_GP2Y1014AU0F.ino │ ├── Blinds │ │ ├── Generic_Ethernet_Blinds │ │ │ ├── Generic_Ethernet_Blinds.ino │ │ │ └── defines.h │ │ ├── Generic_WiFiNINA_Blinds │ │ │ ├── Generic_WiFiNINA_Blinds.ino │ │ │ └── defines.h │ │ ├── RP2040_WiFiNINA_Blinds │ │ │ ├── RP2040_WiFiNINA_Blinds.ino │ │ │ └── defines.h │ │ ├── SAMD_Ethernet_Blinds │ │ │ ├── SAMD_Ethernet_Blinds.ino │ │ │ └── defines.h │ │ ├── SAMD_WiFiNINA_Blinds │ │ │ ├── SAMD_WiFiNINA_Blinds.ino │ │ │ └── defines.h │ │ ├── WIO_Terminal_Blinds │ │ │ ├── WIO_Terminal_Blinds.ino │ │ │ └── defines.h │ │ ├── nRF52_Ethernet_Blinds │ │ │ ├── defines.h │ │ │ └── nRF52_Ethernet_Blinds.ino │ │ └── nRF52_WiFiNINA_Blinds │ │ │ ├── defines.h │ │ │ └── nRF52_WiFiNINA_Blinds.ino │ ├── ContactSensor │ │ ├── Generic_Ethernet_ContactSensor │ │ │ ├── Generic_Ethernet_ContactSensor.ino │ │ │ └── defines.h │ │ ├── Generic_WiFiNINA_ContactSensor │ │ │ ├── Generic_WiFiNINA_ContactSensor.ino │ │ │ └── defines.h │ │ ├── SAMD_Ethernet_ContactSensor │ │ │ ├── SAMD_Ethernet_ContactSensor.ino │ │ │ └── defines.h │ │ ├── SAMD_WiFiNINA_ContactSensor │ │ │ ├── SAMD_WiFiNINA_ContactSensor.ino │ │ │ └── defines.h │ │ ├── WIO_Terminal_ContactSensor │ │ │ ├── WIO_Terminal_ContactSensor.ino │ │ │ └── defines.h │ │ ├── nRF52_Ethernet_ContactSensor │ │ │ ├── defines.h │ │ │ └── nRF52_Ethernet_ContactSensor.ino │ │ └── nRF52_WiFiNINA_ContactSensor │ │ │ ├── defines.h │ │ │ └── nRF52_WiFiNINA_ContactSensor.ino │ ├── DimSwitch │ │ ├── Generic_Ethernet_DimSwitch │ │ │ ├── Generic_Ethernet_DimSwitch.ino │ │ │ └── defines.h │ │ ├── Generic_WiFiNINA_DimSwitch │ │ │ ├── Generic_WiFiNINA_DimSwitch.ino │ │ │ └── defines.h │ │ ├── SAMD_Ethernet_DimSwitch │ │ │ ├── SAMD_Ethernet_DimSwitch.ino │ │ │ └── defines.h │ │ ├── SAMD_WiFiNINA_DimSwitch │ │ │ ├── SAMD_WiFiNINA_DimSwitch.ino │ │ │ └── defines.h │ │ ├── WIO_Terminal_DimSwitch │ │ │ ├── WIO_Terminal_DimSwitch.ino │ │ │ └── defines.h │ │ ├── nRF52_Ethernet_DimSwitch │ │ │ ├── defines.h │ │ │ └── nRF52_Ethernet_DimSwitch.ino │ │ └── nRF52_WiFiNINA_DimSwitch │ │ │ ├── defines.h │ │ │ └── nRF52_WiFiNINA_DimSwitch.ino │ ├── DoorBell │ │ ├── Generic_Ethernet_DoorBell │ │ │ ├── Generic_Ethernet_DoorBell.ino │ │ │ └── defines.h │ │ ├── Generic_WiFiNINA_DoorBell │ │ │ ├── Generic_WiFiNINA_DoorBell.ino │ │ │ └── defines.h │ │ ├── SAMD_Ethernet_DoorBell │ │ │ ├── SAMD_Ethernet_DoorBell.ino │ │ │ └── defines.h │ │ ├── SAMD_WiFiNINA_DoorBell │ │ │ ├── SAMD_WiFiNINA_DoorBell.ino │ │ │ └── defines.h │ │ ├── WIO_Terminal_DoorBell │ │ │ ├── WIO_Terminal_DoorBell.ino │ │ │ └── defines.h │ │ ├── nRF52_Ethernet_DoorBell │ │ │ ├── defines.h │ │ │ └── nRF52_Ethernet_DoorBell.ino │ │ └── nRF52_WiFiNINA_DoorBell │ │ │ ├── defines.h │ │ │ └── nRF52_WiFiNINA_DoorBell.ino │ ├── Fan │ │ ├── Generic_Ethernet_Fan │ │ │ ├── Generic_Ethernet_Fan.ino │ │ │ └── defines.h │ │ ├── Generic_WiFiNINA_Fan │ │ │ ├── Generic_WiFiNINA_Fan.ino │ │ │ └── defines.h │ │ ├── SAMD_Ethernet_Fan │ │ │ ├── SAMD_Ethernet_Fan.ino │ │ │ └── defines.h │ │ ├── SAMD_WiFiNINA_Fan │ │ │ ├── SAMD_WiFiNINA_Fan.ino │ │ │ └── defines.h │ │ ├── WIO_Terminal_Fan │ │ │ ├── WIO_Terminal_Fan.ino │ │ │ └── defines.h │ │ ├── nRF52_Ethernet_Fan │ │ │ ├── defines.h │ │ │ └── nRF52_Ethernet_Fan.ino │ │ └── nRF52_WiFiNINA_Fan │ │ │ ├── defines.h │ │ │ └── nRF52_WiFiNINA_Fan.ino │ ├── GarageDoor │ │ ├── Generic_Ethernet_GarageDoor │ │ │ ├── Generic_Ethernet_GarageDoor.ino │ │ │ └── defines.h │ │ ├── Generic_WiFiNINA_GarageDoor │ │ │ ├── Generic_WiFiNINA_GarageDoor.ino │ │ │ └── defines.h │ │ ├── SAMD_Ethernet_GarageDoor │ │ │ ├── SAMD_Ethernet_GarageDoor.ino │ │ │ └── defines.h │ │ ├── SAMD_WiFiNINA_GarageDoor │ │ │ ├── SAMD_WiFiNINA_GarageDoor.ino │ │ │ └── defines.h │ │ ├── WIO_Terminal_GarageDoor │ │ │ ├── WIO_Terminal_GarageDoor.ino │ │ │ └── defines.h │ │ ├── nRF52_Ethernet_GarageDoor │ │ │ ├── defines.h │ │ │ └── nRF52_Ethernet_GarageDoor.ino │ │ └── nRF52_WiFiNINA_GarageDoor │ │ │ ├── defines.h │ │ │ └── nRF52_WiFiNINA_GarageDoor.ino │ ├── Light │ │ ├── Generic_Ethernet_Light │ │ │ ├── Generic_Ethernet_Light.ino │ │ │ └── defines.h │ │ ├── Generic_WiFiNINA_Light │ │ │ ├── Generic_WiFiNINA_Light.ino │ │ │ └── defines.h │ │ ├── SAMD_Ethernet_Light │ │ │ ├── SAMD_Ethernet_Light.ino │ │ │ └── defines.h │ │ ├── SAMD_WiFiNINA_Light │ │ │ ├── SAMD_WiFiNINA_Light.ino │ │ │ └── defines.h │ │ ├── WIO_Terminal_Light │ │ │ ├── WIO_Terminal_Light.ino │ │ │ └── defines.h │ │ ├── nRF52_Ethernet_Light │ │ │ ├── defines.h │ │ │ └── nRF52_Ethernet_Light.ino │ │ └── nRF52_WiFiNINA_Light │ │ │ ├── defines.h │ │ │ └── nRF52_WiFiNINA_Light.ino │ ├── Lock │ │ ├── Generic_Ethernet_Lock │ │ │ ├── Generic_Ethernet_Lock.ino │ │ │ └── defines.h │ │ ├── Generic_WiFiNINA_Lock │ │ │ ├── Generic_WiFiNINA_Lock.ino │ │ │ └── defines.h │ │ ├── SAMD_Ethernet_Lock │ │ │ ├── SAMD_Ethernet_Lock.ino │ │ │ └── defines.h │ │ ├── SAMD_WiFiNINA_Lock │ │ │ ├── SAMD_WiFiNINA_Lock.ino │ │ │ └── defines.h │ │ ├── WIO_Terminal_Lock │ │ │ ├── WIO_Terminal_Lock.ino │ │ │ └── defines.h │ │ ├── nRF52_Ethernet_Lock │ │ │ ├── defines.h │ │ │ └── nRF52_Ethernet_Lock.ino │ │ └── nRF52_WiFiNINA_Lock │ │ │ ├── defines.h │ │ │ └── nRF52_WiFiNINA_Lock.ino │ ├── MotionSensor │ │ ├── Generic_Ethernet_MotionSensor │ │ │ ├── Generic_Ethernet_MotionSensor.ino │ │ │ └── defines.h │ │ ├── Generic_WiFiNINA_MotionSensor │ │ │ ├── Generic_WiFiNINA_MotionSensor.ino │ │ │ └── defines.h │ │ ├── SAMD_Ethernet_MotionSensor │ │ │ ├── SAMD_Ethernet_MotionSensor.ino │ │ │ └── defines.h │ │ ├── SAMD_WiFiNINA_MotionSensor │ │ │ ├── SAMD_WiFiNINA_MotionSensor.ino │ │ │ └── defines.h │ │ ├── WIO_Terminal_MotionSensor │ │ │ ├── WIO_Terminal_MotionSensor.ino │ │ │ └── defines.h │ │ ├── nRF52_Ethernet_MotionSensor │ │ │ ├── defines.h │ │ │ └── nRF52_Ethernet_MotionSensor.ino │ │ └── nRF52_WiFiNINA_MotionSensor │ │ │ ├── defines.h │ │ │ └── nRF52_WiFiNINA_MotionSensor.ino │ ├── PowerSensor │ │ ├── Generic_Ethernet_PowerSensor │ │ │ ├── Generic_Ethernet_PowerSensor.ino │ │ │ └── defines.h │ │ ├── Generic_WiFiNINA_PowerSensor │ │ │ ├── Generic_WiFiNINA_PowerSensor.ino │ │ │ └── defines.h │ │ ├── SAMD_Ethernet_PowerSensor │ │ │ ├── SAMD_Ethernet_PowerSensor.ino │ │ │ └── defines.h │ │ ├── SAMD_WiFiNINA_PowerSensor │ │ │ ├── SAMD_WiFiNINA_PowerSensor.ino │ │ │ └── defines.h │ │ ├── WIO_Terminal_PowerSensor │ │ │ ├── WIO_Terminal_PowerSensor.ino │ │ │ └── defines.h │ │ ├── nRF52_Ethernet_PowerSensor │ │ │ ├── defines.h │ │ │ └── nRF52_Ethernet_PowerSensor.ino │ │ └── nRF52_WiFiNINA_PowerSensor │ │ │ ├── defines.h │ │ │ └── nRF52_WiFiNINA_PowerSensor.ino │ ├── Speaker │ │ ├── Generic_Ethernet_Speaker │ │ │ ├── Generic_Ethernet_Speaker.ino │ │ │ └── defines.h │ │ ├── Generic_WiFiNINA_Speaker │ │ │ ├── Generic_WiFiNINA_Speaker.ino │ │ │ └── defines.h │ │ ├── SAMD_Ethernet_Speaker │ │ │ ├── SAMD_Ethernet_Speaker.ino │ │ │ └── defines.h │ │ ├── SAMD_WiFiNINA_Speaker │ │ │ ├── SAMD_WiFiNINA_Speaker.ino │ │ │ └── defines.h │ │ ├── WIO_Terminal_Speaker │ │ │ ├── WIO_Terminal_Speaker.ino │ │ │ └── defines.h │ │ ├── nRF52_Ethernet_Speaker │ │ │ ├── defines.h │ │ │ └── nRF52_Ethernet_Speaker.ino │ │ └── nRF52_WiFiNINA_Speaker │ │ │ ├── defines.h │ │ │ └── nRF52_WiFiNINA_Speaker.ino │ ├── Switch │ │ ├── Generic_Ethernet │ │ │ ├── Generic_Ethernet_MultiSwitch_advance │ │ │ │ ├── Generic_Ethernet_MultiSwitch_advance.ino │ │ │ │ └── defines.h │ │ │ ├── Generic_Ethernet_MultiSwitch_beginner │ │ │ │ ├── Generic_Ethernet_MultiSwitch_beginner.ino │ │ │ │ └── defines.h │ │ │ ├── Generic_Ethernet_MultiSwitch_intermediate │ │ │ │ ├── Generic_Ethernet_MultiSwitch_intermediate.ino │ │ │ │ └── defines.h │ │ │ └── Generic_Ethernet_Switch │ │ │ │ ├── Generic_Ethernet_Switch.ino │ │ │ │ └── defines.h │ │ ├── Generic_WiFiNINA │ │ │ ├── Generic_WiFiNINA_MultiSwitch_advance │ │ │ │ ├── Generic_WiFiNINA_MultiSwitch_advance.ino │ │ │ │ └── defines.h │ │ │ ├── Generic_WiFiNINA_MultiSwitch_beginner │ │ │ │ ├── Generic_WiFiNINA_MultiSwitch_beginner.ino │ │ │ │ └── defines.h │ │ │ ├── Generic_WiFiNINA_MultiSwitch_intermediate │ │ │ │ ├── Generic_WiFiNINA_MultiSwitch_intermediate.ino │ │ │ │ └── defines.h │ │ │ └── Generic_WiFiNINA_Switch │ │ │ │ ├── Generic_WiFiNINA_Switch.ino │ │ │ │ └── defines.h │ │ ├── MultiSwitch_advance_tactile-button.png │ │ ├── MutliSwitch_advance_toggle-switch.png │ │ ├── SAMD_Ethernet │ │ │ ├── SAMD_Ethernet_MultiSwitch_advance │ │ │ │ ├── SAMD_Ethernet_MultiSwitch_advance.ino │ │ │ │ └── defines.h │ │ │ ├── SAMD_Ethernet_MultiSwitch_beginner │ │ │ │ ├── SAMD_Ethernet_MultiSwitch_beginner.ino │ │ │ │ └── defines.h │ │ │ ├── SAMD_Ethernet_MultiSwitch_intermediate │ │ │ │ ├── SAMD_Ethernet_MultiSwitch_intermediate.ino │ │ │ │ └── defines.h │ │ │ └── SAMD_Ethernet_Switch │ │ │ │ ├── SAMD_Ethernet_Switch.ino │ │ │ │ └── defines.h │ │ ├── SAMD_WiFiNINA │ │ │ ├── SAMD_WiFiNINA_MultiSwitch_advance │ │ │ │ ├── SAMD_WiFiNINA_MultiSwitch_advance.ino │ │ │ │ └── defines.h │ │ │ ├── SAMD_WiFiNINA_MultiSwitch_beginner │ │ │ │ ├── SAMD_WiFiNINA_MultiSwitch_beginner.ino │ │ │ │ └── defines.h │ │ │ ├── SAMD_WiFiNINA_MultiSwitch_intermediate │ │ │ │ ├── SAMD_WiFiNINA_MultiSwitch_intermediate.ino │ │ │ │ └── defines.h │ │ │ └── SAMD_WiFiNINA_Switch │ │ │ │ ├── SAMD_WiFiNINA_Switch.ino │ │ │ │ └── defines.h │ │ ├── WIO_Terminal │ │ │ ├── WIOT_MultiSwitch_LCD │ │ │ │ ├── WIOT_MultiSwitch_LCD.ino │ │ │ │ ├── WIOT_MultiSwitch_LCD_1.jpg │ │ │ │ ├── WIOT_MultiSwitch_LCD_2.jpg │ │ │ │ └── defines.h │ │ │ ├── WIO_Terminal_MultiSwitch_advance │ │ │ │ ├── WIO_Terminal_MultiSwitch_advance.ino │ │ │ │ └── defines.h │ │ │ ├── WIO_Terminal_MultiSwitch_beginner │ │ │ │ ├── WIO_Terminal_MultiSwitch_beginner.ino │ │ │ │ └── defines.h │ │ │ ├── WIO_Terminal_MultiSwitch_intermediate │ │ │ │ ├── WIO_Terminal_MultiSwitch_intermediate.ino │ │ │ │ └── defines.h │ │ │ └── WIO_Terminal_Switch │ │ │ │ ├── WIO_Terminal_Switch.ino │ │ │ │ └── defines.h │ │ ├── nRF52_Ethernet │ │ │ ├── nRF52_Ethernet_MultiSwitch_advance │ │ │ │ ├── defines.h │ │ │ │ └── nRF52_Ethernet_MultiSwitch_advance.ino │ │ │ ├── nRF52_Ethernet_MultiSwitch_beginner │ │ │ │ ├── defines.h │ │ │ │ └── nRF52_Ethernet_MultiSwitch_beginner.ino │ │ │ ├── nRF52_Ethernet_MultiSwitch_intermediate │ │ │ │ ├── defines.h │ │ │ │ └── nRF52_Ethernet_MultiSwitch_intermediate.ino │ │ │ └── nRF52_Ethernet_Switch │ │ │ │ ├── defines.h │ │ │ │ └── nRF52_Ethernet_Switch.ino │ │ └── nRF52_WiFiNINA │ │ │ ├── nRF52_WiFiNINA_MultiSwitch_advance │ │ │ ├── defines.h │ │ │ └── nRF52_WiFiNINA_MultiSwitch_advance.ino │ │ │ ├── nRF52_WiFiNINA_MultiSwitch_beginner │ │ │ ├── defines.h │ │ │ └── nRF52_WiFiNINA_MultiSwitch_beginner.ino │ │ │ ├── nRF52_WiFiNINA_MultiSwitch_intermediate │ │ │ ├── defines.h │ │ │ └── nRF52_WiFiNINA_MultiSwitch_intermediate.ino │ │ │ └── nRF52_WiFiNINA_Switch │ │ │ ├── defines.h │ │ │ └── nRF52_WiFiNINA_Switch.ino │ ├── TV │ │ ├── Generic_Ethernet_TV │ │ │ ├── Generic_Ethernet_TV.ino │ │ │ └── defines.h │ │ ├── Generic_WiFiNINA_TV │ │ │ ├── Generic_WiFiNINA_TV.ino │ │ │ └── defines.h │ │ ├── SAMD_Ethernet_TV │ │ │ ├── SAMD_Ethernet_TV.ino │ │ │ └── defines.h │ │ ├── SAMD_WiFiNINA_TV │ │ │ ├── SAMD_WiFiNINA_TV.ino │ │ │ └── defines.h │ │ ├── WIO_Terminal_TV │ │ │ ├── WIO_Terminal_TV.ino │ │ │ └── defines.h │ │ ├── nRF52_Ethernet_TV │ │ │ ├── defines.h │ │ │ └── nRF52_Ethernet_TV.ino │ │ └── nRF52_WiFiNINA_TV │ │ │ ├── defines.h │ │ │ └── nRF52_WiFiNINA_TV.ino │ ├── TemperatureSensor │ │ ├── DHT22_Wiring.png │ │ ├── Generic_Ethernet_TemperatureSensor │ │ │ ├── Generic_Ethernet_TemperatureSensor.ino │ │ │ └── defines.h │ │ ├── Generic_WiFiNINA_TemperatureSensor │ │ │ ├── Generic_WiFiNINA_TemperatureSensor.ino │ │ │ └── defines.h │ │ ├── README.md │ │ ├── SAMD_Ethernet_TemperatureSensor │ │ │ ├── SAMD_Ethernet_TemperatureSensor.ino │ │ │ └── defines.h │ │ ├── SAMD_WiFiNINA_TemperatureSensor │ │ │ ├── SAMD_WiFiNINA_TemperatureSensor.ino │ │ │ └── defines.h │ │ ├── WIO_Terminal_TemperatureSensor │ │ │ ├── WIO_Terminal_TemperatureSensor.ino │ │ │ └── defines.h │ │ ├── nRF52_Ethernet_TemperatureSensor │ │ │ ├── defines.h │ │ │ └── nRF52_Ethernet_TemperatureSensor.ino │ │ └── nRF52_WiFiNINA_TemperatureSensor │ │ │ ├── defines.h │ │ │ └── nRF52_WiFiNINA_TemperatureSensor.ino │ └── Thermostat │ │ ├── Generic_Ethernet_Thermostat │ │ ├── Generic_Ethernet_Thermostat.ino │ │ └── defines.h │ │ ├── Generic_WiFiNINA_Thermostat │ │ ├── Generic_WiFiNINA_Thermostat.ino │ │ └── defines.h │ │ ├── SAMD_Ethernet_Thermostat │ │ ├── SAMD_Ethernet_Thermostat.ino │ │ └── defines.h │ │ ├── SAMD_WiFiNINA_Thermostat │ │ ├── SAMD_WiFiNINA_Thermostat.ino │ │ └── defines.h │ │ ├── WIO_Terminal_Thermostat │ │ ├── WIO_Terminal_Thermostat.ino │ │ └── defines.h │ │ ├── nRF52_Ethernet_Thermostat │ │ ├── defines.h │ │ └── nRF52_Ethernet_Thermostat.ino │ │ └── nRF52_WiFiNINA_Thermostat │ │ ├── defines.h │ │ └── nRF52_WiFiNINA_Thermostat.ino └── WT32_ETH01 │ ├── Blinds │ └── Blinds.ino │ ├── GarageDoor │ └── GarageDoor.ino │ ├── Light │ ├── Light │ │ └── Light.ino │ ├── Light_FastLED_WS2812 │ │ └── Light_FastLED_WS2812.ino │ └── RGB_LED_Stripe_5050 │ │ ├── RGB_LED_Stripe_5050.ino │ │ └── RGB_LED_Stripe_5050.png │ ├── Lock │ ├── Lock │ │ └── Lock.ino │ └── Lock_with_feedback │ │ └── Lock_with_feedback.ino │ ├── MotionSensor │ └── MotionSensor.ino │ ├── PowerSensor │ └── PowerSensor.ino │ ├── Speaker │ └── Speaker.ino │ ├── Switch │ └── Switch │ │ └── Switch.ino │ ├── TV │ └── TV.ino │ ├── Thermostat │ └── Thermostat.ino │ ├── platformio │ └── platformio.ini │ └── temperaturesensor │ ├── DHT22_Wiring.png │ ├── README.md │ └── temperaturesensor.ino ├── library.json ├── library.properties ├── pics └── ICSP_connector.jpg ├── platformio └── platformio.ini ├── src ├── LeakyBucket.h ├── SinricPro.h ├── SinricProAirQualitySensor.h ├── SinricProBlinds.h ├── SinricProCamera.h ├── SinricProConfig.h ├── SinricProContactsensor.h ├── SinricProDebug.h ├── SinricProDevice.h ├── SinricProDeviceInterface.h ├── SinricProDimSwitch.h ├── SinricProDoorbell.h ├── SinricProFan.h ├── SinricProFanUS.h ├── SinricProGarageDoor.h ├── SinricProId.h ├── SinricProInterface.h ├── SinricProLight.h ├── SinricProLock.h ├── SinricProMessageid.h ├── SinricProMotionsensor.h ├── SinricProPowerSensor.h ├── SinricProQueue.h ├── SinricProSignature.h ├── SinricProSpeaker.h ├── SinricProSwitch.h ├── SinricProTV.h ├── SinricProTemperaturesensor.h ├── SinricProThermostat.h ├── SinricProUDP.h ├── SinricProWebsocket.h ├── SinricProWindowAC.h ├── SinricPro_Generic.h └── extralib │ └── Crypto │ ├── AES.cpp │ ├── AES.h │ ├── AESLib.cpp │ ├── AESLib.h │ ├── AES_config.h │ ├── Base64.cpp │ ├── Base64.h │ ├── Crypto.cpp │ └── Crypto.h └── utils ├── astyle_library.conf └── restyle.sh /.codespellrc: -------------------------------------------------------------------------------- 1 | # See: https://github.com/codespell-project/codespell#using-a-config-file 2 | [codespell] 3 | # In the event of a false positive, add the problematic word, in all lowercase, to a comma-separated list here: 4 | ignore-words-list = , 5 | check-filenames = 6 | check-hidden = 7 | skip = ./.git,./src,./examples,./Packages_Patches,./LibraryPatches 8 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | ### Describe the bug 11 | 12 | A clear and concise description of what the bug is. 13 | 14 | ### Steps to Reproduce 15 | 16 | Steps to reproduce the behavior. Including the [MRE](https://stackoverflow.com/help/minimal-reproducible-example) sketches 17 | 18 | ### Expected behavior 19 | 20 | A clear and concise description of what you expected to happen. 21 | 22 | ### Actual behavior 23 | 24 | A clear and concise description of what you expected to happen. 25 | 26 | ### Debug and AT-command log (if applicable) 27 | 28 | A clear and concise description of what you expected to happen. 29 | 30 | ### Screenshots 31 | 32 | If applicable, add screenshots to help explain your problem. 33 | 34 | ### Information 35 | 36 | Please ensure to specify the following: 37 | 38 | * Arduino IDE version (e.g. 1.8.19) or Platform.io version 39 | * Board Core Version (e.g. Arduino SAMDUE core v1.6.12, ESP32 core v2.0.5, ESP8266 core v3.0.2, ArduinoCore-mbed v3.4.1, etc.) 40 | * Contextual information (e.g. what you were trying to achieve) 41 | * Simplest possible steps to reproduce 42 | * Anything that might be relevant in your opinion, such as: 43 | * Operating system (Windows, Ubuntu, etc.) and the output of `uname -a` 44 | * Network configuration 45 | 46 | 47 | ### Example 48 | 49 | ``` 50 | Arduino IDE version: 1.8.19 51 | RASPBERRY_PI_PICO board 52 | ArduinoCore-mbed v3.4.1 53 | OS: Ubuntu 20.04 LTS 54 | Linux xy-Inspiron-3593 5.15.0-53-generic #59~20.04.1-Ubuntu SMP Thu Oct 20 15:10:22 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux 55 | 56 | Context: 57 | I encountered a crash while using this library 58 | 59 | Steps to reproduce: 60 | 1. ... 61 | 2. ... 62 | 3. ... 63 | 4. ... 64 | ``` 65 | 66 | --- 67 | 68 | ### Sending Feature Requests 69 | 70 | Feel free to post feature requests. It's helpful if you can explain exactly why the feature would be useful. 71 | 72 | There are usually some outstanding feature requests in the [existing issues list](https://github.com/khoih-prog/SinricPro_Generic/issues?q=is%3Aopen+is%3Aissue+label%3Aenhancement), feel free to add comments to them. 73 | 74 | --- 75 | 76 | ### Sending Pull Requests 77 | 78 | Pull Requests with changes and fixes are also welcome! 79 | 80 | Please use the `astyle` to reformat the updated library code as follows (demo for Ubuntu Linux) 81 | 82 | 1. Change directory to the library GitHub 83 | 84 | ``` 85 | xy@xy-Inspiron-3593:~$ cd Arduino/xy/SinricPro_Generic_GitHub/ 86 | xy@xy-Inspiron-3593:~/Arduino/xy/SinricPro_Generic_GitHub$ 87 | ``` 88 | 89 | 2. Issue astyle command 90 | 91 | ``` 92 | xy@xy-Inspiron-3593:~/Arduino/xy/SinricPro_Generic_GitHub$ bash utils/restyle.sh 93 | ``` 94 | 95 | 96 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # See: https://docs.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates#about-the-dependabotyml-file 2 | version: 2 3 | 4 | updates: 5 | # Configure check for outdated GitHub Actions actions in workflows. 6 | # See: https://docs.github.com/en/github/administering-a-repository/keeping-your-actions-up-to-date-with-dependabot 7 | - package-ecosystem: github-actions 8 | directory: / # Check the repository's workflows under /.github/workflows/ 9 | schedule: 10 | interval: daily 11 | -------------------------------------------------------------------------------- /.github/stale.yml: -------------------------------------------------------------------------------- 1 | # Configuration for probot-stale - https://github.com/probot/stale 2 | 3 | daysUntilStale: 60 4 | daysUntilClose: 14 5 | limitPerRun: 30 6 | staleLabel: stale 7 | exemptLabels: 8 | - pinned 9 | - security 10 | - "to be implemented" 11 | - "for reference" 12 | - "move to PR" 13 | - "enhancement" 14 | 15 | only: issues 16 | onlyLabels: [] 17 | exemptProjects: false 18 | exemptMilestones: false 19 | exemptAssignees: false 20 | 21 | markComment: > 22 | [STALE_SET] This issue has been automatically marked as stale because it has not had 23 | recent activity. It will be closed in 14 days if no further activity occurs. Thank you 24 | for your contributions. 25 | 26 | unmarkComment: > 27 | [STALE_CLR] This issue has been removed from the stale queue. Please ensure activity to keep it opening the future. 28 | 29 | closeComment: > 30 | [STALE_DEL] This stale issue has been automatically closed. Thank you for your contributions. 31 | 32 | -------------------------------------------------------------------------------- /.github/workflows/auto-github-actions.yml: -------------------------------------------------------------------------------- 1 | name: auto-github-actions 2 | on: [push] 3 | jobs: 4 | check-bats-version: 5 | runs-on: ubuntu-latest 6 | steps: 7 | - uses: actions/checkout@v3 8 | - uses: actions/setup-node@v3 9 | with: 10 | node-version: '14' 11 | - run: npm install -g bats 12 | - run: bats -v 13 | -------------------------------------------------------------------------------- /.github/workflows/check-arduino.yml: -------------------------------------------------------------------------------- 1 | name: Check Arduino 2 | 3 | # See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows 4 | on: 5 | push: 6 | pull_request: 7 | schedule: 8 | # Run every Tuesday at 8 AM UTC to catch breakage caused by new rules added to Arduino Lint. 9 | - cron: "0 8 * * TUE" 10 | workflow_dispatch: 11 | repository_dispatch: 12 | 13 | jobs: 14 | lint: 15 | runs-on: ubuntu-latest 16 | 17 | steps: 18 | - name: Checkout repository 19 | uses: actions/checkout@v3 20 | 21 | - name: Arduino Lint 22 | uses: arduino/arduino-lint-action@v1 23 | with: 24 | compliance: specification 25 | library-manager: update 26 | # Always use this setting for official repositories. Remove for 3rd party projects. 27 | official: true 28 | project-type: library 29 | -------------------------------------------------------------------------------- /.github/workflows/report-size-deltas.yml: -------------------------------------------------------------------------------- 1 | name: Report Size Deltas 2 | 3 | on: 4 | schedule: 5 | - cron: '*/5 * * * *' 6 | 7 | jobs: 8 | report: 9 | runs-on: ubuntu-latest 10 | 11 | steps: 12 | - name: Comment size deltas reports to PRs 13 | uses: arduino/report-size-deltas@v1 14 | with: 15 | # The name of the workflow artifact created by the "Compile Examples" workflow 16 | sketches-reports-source: sketches-reports 17 | -------------------------------------------------------------------------------- /.github/workflows/spell-check.yml: -------------------------------------------------------------------------------- 1 | name: Spell Check 2 | 3 | on: 4 | pull_request: 5 | push: 6 | schedule: 7 | # run every Tuesday at 3 AM UTC 8 | - cron: "0 3 * * 2" 9 | workflow_dispatch: 10 | repository_dispatch: 11 | 12 | jobs: 13 | spellcheck: 14 | runs-on: ubuntu-latest 15 | 16 | steps: 17 | - name: Checkout 18 | uses: actions/checkout@v3 19 | 20 | # See: https://github.com/codespell-project/actions-codespell/blob/master/README.md 21 | - name: Spell check 22 | uses: codespell-project/actions-codespell@master 23 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ## Contributing to SinricPro_Generic 2 | 3 | ### Reporting Bugs 4 | 5 | Please report bugs in SinricPro_Generic if you find them. 6 | 7 | However, before reporting a bug please check through the following: 8 | 9 | * [Existing Open Issues](https://github.com/khoih-prog/SinricPro_Generic/issues) - someone might have already encountered this. 10 | 11 | If you don't find anything, please [open a new issue](https://github.com/khoih-prog/SinricPro_Generic/issues/new). 12 | 13 | ### How to submit a bug report 14 | 15 | Please ensure to specify the following: 16 | 17 | * Arduino IDE version (e.g. 1.8.19) or Platform.io version 18 | * Board Core Version (e.g. Arduino SAMDUE core v1.6.12, ESP32 core v2.0.5, ESP8266 core v3.0.2, ArduinoCore-mbed v3.4.1, etc.) 19 | * Contextual information (e.g. what you were trying to achieve) 20 | * Simplest possible steps to reproduce 21 | * Anything that might be relevant in your opinion, such as: 22 | * Operating system (Windows, Ubuntu, etc.) and the output of `uname -a` 23 | * Network configuration 24 | 25 | 26 | ### Example 27 | 28 | ``` 29 | Arduino IDE version: 1.8.19 30 | RASPBERRY_PI_PICO board 31 | ArduinoCore-mbed v3.4.1 32 | OS: Ubuntu 20.04 LTS 33 | Linux xy-Inspiron-3593 5.15.0-53-generic #59~20.04.1-Ubuntu SMP Thu Oct 20 15:10:22 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux 34 | 35 | Context: 36 | I encountered a crash while using this library 37 | 38 | Steps to reproduce: 39 | 1. ... 40 | 2. ... 41 | 3. ... 42 | 4. ... 43 | ``` 44 | 45 | --- 46 | 47 | ### Sending Feature Requests 48 | 49 | Feel free to post feature requests. It's helpful if you can explain exactly why the feature would be useful. 50 | 51 | There are usually some outstanding feature requests in the [existing issues list](https://github.com/khoih-prog/SinricPro_Generic/issues?q=is%3Aopen+is%3Aissue+label%3Aenhancement), feel free to add comments to them. 52 | 53 | --- 54 | 55 | ### Sending Pull Requests 56 | 57 | Pull Requests with changes and fixes are also welcome! 58 | 59 | Please use the `astyle` to reformat the updated library code as follows (demo for Ubuntu Linux) 60 | 61 | 1. Change directory to the library GitHub 62 | 63 | ``` 64 | xy@xy-Inspiron-3593:~$ cd Arduino/xy/SinricPro_Generic_GitHub/ 65 | xy@xy-Inspiron-3593:~/Arduino/xy/SinricPro_Generic_GitHub$ 66 | ``` 67 | 68 | 2. Issue astyle command 69 | 70 | ``` 71 | xy@xy-Inspiron-3593:~/Arduino/xy/SinricPro_Generic_GitHub$ bash utils/restyle.sh 72 | ``` 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /LibraryPatches/esp32/cores/esp32/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 | { 27 | public: 28 | // KH, change to fix compiler error for EthernetWebServer 29 | // error: cannot declare field 'EthernetWebServer::_server' to be of abstract type 'EthernetServer' 30 | // virtual void begin(uint16_t port=0) =0; 31 | //virtual void begin() = 0; 32 | void begin() {}; 33 | }; 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /Packages_Patches/Seeeduino/hardware/rp2040/1.9.3/variants/rpipico/pins_arduino.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Pin definitions taken from: 4 | // https://datasheets.raspberrypi.org/pico/pico-datasheet.pdf 5 | 6 | //KH 7 | // Pin count 8 | // ---- 9 | #define PINS_COUNT (30u) 10 | #define NUM_DIGITAL_PINS (30u) 11 | #define NUM_ANALOG_INPUTS (4u) 12 | #define NUM_ANALOG_OUTPUTS (0u) 13 | ////// 14 | 15 | // LEDs 16 | #define PIN_LED (25u) 17 | #define PIN_LED_0 (16u) 18 | #define PIN_LED_1 (17u) 19 | #define PIN_LED_2 (18u) 20 | // Serial 21 | #define PIN_SERIAL1_TX (0u) 22 | #define PIN_SERIAL1_RX (1u) 23 | 24 | #define PIN_SERIAL2_TX (31u) 25 | #define PIN_SERIAL2_RX (31u) 26 | 27 | 28 | // SPI 29 | #define PIN_SPI0_MISO (4u) 30 | #define PIN_SPI0_MOSI (3u) 31 | #define PIN_SPI0_SCK (2u) 32 | #define PIN_SPI0_SS (5u) 33 | 34 | // static const int SS = PIN_SPI0_SS; // SPI Slave SS not used. Set here only for reference. 35 | // static const int MOSI = PIN_SPI0_MOSI; 36 | // static const int MISO = PIN_SPI0_MISO; 37 | // static const int SCK = PIN_SPI0_SCK; 38 | 39 | #define PIN_SPI1_MISO (12u) 40 | #define PIN_SPI1_MOSI (31u) 41 | #define PIN_SPI1_SCK (31u) 42 | #define PIN_SPI1_SS (31u) 43 | // static const int MISO_1 = PIN_SPI1_MISO; 44 | 45 | #define PIN_A0 (26u) 46 | #define PIN_A1 (27u) 47 | #define PIN_A2 (28u) 48 | #define PIN_A3 (29u) 49 | 50 | static const int A0 = PIN_A0; 51 | static const int A1 = PIN_A1; 52 | static const int A2 = PIN_A2; 53 | static const int A3 = PIN_A3; 54 | 55 | // D0 - D10 56 | #define D26 (26u) 57 | #define D1 (27u) 58 | #define D2 (28u) 59 | #define D3 (29u) 60 | #define D4 (6u) 61 | #define D5 (7u) 62 | #define D0 (0u) 63 | #define D7 (1u) 64 | #define D8 (2u) 65 | #define D9 (4u) 66 | #define D10 (3u) 67 | 68 | // static const int 0 = D0; 69 | 70 | // Wire 71 | #define PIN_WIRE0_SDA (6u) 72 | #define PIN_WIRE0_SCL (7u) 73 | 74 | #define PIN_WIRE1_SDA (26u) 75 | #define PIN_WIRE1_SCL (27u) 76 | 77 | // #define SERIAL_HOWMANY (3u) 78 | // #define SPI_HOWMANY (2u) 79 | // #define WIRE_HOWMANY (2u) 80 | 81 | // #include "../generic/common.h" 82 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.19.0/variants/NINA_B112_ublox/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | This library is free software; you can redistribute it and/or 4 | modify it under the terms of the GNU Lesser General Public 5 | License as published by the Free Software Foundation; either 6 | version 2.1 of the License, or (at your option) any later version. 7 | This library is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 | See the GNU Lesser General Public License for more details. 11 | You should have received a copy of the GNU Lesser General Public 12 | License along with this library; if not, write to the Free Software 13 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 14 | */ 15 | 16 | // API compatibility 17 | #include "variant.h" 18 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.19.0/variants/NINA_B112_ublox/variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2016 Sandeep Mistry All right reserved. 4 | Copyright (c) 2018, Adafruit Industries (adafruit.com) 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. 14 | See the GNU 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 "variant.h" 22 | 23 | #include "wiring_constants.h" 24 | #include "wiring_digital.h" 25 | #include "nrf.h" 26 | 27 | //https://www.u-blox.com/sites/default/files/NINA-B1_DataSheet_UBX-15019243.pdf 28 | //https://www.u-blox.com/sites/default/files/EVK-NINA-B1_UserGuide_%28UBX-15028120%29_C1-Public.pdf 29 | 30 | const uint32_t g_ADigitalPinMap[] = { 31 | // D0 .. D13 32 | 5, // D0 is P0.05 (UART RX) 33 | 6, // D1 is P0.06 (UART TX) 34 | 7, // D2 is P0.07 35 | 31, // D3 is P0.31 36 | 18, // D4 is P0.18 (LED Blue) 37 | 99, // D5 (NC) 38 | 9, // D6 is P0.09 NFC1 39 | 10, // D7 is P0.10 (Button) NFC2 40 | 99, // D8 (NC) 41 | 8, // D9 is P0.08 42 | 11, // D10 is P0.11 CS 43 | 13, // D11 is P0.13 MOSI 44 | 12, // D12 is P0.12 MISO 45 | 14, // D13 is P0.14 SCK 46 | //I2C 47 | 2, // D14 is P0.2 (SDA) 48 | 3, // D15 is P0.3 (SCL) 49 | // D16 .. D21 (aka A0 .. A5) 50 | 3, // D16 is P0.03 (A0) 51 | 2, // D17 is P0.02 (A1) 52 | 4, // D18 is P0.04 (A2) 53 | 30, // D19 is P0.30 (A3) SW2 54 | 29, // D20 is P0.29 (A4) 55 | 28, // D21 is P0.28 (A5) 56 | 9, // P0.09 NFC 57 | 10, // P0.10 NFC 58 | 16, // SW1 (LED Green) 59 | }; -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.19.0/variants/NINA_B302_ublox/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | This library is free software; you can redistribute it and/or 4 | modify it under the terms of the GNU Lesser General Public 5 | License as published by the Free Software Foundation; either 6 | version 2.1 of the License, or (at your option) any later version. 7 | This library is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 | See the GNU Lesser General Public License for more details. 11 | You should have received a copy of the GNU Lesser General Public 12 | License along with this library; if not, write to the Free Software 13 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 14 | */ 15 | 16 | // API compatibility 17 | #include "variant.h" 18 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.19.0/variants/NINA_B302_ublox/variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2016 Sandeep Mistry All right reserved. 4 | Copyright (c) 2018, Adafruit Industries (adafruit.com) 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. 14 | See the GNU 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 | // Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip). 21 | // See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1) 22 | 23 | #include "variant.h" 24 | #include "wiring_constants.h" 25 | #include "wiring_digital.h" 26 | #include "nrf.h" 27 | 28 | const uint32_t g_ADigitalPinMap[] = 29 | { 30 | // D0 .. D13 31 | 29, // D0 is P0.29 (UART RX) 32 | 45, // D1 is P1.13 (UART TX) 33 | 44, // D2 is P1.12 (NFC2) 34 | 31, // D3 is P0.31 (LED1) 35 | 13, // D4 is P0.13 (LED2) 36 | 11, // D5 is P0.11 37 | 9, // D6 is P0.09 38 | 10, // D7 is P0.10 (Button) 39 | 41, // D8 is P1.09 40 | 12, // D9 is P0.12 41 | 14, // D10 is P0.14 42 | 15, // D11 is P0.15 43 | 32, // D12 is P1.00 44 | 7, // D13 is P0.07 45 | 46 | // D14 .. D21 (aka A0 .. A5) 47 | 4, // D14 is P0.04 (A0) 48 | 30, // D15 is P0.30 (A1) 49 | 5, // D16 is P0.05 (A2) 50 | 2, // D17 is P0.02 (A3) 51 | 28, // D18 is P0.28 (A4) 52 | 3, // D19 is P0.03 (A5) 53 | 54 | // D20 .. D21 (aka I2C pins) 55 | 16, // D20 is P0.16 (SDA) 56 | 24, // D21 is P0.24 (SCL) 57 | 58 | // QSPI pins (not exposed via any header / test point) 59 | 19, // D22 is P0.19 (QSPI CLK) 60 | 17, // D23 is P0.17 (QSPI CS) 61 | 20, // D24 is P0.20 (QSPI Data 0) 62 | 21, // D25 is P0.21 (QSPI Data 1) 63 | 22, // D26 is P0.22 (QSPI Data 2) 64 | 26, // D27 is P0.23 (QSPI Data 3) 65 | 66 | 40, // D28 is P1.08 - IO34 67 | 41, // D29 is P1.01 - IO35 68 | 44, // D30 is P1.02 - IO36 69 | 45, // D31 is P1.03 - IO37 70 | 42, // D32 is P1.10 - IO38 71 | 43, // D33 is P1.11 - IO39 72 | 47, // D34 is P1.15 - IO40 73 | 46, // D35 is P1.14 - IO41 74 | 26, // D36 is P0.26 - IO42 75 | 6, // D37 is P0.6 - IO43 76 | 27, // D38 is P0.27 - IO44 77 | }; 78 | 79 | void initVariant() 80 | { 81 | // LED1 & LED2 82 | pinMode(PIN_LED1, OUTPUT); 83 | ledOff(PIN_LED1); 84 | 85 | pinMode(PIN_LED2, OUTPUT); 86 | ledOff(PIN_LED2); 87 | } 88 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.20.1/variants/NINA_B112_ublox/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | This library is free software; you can redistribute it and/or 4 | modify it under the terms of the GNU Lesser General Public 5 | License as published by the Free Software Foundation; either 6 | version 2.1 of the License, or (at your option) any later version. 7 | This library is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 | See the GNU Lesser General Public License for more details. 11 | You should have received a copy of the GNU Lesser General Public 12 | License along with this library; if not, write to the Free Software 13 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 14 | */ 15 | 16 | // API compatibility 17 | #include "variant.h" 18 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.20.1/variants/NINA_B112_ublox/variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2016 Sandeep Mistry All right reserved. 4 | Copyright (c) 2018, Adafruit Industries (adafruit.com) 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. 14 | See the GNU 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 "variant.h" 22 | 23 | #include "wiring_constants.h" 24 | #include "wiring_digital.h" 25 | #include "nrf.h" 26 | 27 | //https://www.u-blox.com/sites/default/files/NINA-B1_DataSheet_UBX-15019243.pdf 28 | //https://www.u-blox.com/sites/default/files/EVK-NINA-B1_UserGuide_%28UBX-15028120%29_C1-Public.pdf 29 | 30 | const uint32_t g_ADigitalPinMap[] = { 31 | // D0 .. D13 32 | 5, // D0 is P0.05 (UART RX) 33 | 6, // D1 is P0.06 (UART TX) 34 | 7, // D2 is P0.07 35 | 31, // D3 is P0.31 36 | 18, // D4 is P0.18 (LED Blue) 37 | 99, // D5 (NC) 38 | 9, // D6 is P0.09 NFC1 39 | 10, // D7 is P0.10 (Button) NFC2 40 | 99, // D8 (NC) 41 | 8, // D9 is P0.08 42 | 11, // D10 is P0.11 CS 43 | 13, // D11 is P0.13 MOSI 44 | 12, // D12 is P0.12 MISO 45 | 14, // D13 is P0.14 SCK 46 | //I2C 47 | 2, // D14 is P0.2 (SDA) 48 | 3, // D15 is P0.3 (SCL) 49 | // D16 .. D21 (aka A0 .. A5) 50 | 3, // D16 is P0.03 (A0) 51 | 2, // D17 is P0.02 (A1) 52 | 4, // D18 is P0.04 (A2) 53 | 30, // D19 is P0.30 (A3) SW2 54 | 29, // D20 is P0.29 (A4) 55 | 28, // D21 is P0.28 (A5) 56 | 9, // P0.09 NFC 57 | 10, // P0.10 NFC 58 | 16, // SW1 (LED Green) 59 | }; -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.20.1/variants/NINA_B302_ublox/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | This library is free software; you can redistribute it and/or 4 | modify it under the terms of the GNU Lesser General Public 5 | License as published by the Free Software Foundation; either 6 | version 2.1 of the License, or (at your option) any later version. 7 | This library is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 | See the GNU Lesser General Public License for more details. 11 | You should have received a copy of the GNU Lesser General Public 12 | License along with this library; if not, write to the Free Software 13 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 14 | */ 15 | 16 | // API compatibility 17 | #include "variant.h" 18 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.20.1/variants/NINA_B302_ublox/variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2016 Sandeep Mistry All right reserved. 4 | Copyright (c) 2018, Adafruit Industries (adafruit.com) 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. 14 | See the GNU 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 | // Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip). 21 | // See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1) 22 | 23 | #include "variant.h" 24 | #include "wiring_constants.h" 25 | #include "wiring_digital.h" 26 | #include "nrf.h" 27 | 28 | const uint32_t g_ADigitalPinMap[] = 29 | { 30 | // D0 .. D13 31 | 29, // D0 is P0.29 (UART RX) 32 | 45, // D1 is P1.13 (UART TX) 33 | 44, // D2 is P1.12 (NFC2) 34 | 31, // D3 is P0.31 (LED1) 35 | 13, // D4 is P0.13 (LED2) 36 | 11, // D5 is P0.11 37 | 9, // D6 is P0.09 38 | 10, // D7 is P0.10 (Button) 39 | 41, // D8 is P1.09 40 | 12, // D9 is P0.12 41 | 14, // D10 is P0.14 42 | 15, // D11 is P0.15 43 | 32, // D12 is P1.00 44 | 7, // D13 is P0.07 45 | 46 | // D14 .. D21 (aka A0 .. A5) 47 | 4, // D14 is P0.04 (A0) 48 | 30, // D15 is P0.30 (A1) 49 | 5, // D16 is P0.05 (A2) 50 | 2, // D17 is P0.02 (A3) 51 | 28, // D18 is P0.28 (A4) 52 | 3, // D19 is P0.03 (A5) 53 | 54 | // D20 .. D21 (aka I2C pins) 55 | 16, // D20 is P0.16 (SDA) 56 | 24, // D21 is P0.24 (SCL) 57 | 58 | // QSPI pins (not exposed via any header / test point) 59 | 19, // D22 is P0.19 (QSPI CLK) 60 | 17, // D23 is P0.17 (QSPI CS) 61 | 20, // D24 is P0.20 (QSPI Data 0) 62 | 21, // D25 is P0.21 (QSPI Data 1) 63 | 22, // D26 is P0.22 (QSPI Data 2) 64 | 26, // D27 is P0.23 (QSPI Data 3) 65 | 66 | 40, // D28 is P1.08 - IO34 67 | 41, // D29 is P1.01 - IO35 68 | 44, // D30 is P1.02 - IO36 69 | 45, // D31 is P1.03 - IO37 70 | 42, // D32 is P1.10 - IO38 71 | 43, // D33 is P1.11 - IO39 72 | 47, // D34 is P1.15 - IO40 73 | 46, // D35 is P1.14 - IO41 74 | 26, // D36 is P0.26 - IO42 75 | 6, // D37 is P0.6 - IO43 76 | 27, // D38 is P0.27 - IO44 77 | }; 78 | 79 | void initVariant() 80 | { 81 | // LED1 & LED2 82 | pinMode(PIN_LED1, OUTPUT); 83 | ledOff(PIN_LED1); 84 | 85 | pinMode(PIN_LED2, OUTPUT); 86 | ledOff(PIN_LED2); 87 | } 88 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.20.5/variants/NINA_B112_ublox/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | This library is free software; you can redistribute it and/or 4 | modify it under the terms of the GNU Lesser General Public 5 | License as published by the Free Software Foundation; either 6 | version 2.1 of the License, or (at your option) any later version. 7 | This library is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 | See the GNU Lesser General Public License for more details. 11 | You should have received a copy of the GNU Lesser General Public 12 | License along with this library; if not, write to the Free Software 13 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 14 | */ 15 | 16 | // API compatibility 17 | #include "variant.h" 18 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.20.5/variants/NINA_B112_ublox/variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2016 Sandeep Mistry All right reserved. 4 | Copyright (c) 2018, Adafruit Industries (adafruit.com) 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. 14 | See the GNU 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 "variant.h" 22 | 23 | #include "wiring_constants.h" 24 | #include "wiring_digital.h" 25 | #include "nrf.h" 26 | 27 | //https://www.u-blox.com/sites/default/files/NINA-B1_DataSheet_UBX-15019243.pdf 28 | //https://www.u-blox.com/sites/default/files/EVK-NINA-B1_UserGuide_%28UBX-15028120%29_C1-Public.pdf 29 | 30 | const uint32_t g_ADigitalPinMap[] = { 31 | // D0 .. D13 32 | 5, // D0 is P0.05 (UART RX) 33 | 6, // D1 is P0.06 (UART TX) 34 | 7, // D2 is P0.07 35 | 31, // D3 is P0.31 36 | 18, // D4 is P0.18 (LED Blue) 37 | 99, // D5 (NC) 38 | 9, // D6 is P0.09 NFC1 39 | 10, // D7 is P0.10 (Button) NFC2 40 | 99, // D8 (NC) 41 | 8, // D9 is P0.08 42 | 11, // D10 is P0.11 CS 43 | 13, // D11 is P0.13 MOSI 44 | 12, // D12 is P0.12 MISO 45 | 14, // D13 is P0.14 SCK 46 | //I2C 47 | 2, // D14 is P0.2 (SDA) 48 | 3, // D15 is P0.3 (SCL) 49 | // D16 .. D21 (aka A0 .. A5) 50 | 3, // D16 is P0.03 (A0) 51 | 2, // D17 is P0.02 (A1) 52 | 4, // D18 is P0.04 (A2) 53 | 30, // D19 is P0.30 (A3) SW2 54 | 29, // D20 is P0.29 (A4) 55 | 28, // D21 is P0.28 (A5) 56 | 9, // P0.09 NFC 57 | 10, // P0.10 NFC 58 | 16, // SW1 (LED Green) 59 | }; -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.20.5/variants/NINA_B302_ublox/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | This library is free software; you can redistribute it and/or 4 | modify it under the terms of the GNU Lesser General Public 5 | License as published by the Free Software Foundation; either 6 | version 2.1 of the License, or (at your option) any later version. 7 | This library is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 | See the GNU Lesser General Public License for more details. 11 | You should have received a copy of the GNU Lesser General Public 12 | License along with this library; if not, write to the Free Software 13 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 14 | */ 15 | 16 | // API compatibility 17 | #include "variant.h" 18 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.20.5/variants/NINA_B302_ublox/variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2016 Sandeep Mistry All right reserved. 4 | Copyright (c) 2018, Adafruit Industries (adafruit.com) 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. 14 | See the GNU 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 | // Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip). 21 | // See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1) 22 | 23 | #include "variant.h" 24 | #include "wiring_constants.h" 25 | #include "wiring_digital.h" 26 | #include "nrf.h" 27 | 28 | const uint32_t g_ADigitalPinMap[] = 29 | { 30 | // D0 .. D13 31 | 29, // D0 is P0.29 (UART RX) 32 | 45, // D1 is P1.13 (UART TX) 33 | 44, // D2 is P1.12 (NFC2) 34 | 31, // D3 is P0.31 (LED1) 35 | 13, // D4 is P0.13 (LED2) 36 | 11, // D5 is P0.11 37 | 9, // D6 is P0.09 38 | 10, // D7 is P0.10 (Button) 39 | 41, // D8 is P1.09 40 | 12, // D9 is P0.12 41 | 14, // D10 is P0.14 42 | 15, // D11 is P0.15 43 | 32, // D12 is P1.00 44 | 7, // D13 is P0.07 45 | 46 | // D14 .. D21 (aka A0 .. A5) 47 | 4, // D14 is P0.04 (A0) 48 | 30, // D15 is P0.30 (A1) 49 | 5, // D16 is P0.05 (A2) 50 | 2, // D17 is P0.02 (A3) 51 | 28, // D18 is P0.28 (A4) 52 | 3, // D19 is P0.03 (A5) 53 | 54 | // D20 .. D21 (aka I2C pins) 55 | 16, // D20 is P0.16 (SDA) 56 | 24, // D21 is P0.24 (SCL) 57 | 58 | // QSPI pins (not exposed via any header / test point) 59 | 19, // D22 is P0.19 (QSPI CLK) 60 | 17, // D23 is P0.17 (QSPI CS) 61 | 20, // D24 is P0.20 (QSPI Data 0) 62 | 21, // D25 is P0.21 (QSPI Data 1) 63 | 22, // D26 is P0.22 (QSPI Data 2) 64 | 26, // D27 is P0.23 (QSPI Data 3) 65 | 66 | 40, // D28 is P1.08 - IO34 67 | 41, // D29 is P1.01 - IO35 68 | 44, // D30 is P1.02 - IO36 69 | 45, // D31 is P1.03 - IO37 70 | 42, // D32 is P1.10 - IO38 71 | 43, // D33 is P1.11 - IO39 72 | 47, // D34 is P1.15 - IO40 73 | 46, // D35 is P1.14 - IO41 74 | 26, // D36 is P0.26 - IO42 75 | 6, // D37 is P0.6 - IO43 76 | 27, // D38 is P0.27 - IO44 77 | }; 78 | 79 | void initVariant() 80 | { 81 | // LED1 & LED2 82 | pinMode(PIN_LED1, OUTPUT); 83 | ledOff(PIN_LED1); 84 | 85 | pinMode(PIN_LED2, OUTPUT); 86 | ledOff(PIN_LED2); 87 | } 88 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.21.0/variants/NINA_B112_ublox/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | This library is free software; you can redistribute it and/or 4 | modify it under the terms of the GNU Lesser General Public 5 | License as published by the Free Software Foundation; either 6 | version 2.1 of the License, or (at your option) any later version. 7 | This library is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 | See the GNU Lesser General Public License for more details. 11 | You should have received a copy of the GNU Lesser General Public 12 | License along with this library; if not, write to the Free Software 13 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 14 | */ 15 | 16 | // API compatibility 17 | #include "variant.h" 18 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.21.0/variants/NINA_B112_ublox/variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2016 Sandeep Mistry All right reserved. 4 | Copyright (c) 2018, Adafruit Industries (adafruit.com) 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. 14 | See the GNU 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 "variant.h" 22 | 23 | #include "wiring_constants.h" 24 | #include "wiring_digital.h" 25 | #include "nrf.h" 26 | 27 | //https://www.u-blox.com/sites/default/files/NINA-B1_DataSheet_UBX-15019243.pdf 28 | //https://www.u-blox.com/sites/default/files/EVK-NINA-B1_UserGuide_%28UBX-15028120%29_C1-Public.pdf 29 | 30 | const uint32_t g_ADigitalPinMap[] = { 31 | // D0 .. D13 32 | 5, // D0 is P0.05 (UART RX) 33 | 6, // D1 is P0.06 (UART TX) 34 | 7, // D2 is P0.07 35 | 31, // D3 is P0.31 36 | 18, // D4 is P0.18 (LED Blue) 37 | 99, // D5 (NC) 38 | 9, // D6 is P0.09 NFC1 39 | 10, // D7 is P0.10 (Button) NFC2 40 | 99, // D8 (NC) 41 | 8, // D9 is P0.08 42 | 11, // D10 is P0.11 CS 43 | 13, // D11 is P0.13 MOSI 44 | 12, // D12 is P0.12 MISO 45 | 14, // D13 is P0.14 SCK 46 | //I2C 47 | 2, // D14 is P0.2 (SDA) 48 | 3, // D15 is P0.3 (SCL) 49 | // D16 .. D21 (aka A0 .. A5) 50 | 3, // D16 is P0.03 (A0) 51 | 2, // D17 is P0.02 (A1) 52 | 4, // D18 is P0.04 (A2) 53 | 30, // D19 is P0.30 (A3) SW2 54 | 29, // D20 is P0.29 (A4) 55 | 28, // D21 is P0.28 (A5) 56 | 9, // P0.09 NFC 57 | 10, // P0.10 NFC 58 | 16, // SW1 (LED Green) 59 | }; -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.21.0/variants/NINA_B302_ublox/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | This library is free software; you can redistribute it and/or 4 | modify it under the terms of the GNU Lesser General Public 5 | License as published by the Free Software Foundation; either 6 | version 2.1 of the License, or (at your option) any later version. 7 | This library is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 | See the GNU Lesser General Public License for more details. 11 | You should have received a copy of the GNU Lesser General Public 12 | License along with this library; if not, write to the Free Software 13 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 14 | */ 15 | 16 | // API compatibility 17 | #include "variant.h" 18 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.21.0/variants/NINA_B302_ublox/variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2016 Sandeep Mistry All right reserved. 4 | Copyright (c) 2018, Adafruit Industries (adafruit.com) 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. 14 | See the GNU 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 | // Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip). 21 | // See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1) 22 | 23 | #include "variant.h" 24 | #include "wiring_constants.h" 25 | #include "wiring_digital.h" 26 | #include "nrf.h" 27 | 28 | const uint32_t g_ADigitalPinMap[] = 29 | { 30 | // D0 .. D13 31 | 29, // D0 is P0.29 (UART RX) 32 | 45, // D1 is P1.13 (UART TX) 33 | 44, // D2 is P1.12 (NFC2) 34 | 31, // D3 is P0.31 (LED1) 35 | 13, // D4 is P0.13 (LED2) 36 | 11, // D5 is P0.11 37 | 9, // D6 is P0.09 38 | 10, // D7 is P0.10 (Button) 39 | 41, // D8 is P1.09 40 | 12, // D9 is P0.12 41 | 14, // D10 is P0.14 42 | 15, // D11 is P0.15 43 | 32, // D12 is P1.00 44 | 7, // D13 is P0.07 45 | 46 | // D14 .. D21 (aka A0 .. A5) 47 | 4, // D14 is P0.04 (A0) 48 | 30, // D15 is P0.30 (A1) 49 | 5, // D16 is P0.05 (A2) 50 | 2, // D17 is P0.02 (A3) 51 | 28, // D18 is P0.28 (A4) 52 | 3, // D19 is P0.03 (A5) 53 | 54 | // D20 .. D21 (aka I2C pins) 55 | 16, // D20 is P0.16 (SDA) 56 | 24, // D21 is P0.24 (SCL) 57 | 58 | // QSPI pins (not exposed via any header / test point) 59 | 19, // D22 is P0.19 (QSPI CLK) 60 | 17, // D23 is P0.17 (QSPI CS) 61 | 20, // D24 is P0.20 (QSPI Data 0) 62 | 21, // D25 is P0.21 (QSPI Data 1) 63 | 22, // D26 is P0.22 (QSPI Data 2) 64 | 26, // D27 is P0.23 (QSPI Data 3) 65 | 66 | 40, // D28 is P1.08 - IO34 67 | 41, // D29 is P1.01 - IO35 68 | 44, // D30 is P1.02 - IO36 69 | 45, // D31 is P1.03 - IO37 70 | 42, // D32 is P1.10 - IO38 71 | 43, // D33 is P1.11 - IO39 72 | 47, // D34 is P1.15 - IO40 73 | 46, // D35 is P1.14 - IO41 74 | 26, // D36 is P0.26 - IO42 75 | 6, // D37 is P0.6 - IO43 76 | 27, // D38 is P0.27 - IO44 77 | }; 78 | 79 | void initVariant() 80 | { 81 | // LED1 & LED2 82 | pinMode(PIN_LED1, OUTPUT); 83 | ledOff(PIN_LED1); 84 | 85 | pinMode(PIN_LED2, OUTPUT); 86 | ledOff(PIN_LED2); 87 | } 88 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.22.0/variants/NINA_B112_ublox/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | This library is free software; you can redistribute it and/or 4 | modify it under the terms of the GNU Lesser General Public 5 | License as published by the Free Software Foundation; either 6 | version 2.1 of the License, or (at your option) any later version. 7 | This library is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 | See the GNU Lesser General Public License for more details. 11 | You should have received a copy of the GNU Lesser General Public 12 | License along with this library; if not, write to the Free Software 13 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 14 | */ 15 | 16 | // API compatibility 17 | #include "variant.h" 18 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.22.0/variants/NINA_B112_ublox/variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2016 Sandeep Mistry All right reserved. 4 | Copyright (c) 2018, Adafruit Industries (adafruit.com) 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. 14 | See the GNU 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 "variant.h" 22 | 23 | #include "wiring_constants.h" 24 | #include "wiring_digital.h" 25 | #include "nrf.h" 26 | 27 | //https://www.u-blox.com/sites/default/files/NINA-B1_DataSheet_UBX-15019243.pdf 28 | //https://www.u-blox.com/sites/default/files/EVK-NINA-B1_UserGuide_%28UBX-15028120%29_C1-Public.pdf 29 | 30 | const uint32_t g_ADigitalPinMap[] = 31 | { 32 | // D0 .. D13 33 | 5, // D0 is P0.05 (UART RX) 34 | 6, // D1 is P0.06 (UART TX) 35 | 7, // D2 is P0.07 36 | 31, // D3 is P0.31 37 | 18, // D4 is P0.18 (LED Blue) 38 | 99, // D5 (NC) 39 | 9, // D6 is P0.09 NFC1 40 | 10, // D7 is P0.10 (Button) NFC2 41 | 99, // D8 (NC) 42 | 8, // D9 is P0.08 43 | 11, // D10 is P0.11 CS 44 | 13, // D11 is P0.13 MOSI 45 | 12, // D12 is P0.12 MISO 46 | 14, // D13 is P0.14 SCK 47 | //I2C 48 | 2, // D14 is P0.2 (SDA) 49 | 3, // D15 is P0.3 (SCL) 50 | // D16 .. D21 (aka A0 .. A5) 51 | 3, // D16 is P0.03 (A0) 52 | 2, // D17 is P0.02 (A1) 53 | 4, // D18 is P0.04 (A2) 54 | 30, // D19 is P0.30 (A3) SW2 55 | 29, // D20 is P0.29 (A4) 56 | 28, // D21 is P0.28 (A5) 57 | 9, // P0.09 NFC 58 | 10, // P0.10 NFC 59 | 16, // SW1 (LED Green) 60 | }; -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.22.0/variants/NINA_B302_ublox/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | This library is free software; you can redistribute it and/or 4 | modify it under the terms of the GNU Lesser General Public 5 | License as published by the Free Software Foundation; either 6 | version 2.1 of the License, or (at your option) any later version. 7 | This library is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 | See the GNU Lesser General Public License for more details. 11 | You should have received a copy of the GNU Lesser General Public 12 | License along with this library; if not, write to the Free Software 13 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 14 | */ 15 | 16 | // API compatibility 17 | #include "variant.h" 18 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.22.0/variants/NINA_B302_ublox/variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2016 Sandeep Mistry All right reserved. 4 | Copyright (c) 2018, Adafruit Industries (adafruit.com) 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. 14 | See the GNU 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 | // Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip). 21 | // See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1) 22 | 23 | #include "variant.h" 24 | #include "wiring_constants.h" 25 | #include "wiring_digital.h" 26 | #include "nrf.h" 27 | 28 | const uint32_t g_ADigitalPinMap[] = 29 | { 30 | // D0 .. D13 31 | 29, // D0 is P0.29 (UART RX) 32 | 45, // D1 is P1.13 (UART TX) 33 | 44, // D2 is P1.12 (NFC2) 34 | 31, // D3 is P0.31 (LED1) 35 | 13, // D4 is P0.13 (LED2) 36 | 11, // D5 is P0.11 37 | 9, // D6 is P0.09 38 | 10, // D7 is P0.10 (Button) 39 | 41, // D8 is P1.09 40 | 12, // D9 is P0.12 41 | 14, // D10 is P0.14 42 | 15, // D11 is P0.15 43 | 32, // D12 is P1.00 44 | 7, // D13 is P0.07 45 | 46 | // D14 .. D21 (aka A0 .. A5) 47 | 4, // D14 is P0.04 (A0) 48 | 30, // D15 is P0.30 (A1) 49 | 5, // D16 is P0.05 (A2) 50 | 2, // D17 is P0.02 (A3) 51 | 28, // D18 is P0.28 (A4) 52 | 3, // D19 is P0.03 (A5) 53 | 54 | // D20 .. D21 (aka I2C pins) 55 | 16, // D20 is P0.16 (SDA) 56 | 24, // D21 is P0.24 (SCL) 57 | 58 | // QSPI pins (not exposed via any header / test point) 59 | 19, // D22 is P0.19 (QSPI CLK) 60 | 17, // D23 is P0.17 (QSPI CS) 61 | 20, // D24 is P0.20 (QSPI Data 0) 62 | 21, // D25 is P0.21 (QSPI Data 1) 63 | 22, // D26 is P0.22 (QSPI Data 2) 64 | 26, // D27 is P0.23 (QSPI Data 3) 65 | 66 | 40, // D28 is P1.08 - IO34 67 | 41, // D29 is P1.01 - IO35 68 | 44, // D30 is P1.02 - IO36 69 | 45, // D31 is P1.03 - IO37 70 | 42, // D32 is P1.10 - IO38 71 | 43, // D33 is P1.11 - IO39 72 | 47, // D34 is P1.15 - IO40 73 | 46, // D35 is P1.14 - IO41 74 | 26, // D36 is P0.26 - IO42 75 | 6, // D37 is P0.6 - IO43 76 | 27, // D38 is P0.27 - IO44 77 | }; 78 | 79 | void initVariant() 80 | { 81 | // LED1 & LED2 82 | pinMode(PIN_LED1, OUTPUT); 83 | ledOff(PIN_LED1); 84 | 85 | pinMode(PIN_LED2, OUTPUT); 86 | ledOff(PIN_LED2); 87 | } 88 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.22.1/variants/NINA_B112_ublox/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | This library is free software; you can redistribute it and/or 4 | modify it under the terms of the GNU Lesser General Public 5 | License as published by the Free Software Foundation; either 6 | version 2.1 of the License, or (at your option) any later version. 7 | This library is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 | See the GNU Lesser General Public License for more details. 11 | You should have received a copy of the GNU Lesser General Public 12 | License along with this library; if not, write to the Free Software 13 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 14 | */ 15 | 16 | // API compatibility 17 | #include "variant.h" 18 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.22.1/variants/NINA_B112_ublox/variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2016 Sandeep Mistry All right reserved. 4 | Copyright (c) 2018, Adafruit Industries (adafruit.com) 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. 14 | See the GNU 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 "variant.h" 22 | 23 | #include "wiring_constants.h" 24 | #include "wiring_digital.h" 25 | #include "nrf.h" 26 | 27 | //https://www.u-blox.com/sites/default/files/NINA-B1_DataSheet_UBX-15019243.pdf 28 | //https://www.u-blox.com/sites/default/files/EVK-NINA-B1_UserGuide_%28UBX-15028120%29_C1-Public.pdf 29 | 30 | const uint32_t g_ADigitalPinMap[] = 31 | { 32 | // D0 .. D13 33 | 5, // D0 is P0.05 (UART RX) 34 | 6, // D1 is P0.06 (UART TX) 35 | 7, // D2 is P0.07 36 | 31, // D3 is P0.31 37 | 18, // D4 is P0.18 (LED Blue) 38 | 99, // D5 (NC) 39 | 9, // D6 is P0.09 NFC1 40 | 10, // D7 is P0.10 (Button) NFC2 41 | 99, // D8 (NC) 42 | 8, // D9 is P0.08 43 | 11, // D10 is P0.11 CS 44 | 13, // D11 is P0.13 MOSI 45 | 12, // D12 is P0.12 MISO 46 | 14, // D13 is P0.14 SCK 47 | //I2C 48 | 2, // D14 is P0.2 (SDA) 49 | 3, // D15 is P0.3 (SCL) 50 | // D16 .. D21 (aka A0 .. A5) 51 | 3, // D16 is P0.03 (A0) 52 | 2, // D17 is P0.02 (A1) 53 | 4, // D18 is P0.04 (A2) 54 | 30, // D19 is P0.30 (A3) SW2 55 | 29, // D20 is P0.29 (A4) 56 | 28, // D21 is P0.28 (A5) 57 | 9, // P0.09 NFC 58 | 10, // P0.10 NFC 59 | 16, // SW1 (LED Green) 60 | }; -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.22.1/variants/NINA_B302_ublox/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | This library is free software; you can redistribute it and/or 4 | modify it under the terms of the GNU Lesser General Public 5 | License as published by the Free Software Foundation; either 6 | version 2.1 of the License, or (at your option) any later version. 7 | This library is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 | See the GNU Lesser General Public License for more details. 11 | You should have received a copy of the GNU Lesser General Public 12 | License along with this library; if not, write to the Free Software 13 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 14 | */ 15 | 16 | // API compatibility 17 | #include "variant.h" 18 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.22.1/variants/NINA_B302_ublox/variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2016 Sandeep Mistry All right reserved. 4 | Copyright (c) 2018, Adafruit Industries (adafruit.com) 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. 14 | See the GNU 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 | // Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip). 21 | // See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1) 22 | 23 | #include "variant.h" 24 | #include "wiring_constants.h" 25 | #include "wiring_digital.h" 26 | #include "nrf.h" 27 | 28 | const uint32_t g_ADigitalPinMap[] = 29 | { 30 | // D0 .. D13 31 | 29, // D0 is P0.29 (UART RX) 32 | 45, // D1 is P1.13 (UART TX) 33 | 44, // D2 is P1.12 (NFC2) 34 | 31, // D3 is P0.31 (LED1) 35 | 13, // D4 is P0.13 (LED2) 36 | 11, // D5 is P0.11 37 | 9, // D6 is P0.09 38 | 10, // D7 is P0.10 (Button) 39 | 41, // D8 is P1.09 40 | 12, // D9 is P0.12 41 | 14, // D10 is P0.14 42 | 15, // D11 is P0.15 43 | 32, // D12 is P1.00 44 | 7, // D13 is P0.07 45 | 46 | // D14 .. D21 (aka A0 .. A5) 47 | 4, // D14 is P0.04 (A0) 48 | 30, // D15 is P0.30 (A1) 49 | 5, // D16 is P0.05 (A2) 50 | 2, // D17 is P0.02 (A3) 51 | 28, // D18 is P0.28 (A4) 52 | 3, // D19 is P0.03 (A5) 53 | 54 | // D20 .. D21 (aka I2C pins) 55 | 16, // D20 is P0.16 (SDA) 56 | 24, // D21 is P0.24 (SCL) 57 | 58 | // QSPI pins (not exposed via any header / test point) 59 | 19, // D22 is P0.19 (QSPI CLK) 60 | 17, // D23 is P0.17 (QSPI CS) 61 | 20, // D24 is P0.20 (QSPI Data 0) 62 | 21, // D25 is P0.21 (QSPI Data 1) 63 | 22, // D26 is P0.22 (QSPI Data 2) 64 | 26, // D27 is P0.23 (QSPI Data 3) 65 | 66 | 40, // D28 is P1.08 - IO34 67 | 41, // D29 is P1.01 - IO35 68 | 44, // D30 is P1.02 - IO36 69 | 45, // D31 is P1.03 - IO37 70 | 42, // D32 is P1.10 - IO38 71 | 43, // D33 is P1.11 - IO39 72 | 47, // D34 is P1.15 - IO40 73 | 46, // D35 is P1.14 - IO41 74 | 26, // D36 is P0.26 - IO42 75 | 6, // D37 is P0.6 - IO43 76 | 27, // D38 is P0.27 - IO44 77 | }; 78 | 79 | void initVariant() 80 | { 81 | // LED1 & LED2 82 | pinMode(PIN_LED1, OUTPUT); 83 | ledOff(PIN_LED1); 84 | 85 | pinMode(PIN_LED2, OUTPUT); 86 | ledOff(PIN_LED2); 87 | } 88 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.23.0/variants/NINA_B112_ublox/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | This library is free software; you can redistribute it and/or 4 | modify it under the terms of the GNU Lesser General Public 5 | License as published by the Free Software Foundation; either 6 | version 2.1 of the License, or (at your option) any later version. 7 | This library is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 | See the GNU Lesser General Public License for more details. 11 | You should have received a copy of the GNU Lesser General Public 12 | License along with this library; if not, write to the Free Software 13 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 14 | */ 15 | 16 | // API compatibility 17 | #include "variant.h" 18 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.23.0/variants/NINA_B112_ublox/variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2016 Sandeep Mistry All right reserved. 4 | Copyright (c) 2018, Adafruit Industries (adafruit.com) 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. 14 | See the GNU 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 "variant.h" 22 | 23 | #include "wiring_constants.h" 24 | #include "wiring_digital.h" 25 | #include "nrf.h" 26 | 27 | //https://www.u-blox.com/sites/default/files/NINA-B1_DataSheet_UBX-15019243.pdf 28 | //https://www.u-blox.com/sites/default/files/EVK-NINA-B1_UserGuide_%28UBX-15028120%29_C1-Public.pdf 29 | 30 | const uint32_t g_ADigitalPinMap[] = 31 | { 32 | // D0 .. D13 33 | 5, // D0 is P0.05 (UART RX) 34 | 6, // D1 is P0.06 (UART TX) 35 | 7, // D2 is P0.07 36 | 31, // D3 is P0.31 37 | 18, // D4 is P0.18 (LED Blue) 38 | 99, // D5 (NC) 39 | 9, // D6 is P0.09 NFC1 40 | 10, // D7 is P0.10 (Button) NFC2 41 | 99, // D8 (NC) 42 | 8, // D9 is P0.08 43 | 11, // D10 is P0.11 CS 44 | 13, // D11 is P0.13 MOSI 45 | 12, // D12 is P0.12 MISO 46 | 14, // D13 is P0.14 SCK 47 | //I2C 48 | 2, // D14 is P0.2 (SDA) 49 | 3, // D15 is P0.3 (SCL) 50 | // D16 .. D21 (aka A0 .. A5) 51 | 3, // D16 is P0.03 (A0) 52 | 2, // D17 is P0.02 (A1) 53 | 4, // D18 is P0.04 (A2) 54 | 30, // D19 is P0.30 (A3) SW2 55 | 29, // D20 is P0.29 (A4) 56 | 28, // D21 is P0.28 (A5) 57 | 9, // P0.09 NFC 58 | 10, // P0.10 NFC 59 | 16, // SW1 (LED Green) 60 | }; -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.23.0/variants/NINA_B302_ublox/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | This library is free software; you can redistribute it and/or 4 | modify it under the terms of the GNU Lesser General Public 5 | License as published by the Free Software Foundation; either 6 | version 2.1 of the License, or (at your option) any later version. 7 | This library is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 | See the GNU Lesser General Public License for more details. 11 | You should have received a copy of the GNU Lesser General Public 12 | License along with this library; if not, write to the Free Software 13 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 14 | */ 15 | 16 | // API compatibility 17 | #include "variant.h" 18 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.23.0/variants/NINA_B302_ublox/variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2016 Sandeep Mistry All right reserved. 4 | Copyright (c) 2018, Adafruit Industries (adafruit.com) 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. 14 | See the GNU 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 | // Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip). 21 | // See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1) 22 | 23 | #include "variant.h" 24 | #include "wiring_constants.h" 25 | #include "wiring_digital.h" 26 | #include "nrf.h" 27 | 28 | const uint32_t g_ADigitalPinMap[] = 29 | { 30 | // D0 .. D13 31 | 29, // D0 is P0.29 (UART RX) 32 | 45, // D1 is P1.13 (UART TX) 33 | 44, // D2 is P1.12 (NFC2) 34 | 31, // D3 is P0.31 (LED1) 35 | 13, // D4 is P0.13 (LED2) 36 | 11, // D5 is P0.11 37 | 9, // D6 is P0.09 38 | 10, // D7 is P0.10 (Button) 39 | 41, // D8 is P1.09 40 | 12, // D9 is P0.12 41 | 14, // D10 is P0.14 42 | 15, // D11 is P0.15 43 | 32, // D12 is P1.00 44 | 7, // D13 is P0.07 45 | 46 | // D14 .. D21 (aka A0 .. A5) 47 | 4, // D14 is P0.04 (A0) 48 | 30, // D15 is P0.30 (A1) 49 | 5, // D16 is P0.05 (A2) 50 | 2, // D17 is P0.02 (A3) 51 | 28, // D18 is P0.28 (A4) 52 | 3, // D19 is P0.03 (A5) 53 | 54 | // D20 .. D21 (aka I2C pins) 55 | 16, // D20 is P0.16 (SDA) 56 | 24, // D21 is P0.24 (SCL) 57 | 58 | // QSPI pins (not exposed via any header / test point) 59 | 19, // D22 is P0.19 (QSPI CLK) 60 | 17, // D23 is P0.17 (QSPI CS) 61 | 20, // D24 is P0.20 (QSPI Data 0) 62 | 21, // D25 is P0.21 (QSPI Data 1) 63 | 22, // D26 is P0.22 (QSPI Data 2) 64 | 26, // D27 is P0.23 (QSPI Data 3) 65 | 66 | 40, // D28 is P1.08 - IO34 67 | 41, // D29 is P1.01 - IO35 68 | 44, // D30 is P1.02 - IO36 69 | 45, // D31 is P1.03 - IO37 70 | 42, // D32 is P1.10 - IO38 71 | 43, // D33 is P1.11 - IO39 72 | 47, // D34 is P1.15 - IO40 73 | 46, // D35 is P1.14 - IO41 74 | 26, // D36 is P0.26 - IO42 75 | 6, // D37 is P0.6 - IO43 76 | 27, // D38 is P0.27 - IO44 77 | }; 78 | 79 | void initVariant() 80 | { 81 | // LED1 & LED2 82 | pinMode(PIN_LED1, OUTPUT); 83 | ledOff(PIN_LED1); 84 | 85 | pinMode(PIN_LED2, OUTPUT); 86 | ledOff(PIN_LED2); 87 | } 88 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.24.0/variants/NINA_B112_ublox/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | This library is free software; you can redistribute it and/or 4 | modify it under the terms of the GNU Lesser General Public 5 | License as published by the Free Software Foundation; either 6 | version 2.1 of the License, or (at your option) any later version. 7 | This library is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 | See the GNU Lesser General Public License for more details. 11 | You should have received a copy of the GNU Lesser General Public 12 | License along with this library; if not, write to the Free Software 13 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 14 | */ 15 | 16 | // API compatibility 17 | #include "variant.h" 18 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.24.0/variants/NINA_B112_ublox/variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2016 Sandeep Mistry All right reserved. 4 | Copyright (c) 2018, Adafruit Industries (adafruit.com) 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. 14 | See the GNU 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 "variant.h" 22 | 23 | #include "wiring_constants.h" 24 | #include "wiring_digital.h" 25 | #include "nrf.h" 26 | 27 | //https://www.u-blox.com/sites/default/files/NINA-B1_DataSheet_UBX-15019243.pdf 28 | //https://www.u-blox.com/sites/default/files/EVK-NINA-B1_UserGuide_%28UBX-15028120%29_C1-Public.pdf 29 | 30 | const uint32_t g_ADigitalPinMap[] = 31 | { 32 | // D0 .. D13 33 | 5, // D0 is P0.05 (UART RX) 34 | 6, // D1 is P0.06 (UART TX) 35 | 7, // D2 is P0.07 36 | 31, // D3 is P0.31 37 | 18, // D4 is P0.18 (LED Blue) 38 | 99, // D5 (NC) 39 | 9, // D6 is P0.09 NFC1 40 | 10, // D7 is P0.10 (Button) NFC2 41 | 99, // D8 (NC) 42 | 8, // D9 is P0.08 43 | 11, // D10 is P0.11 CS 44 | 13, // D11 is P0.13 MOSI 45 | 12, // D12 is P0.12 MISO 46 | 14, // D13 is P0.14 SCK 47 | //I2C 48 | 2, // D14 is P0.2 (SDA) 49 | 3, // D15 is P0.3 (SCL) 50 | // D16 .. D21 (aka A0 .. A5) 51 | 3, // D16 is P0.03 (A0) 52 | 2, // D17 is P0.02 (A1) 53 | 4, // D18 is P0.04 (A2) 54 | 30, // D19 is P0.30 (A3) SW2 55 | 29, // D20 is P0.29 (A4) 56 | 28, // D21 is P0.28 (A5) 57 | 9, // P0.09 NFC 58 | 10, // P0.10 NFC 59 | 16, // SW1 (LED Green) 60 | }; -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.24.0/variants/NINA_B302_ublox/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | This library is free software; you can redistribute it and/or 4 | modify it under the terms of the GNU Lesser General Public 5 | License as published by the Free Software Foundation; either 6 | version 2.1 of the License, or (at your option) any later version. 7 | This library is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 | See the GNU Lesser General Public License for more details. 11 | You should have received a copy of the GNU Lesser General Public 12 | License along with this library; if not, write to the Free Software 13 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 14 | */ 15 | 16 | // API compatibility 17 | #include "variant.h" 18 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/0.24.0/variants/NINA_B302_ublox/variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2016 Sandeep Mistry All right reserved. 4 | Copyright (c) 2018, Adafruit Industries (adafruit.com) 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. 14 | See the GNU 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 | // Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip). 21 | // See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1) 22 | 23 | #include "variant.h" 24 | #include "wiring_constants.h" 25 | #include "wiring_digital.h" 26 | #include "nrf.h" 27 | 28 | const uint32_t g_ADigitalPinMap[] = 29 | { 30 | // D0 .. D13 31 | 29, // D0 is P0.29 (UART RX) 32 | 45, // D1 is P1.13 (UART TX) 33 | 44, // D2 is P1.12 (NFC2) 34 | 31, // D3 is P0.31 (LED1) 35 | 13, // D4 is P0.13 (LED2) 36 | 11, // D5 is P0.11 37 | 9, // D6 is P0.09 38 | 10, // D7 is P0.10 (Button) 39 | 41, // D8 is P1.09 40 | 12, // D9 is P0.12 41 | 14, // D10 is P0.14 42 | 15, // D11 is P0.15 43 | 32, // D12 is P1.00 44 | 7, // D13 is P0.07 45 | 46 | // D14 .. D21 (aka A0 .. A5) 47 | 4, // D14 is P0.04 (A0) 48 | 30, // D15 is P0.30 (A1) 49 | 5, // D16 is P0.05 (A2) 50 | 2, // D17 is P0.02 (A3) 51 | 28, // D18 is P0.28 (A4) 52 | 3, // D19 is P0.03 (A5) 53 | 54 | // D20 .. D21 (aka I2C pins) 55 | 16, // D20 is P0.16 (SDA) 56 | 24, // D21 is P0.24 (SCL) 57 | 58 | // QSPI pins (not exposed via any header / test point) 59 | 19, // D22 is P0.19 (QSPI CLK) 60 | 17, // D23 is P0.17 (QSPI CS) 61 | 20, // D24 is P0.20 (QSPI Data 0) 62 | 21, // D25 is P0.21 (QSPI Data 1) 63 | 22, // D26 is P0.22 (QSPI Data 2) 64 | 26, // D27 is P0.23 (QSPI Data 3) 65 | 66 | 40, // D28 is P1.08 - IO34 67 | 41, // D29 is P1.01 - IO35 68 | 44, // D30 is P1.02 - IO36 69 | 45, // D31 is P1.03 - IO37 70 | 42, // D32 is P1.10 - IO38 71 | 43, // D33 is P1.11 - IO39 72 | 47, // D34 is P1.15 - IO40 73 | 46, // D35 is P1.14 - IO41 74 | 26, // D36 is P0.26 - IO42 75 | 6, // D37 is P0.6 - IO43 76 | 27, // D38 is P0.27 - IO44 77 | }; 78 | 79 | void initVariant() 80 | { 81 | // LED1 & LED2 82 | pinMode(PIN_LED1, OUTPUT); 83 | ledOff(PIN_LED1); 84 | 85 | pinMode(PIN_LED2, OUTPUT); 86 | ledOff(PIN_LED2); 87 | } 88 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/1.0.0/variants/NINA_B112_ublox/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | This library is free software; you can redistribute it and/or 4 | modify it under the terms of the GNU Lesser General Public 5 | License as published by the Free Software Foundation; either 6 | version 2.1 of the License, or (at your option) any later version. 7 | This library is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 | See the GNU Lesser General Public License for more details. 11 | You should have received a copy of the GNU Lesser General Public 12 | License along with this library; if not, write to the Free Software 13 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 14 | */ 15 | 16 | // API compatibility 17 | #include "variant.h" 18 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/1.0.0/variants/NINA_B112_ublox/variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2016 Sandeep Mistry All right reserved. 4 | Copyright (c) 2018, Adafruit Industries (adafruit.com) 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. 14 | See the GNU 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 "variant.h" 22 | 23 | #include "wiring_constants.h" 24 | #include "wiring_digital.h" 25 | #include "nrf.h" 26 | 27 | //https://www.u-blox.com/sites/default/files/NINA-B1_DataSheet_UBX-15019243.pdf 28 | //https://www.u-blox.com/sites/default/files/EVK-NINA-B1_UserGuide_%28UBX-15028120%29_C1-Public.pdf 29 | 30 | const uint32_t g_ADigitalPinMap[] = 31 | { 32 | // D0 .. D13 33 | 5, // D0 is P0.05 (UART RX) 34 | 6, // D1 is P0.06 (UART TX) 35 | 7, // D2 is P0.07 36 | 31, // D3 is P0.31 37 | 18, // D4 is P0.18 (LED Blue) 38 | 99, // D5 (NC) 39 | 9, // D6 is P0.09 NFC1 40 | 10, // D7 is P0.10 (Button) NFC2 41 | 99, // D8 (NC) 42 | 8, // D9 is P0.08 43 | 11, // D10 is P0.11 CS 44 | 13, // D11 is P0.13 MOSI 45 | 12, // D12 is P0.12 MISO 46 | 14, // D13 is P0.14 SCK 47 | //I2C 48 | 2, // D14 is P0.2 (SDA) 49 | 3, // D15 is P0.3 (SCL) 50 | // D16 .. D21 (aka A0 .. A5) 51 | 3, // D16 is P0.03 (A0) 52 | 2, // D17 is P0.02 (A1) 53 | 4, // D18 is P0.04 (A2) 54 | 30, // D19 is P0.30 (A3) SW2 55 | 29, // D20 is P0.29 (A4) 56 | 28, // D21 is P0.28 (A5) 57 | 9, // P0.09 NFC 58 | 10, // P0.10 NFC 59 | 16, // SW1 (LED Green) 60 | }; -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/1.0.0/variants/NINA_B302_ublox/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | This library is free software; you can redistribute it and/or 4 | modify it under the terms of the GNU Lesser General Public 5 | License as published by the Free Software Foundation; either 6 | version 2.1 of the License, or (at your option) any later version. 7 | This library is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 | See the GNU Lesser General Public License for more details. 11 | You should have received a copy of the GNU Lesser General Public 12 | License along with this library; if not, write to the Free Software 13 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 14 | */ 15 | 16 | // API compatibility 17 | #include "variant.h" 18 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/1.0.0/variants/NINA_B302_ublox/variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2016 Sandeep Mistry All right reserved. 4 | Copyright (c) 2018, Adafruit Industries (adafruit.com) 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. 14 | See the GNU 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 | // Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip). 21 | // See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1) 22 | 23 | #include "variant.h" 24 | #include "wiring_constants.h" 25 | #include "wiring_digital.h" 26 | #include "nrf.h" 27 | 28 | const uint32_t g_ADigitalPinMap[] = 29 | { 30 | // D0 .. D13 31 | 29, // D0 is P0.29 (UART RX) 32 | 45, // D1 is P1.13 (UART TX) 33 | 44, // D2 is P1.12 (NFC2) 34 | 31, // D3 is P0.31 (LED1) 35 | 13, // D4 is P0.13 (LED2) 36 | 11, // D5 is P0.11 37 | 9, // D6 is P0.09 38 | 10, // D7 is P0.10 (Button) 39 | 41, // D8 is P1.09 40 | 12, // D9 is P0.12 41 | 14, // D10 is P0.14 42 | 15, // D11 is P0.15 43 | 32, // D12 is P1.00 44 | 7, // D13 is P0.07 45 | 46 | // D14 .. D21 (aka A0 .. A5) 47 | 4, // D14 is P0.04 (A0) 48 | 30, // D15 is P0.30 (A1) 49 | 5, // D16 is P0.05 (A2) 50 | 2, // D17 is P0.02 (A3) 51 | 28, // D18 is P0.28 (A4) 52 | 3, // D19 is P0.03 (A5) 53 | 54 | // D20 .. D21 (aka I2C pins) 55 | 16, // D20 is P0.16 (SDA) 56 | 24, // D21 is P0.24 (SCL) 57 | 58 | // QSPI pins (not exposed via any header / test point) 59 | 19, // D22 is P0.19 (QSPI CLK) 60 | 17, // D23 is P0.17 (QSPI CS) 61 | 20, // D24 is P0.20 (QSPI Data 0) 62 | 21, // D25 is P0.21 (QSPI Data 1) 63 | 22, // D26 is P0.22 (QSPI Data 2) 64 | 26, // D27 is P0.23 (QSPI Data 3) 65 | 66 | 40, // D28 is P1.08 - IO34 67 | 41, // D29 is P1.01 - IO35 68 | 44, // D30 is P1.02 - IO36 69 | 45, // D31 is P1.03 - IO37 70 | 42, // D32 is P1.10 - IO38 71 | 43, // D33 is P1.11 - IO39 72 | 47, // D34 is P1.15 - IO40 73 | 46, // D35 is P1.14 - IO41 74 | 26, // D36 is P0.26 - IO42 75 | 6, // D37 is P0.6 - IO43 76 | 27, // D38 is P0.27 - IO44 77 | }; 78 | 79 | void initVariant() 80 | { 81 | // LED1 & LED2 82 | pinMode(PIN_LED1, OUTPUT); 83 | ledOff(PIN_LED1); 84 | 85 | pinMode(PIN_LED2, OUTPUT); 86 | ledOff(PIN_LED2); 87 | } 88 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/1.0.0/variants/sparkfun_nrf52840_mini/variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2016 Sandeep Mistry All right reserved. 4 | Copyright (c) 2018, Adafruit Industries (adafruit.com) 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. 14 | See the GNU 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 "variant.h" 22 | #include "wiring_constants.h" 23 | #include "wiring_digital.h" 24 | #include "nrf.h" 25 | 26 | const uint32_t g_ADigitalPinMap[] = 27 | { 28 | // P0 29 | 0, 1, 2, 3, 4, 5, 6, 7, 30 | 8, 9, 10, 11, 12, 13, 14, 15, 31 | 16, 17, 18, 19, 20, 21, 22, 23, 32 | 24, 25, 26, 27, 28, 29, 30, 31, 33 | 34 | // P1 35 | 32, 33, 34, 35, 36, 37, 38, 39, 36 | 40, 41, 42, 43, 44, 45, 46, 47, 37 | 48, 49, 50, 51, 52, 53, 54, 55, 38 | 56, 57, 58, 59, 60, 61, 62, 63 39 | }; 40 | void initVariant() 41 | { 42 | // LED1 & LED2 43 | pinMode(PIN_LED1, OUTPUT); 44 | ledOff(PIN_LED1); 45 | 46 | pinMode(PIN_LED2, OUTPUT); 47 | ledOff(PIN_LED2); 48 | } 49 | 50 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/1.1.0/variants/NINA_B112_ublox/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | This library is free software; you can redistribute it and/or 4 | modify it under the terms of the GNU Lesser General Public 5 | License as published by the Free Software Foundation; either 6 | version 2.1 of the License, or (at your option) any later version. 7 | This library is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 | See the GNU Lesser General Public License for more details. 11 | You should have received a copy of the GNU Lesser General Public 12 | License along with this library; if not, write to the Free Software 13 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 14 | */ 15 | 16 | // API compatibility 17 | #include "variant.h" 18 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/1.1.0/variants/NINA_B112_ublox/variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2016 Sandeep Mistry All right reserved. 4 | Copyright (c) 2018, Adafruit Industries (adafruit.com) 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. 14 | See the GNU 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 "variant.h" 22 | 23 | #include "wiring_constants.h" 24 | #include "wiring_digital.h" 25 | #include "nrf.h" 26 | 27 | //https://www.u-blox.com/sites/default/files/NINA-B1_DataSheet_UBX-15019243.pdf 28 | //https://www.u-blox.com/sites/default/files/EVK-NINA-B1_UserGuide_%28UBX-15028120%29_C1-Public.pdf 29 | 30 | const uint32_t g_ADigitalPinMap[] = 31 | { 32 | // D0 .. D13 33 | 5, // D0 is P0.05 (UART RX) 34 | 6, // D1 is P0.06 (UART TX) 35 | 7, // D2 is P0.07 36 | 31, // D3 is P0.31 37 | 18, // D4 is P0.18 (LED Blue) 38 | 99, // D5 (NC) 39 | 9, // D6 is P0.09 NFC1 40 | 10, // D7 is P0.10 (Button) NFC2 41 | 99, // D8 (NC) 42 | 8, // D9 is P0.08 43 | 11, // D10 is P0.11 CS 44 | 13, // D11 is P0.13 MOSI 45 | 12, // D12 is P0.12 MISO 46 | 14, // D13 is P0.14 SCK 47 | //I2C 48 | 2, // D14 is P0.2 (SDA) 49 | 3, // D15 is P0.3 (SCL) 50 | // D16 .. D21 (aka A0 .. A5) 51 | 3, // D16 is P0.03 (A0) 52 | 2, // D17 is P0.02 (A1) 53 | 4, // D18 is P0.04 (A2) 54 | 30, // D19 is P0.30 (A3) SW2 55 | 29, // D20 is P0.29 (A4) 56 | 28, // D21 is P0.28 (A5) 57 | 9, // P0.09 NFC 58 | 10, // P0.10 NFC 59 | 16, // SW1 (LED Green) 60 | }; -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/1.1.0/variants/NINA_B302_ublox/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | This library is free software; you can redistribute it and/or 4 | modify it under the terms of the GNU Lesser General Public 5 | License as published by the Free Software Foundation; either 6 | version 2.1 of the License, or (at your option) any later version. 7 | This library is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 | See the GNU Lesser General Public License for more details. 11 | You should have received a copy of the GNU Lesser General Public 12 | License along with this library; if not, write to the Free Software 13 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 14 | */ 15 | 16 | // API compatibility 17 | #include "variant.h" 18 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/1.1.0/variants/NINA_B302_ublox/variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2016 Sandeep Mistry All right reserved. 4 | Copyright (c) 2018, Adafruit Industries (adafruit.com) 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. 14 | See the GNU 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 | // Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip). 21 | // See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1) 22 | 23 | #include "variant.h" 24 | #include "wiring_constants.h" 25 | #include "wiring_digital.h" 26 | #include "nrf.h" 27 | 28 | const uint32_t g_ADigitalPinMap[] = 29 | { 30 | // D0 .. D13 31 | 29, // D0 is P0.29 (UART RX) 32 | 45, // D1 is P1.13 (UART TX) 33 | 44, // D2 is P1.12 (NFC2) 34 | 31, // D3 is P0.31 (LED1) 35 | 13, // D4 is P0.13 (LED2) 36 | 11, // D5 is P0.11 37 | 9, // D6 is P0.09 38 | 10, // D7 is P0.10 (Button) 39 | 41, // D8 is P1.09 40 | 12, // D9 is P0.12 41 | 14, // D10 is P0.14 42 | 15, // D11 is P0.15 43 | 32, // D12 is P1.00 44 | 7, // D13 is P0.07 45 | 46 | // D14 .. D21 (aka A0 .. A5) 47 | 4, // D14 is P0.04 (A0) 48 | 30, // D15 is P0.30 (A1) 49 | 5, // D16 is P0.05 (A2) 50 | 2, // D17 is P0.02 (A3) 51 | 28, // D18 is P0.28 (A4) 52 | 3, // D19 is P0.03 (A5) 53 | 54 | // D20 .. D21 (aka I2C pins) 55 | 16, // D20 is P0.16 (SDA) 56 | 24, // D21 is P0.24 (SCL) 57 | 58 | // QSPI pins (not exposed via any header / test point) 59 | 19, // D22 is P0.19 (QSPI CLK) 60 | 17, // D23 is P0.17 (QSPI CS) 61 | 20, // D24 is P0.20 (QSPI Data 0) 62 | 21, // D25 is P0.21 (QSPI Data 1) 63 | 22, // D26 is P0.22 (QSPI Data 2) 64 | 26, // D27 is P0.23 (QSPI Data 3) 65 | 66 | 40, // D28 is P1.08 - IO34 67 | 41, // D29 is P1.01 - IO35 68 | 44, // D30 is P1.02 - IO36 69 | 45, // D31 is P1.03 - IO37 70 | 42, // D32 is P1.10 - IO38 71 | 43, // D33 is P1.11 - IO39 72 | 47, // D34 is P1.15 - IO40 73 | 46, // D35 is P1.14 - IO41 74 | 26, // D36 is P0.26 - IO42 75 | 6, // D37 is P0.6 - IO43 76 | 27, // D38 is P0.27 - IO44 77 | }; 78 | 79 | void initVariant() 80 | { 81 | // LED1 & LED2 82 | pinMode(PIN_LED1, OUTPUT); 83 | ledOff(PIN_LED1); 84 | 85 | pinMode(PIN_LED2, OUTPUT); 86 | ledOff(PIN_LED2); 87 | } 88 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/1.1.0/variants/sparkfun_nrf52840_mini/variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2016 Sandeep Mistry All right reserved. 4 | Copyright (c) 2018, Adafruit Industries (adafruit.com) 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. 14 | See the GNU 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 "variant.h" 22 | #include "wiring_constants.h" 23 | #include "wiring_digital.h" 24 | #include "nrf.h" 25 | 26 | const uint32_t g_ADigitalPinMap[] = 27 | { 28 | // P0 29 | 0, 1, 2, 3, 4, 5, 6, 7, 30 | 8, 9, 10, 11, 12, 13, 14, 15, 31 | 16, 17, 18, 19, 20, 21, 22, 23, 32 | 24, 25, 26, 27, 28, 29, 30, 31, 33 | 34 | // P1 35 | 32, 33, 34, 35, 36, 37, 38, 39, 36 | 40, 41, 42, 43, 44, 45, 46, 47, 37 | 48, 49, 50, 51, 52, 53, 54, 55, 38 | 56, 57, 58, 59, 60, 61, 62, 63 39 | }; 40 | void initVariant() 41 | { 42 | // LED1 & LED2 43 | pinMode(PIN_LED1, OUTPUT); 44 | ledOff(PIN_LED1); 45 | 46 | pinMode(PIN_LED2, OUTPUT); 47 | ledOff(PIN_LED2); 48 | } 49 | 50 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/1.2.0/variants/NINA_B112_ublox/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | This library is free software; you can redistribute it and/or 4 | modify it under the terms of the GNU Lesser General Public 5 | License as published by the Free Software Foundation; either 6 | version 2.1 of the License, or (at your option) any later version. 7 | This library is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 | See the GNU Lesser General Public License for more details. 11 | You should have received a copy of the GNU Lesser General Public 12 | License along with this library; if not, write to the Free Software 13 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 14 | */ 15 | 16 | // API compatibility 17 | #include "variant.h" 18 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/1.2.0/variants/NINA_B112_ublox/variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2016 Sandeep Mistry All right reserved. 4 | Copyright (c) 2018, Adafruit Industries (adafruit.com) 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. 14 | See the GNU 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 "variant.h" 22 | 23 | #include "wiring_constants.h" 24 | #include "wiring_digital.h" 25 | #include "nrf.h" 26 | 27 | //https://www.u-blox.com/sites/default/files/NINA-B1_DataSheet_UBX-15019243.pdf 28 | //https://www.u-blox.com/sites/default/files/EVK-NINA-B1_UserGuide_%28UBX-15028120%29_C1-Public.pdf 29 | 30 | const uint32_t g_ADigitalPinMap[] = 31 | { 32 | // D0 .. D13 33 | 5, // D0 is P0.05 (UART RX) 34 | 6, // D1 is P0.06 (UART TX) 35 | 7, // D2 is P0.07 36 | 31, // D3 is P0.31 37 | 18, // D4 is P0.18 (LED Blue) 38 | 99, // D5 (NC) 39 | 9, // D6 is P0.09 NFC1 40 | 10, // D7 is P0.10 (Button) NFC2 41 | 99, // D8 (NC) 42 | 8, // D9 is P0.08 43 | 11, // D10 is P0.11 CS 44 | 13, // D11 is P0.13 MOSI 45 | 12, // D12 is P0.12 MISO 46 | 14, // D13 is P0.14 SCK 47 | //I2C 48 | 2, // D14 is P0.2 (SDA) 49 | 3, // D15 is P0.3 (SCL) 50 | // D16 .. D21 (aka A0 .. A5) 51 | 3, // D16 is P0.03 (A0) 52 | 2, // D17 is P0.02 (A1) 53 | 4, // D18 is P0.04 (A2) 54 | 30, // D19 is P0.30 (A3) SW2 55 | 29, // D20 is P0.29 (A4) 56 | 28, // D21 is P0.28 (A5) 57 | 9, // P0.09 NFC 58 | 10, // P0.10 NFC 59 | 16, // SW1 (LED Green) 60 | }; -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/1.2.0/variants/NINA_B302_ublox/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | This library is free software; you can redistribute it and/or 4 | modify it under the terms of the GNU Lesser General Public 5 | License as published by the Free Software Foundation; either 6 | version 2.1 of the License, or (at your option) any later version. 7 | This library is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 | See the GNU Lesser General Public License for more details. 11 | You should have received a copy of the GNU Lesser General Public 12 | License along with this library; if not, write to the Free Software 13 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 14 | */ 15 | 16 | // API compatibility 17 | #include "variant.h" 18 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/1.2.0/variants/NINA_B302_ublox/variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2016 Sandeep Mistry All right reserved. 4 | Copyright (c) 2018, Adafruit Industries (adafruit.com) 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. 14 | See the GNU 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 | // Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip). 21 | // See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1) 22 | 23 | #include "variant.h" 24 | #include "wiring_constants.h" 25 | #include "wiring_digital.h" 26 | #include "nrf.h" 27 | 28 | const uint32_t g_ADigitalPinMap[] = 29 | { 30 | // D0 .. D13 31 | 29, // D0 is P0.29 (UART RX) 32 | 45, // D1 is P1.13 (UART TX) 33 | 44, // D2 is P1.12 (NFC2) 34 | 31, // D3 is P0.31 (LED1) 35 | 13, // D4 is P0.13 (LED2) 36 | 11, // D5 is P0.11 37 | 9, // D6 is P0.09 38 | 10, // D7 is P0.10 (Button) 39 | 41, // D8 is P1.09 40 | 12, // D9 is P0.12 41 | 14, // D10 is P0.14 42 | 15, // D11 is P0.15 43 | 32, // D12 is P1.00 44 | 7, // D13 is P0.07 45 | 46 | // D14 .. D21 (aka A0 .. A5) 47 | 4, // D14 is P0.04 (A0) 48 | 30, // D15 is P0.30 (A1) 49 | 5, // D16 is P0.05 (A2) 50 | 2, // D17 is P0.02 (A3) 51 | 28, // D18 is P0.28 (A4) 52 | 3, // D19 is P0.03 (A5) 53 | 54 | // D20 .. D21 (aka I2C pins) 55 | 16, // D20 is P0.16 (SDA) 56 | 24, // D21 is P0.24 (SCL) 57 | 58 | // QSPI pins (not exposed via any header / test point) 59 | 19, // D22 is P0.19 (QSPI CLK) 60 | 17, // D23 is P0.17 (QSPI CS) 61 | 20, // D24 is P0.20 (QSPI Data 0) 62 | 21, // D25 is P0.21 (QSPI Data 1) 63 | 22, // D26 is P0.22 (QSPI Data 2) 64 | 26, // D27 is P0.23 (QSPI Data 3) 65 | 66 | 40, // D28 is P1.08 - IO34 67 | 41, // D29 is P1.01 - IO35 68 | 44, // D30 is P1.02 - IO36 69 | 45, // D31 is P1.03 - IO37 70 | 42, // D32 is P1.10 - IO38 71 | 43, // D33 is P1.11 - IO39 72 | 47, // D34 is P1.15 - IO40 73 | 46, // D35 is P1.14 - IO41 74 | 26, // D36 is P0.26 - IO42 75 | 6, // D37 is P0.6 - IO43 76 | 27, // D38 is P0.27 - IO44 77 | }; 78 | 79 | void initVariant() 80 | { 81 | // LED1 & LED2 82 | pinMode(PIN_LED1, OUTPUT); 83 | ledOff(PIN_LED1); 84 | 85 | pinMode(PIN_LED2, OUTPUT); 86 | ledOff(PIN_LED2); 87 | } 88 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/1.2.0/variants/sparkfun_nrf52840_mini/variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2016 Sandeep Mistry All right reserved. 4 | Copyright (c) 2018, Adafruit Industries (adafruit.com) 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. 14 | See the GNU 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 "variant.h" 22 | #include "wiring_constants.h" 23 | #include "wiring_digital.h" 24 | #include "nrf.h" 25 | 26 | const uint32_t g_ADigitalPinMap[] = 27 | { 28 | // P0 29 | 0, 1, 2, 3, 4, 5, 6, 7, 30 | 8, 9, 10, 11, 12, 13, 14, 15, 31 | 16, 17, 18, 19, 20, 21, 22, 23, 32 | 24, 25, 26, 27, 28, 29, 30, 31, 33 | 34 | // P1 35 | 32, 33, 34, 35, 36, 37, 38, 39, 36 | 40, 41, 42, 43, 44, 45, 46, 47, 37 | 48, 49, 50, 51, 52, 53, 54, 55, 38 | 56, 57, 58, 59, 60, 61, 62, 63 39 | }; 40 | void initVariant() 41 | { 42 | // LED1 & LED2 43 | pinMode(PIN_LED1, OUTPUT); 44 | ledOff(PIN_LED1); 45 | 46 | pinMode(PIN_LED2, OUTPUT); 47 | ledOff(PIN_LED2); 48 | } 49 | 50 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/1.3.0/variants/NINA_B112_ublox/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | This library is free software; you can redistribute it and/or 4 | modify it under the terms of the GNU Lesser General Public 5 | License as published by the Free Software Foundation; either 6 | version 2.1 of the License, or (at your option) any later version. 7 | This library is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 | See the GNU Lesser General Public License for more details. 11 | You should have received a copy of the GNU Lesser General Public 12 | License along with this library; if not, write to the Free Software 13 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 14 | */ 15 | 16 | // API compatibility 17 | #include "variant.h" 18 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/1.3.0/variants/NINA_B112_ublox/variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2016 Sandeep Mistry All right reserved. 4 | Copyright (c) 2018, Adafruit Industries (adafruit.com) 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. 14 | See the GNU 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 "variant.h" 22 | 23 | #include "wiring_constants.h" 24 | #include "wiring_digital.h" 25 | #include "nrf.h" 26 | 27 | //https://www.u-blox.com/sites/default/files/NINA-B1_DataSheet_UBX-15019243.pdf 28 | //https://www.u-blox.com/sites/default/files/EVK-NINA-B1_UserGuide_%28UBX-15028120%29_C1-Public.pdf 29 | 30 | const uint32_t g_ADigitalPinMap[] = 31 | { 32 | // D0 .. D13 33 | 5, // D0 is P0.05 (UART RX) 34 | 6, // D1 is P0.06 (UART TX) 35 | 7, // D2 is P0.07 36 | 31, // D3 is P0.31 37 | 18, // D4 is P0.18 (LED Blue) 38 | 99, // D5 (NC) 39 | 9, // D6 is P0.09 NFC1 40 | 10, // D7 is P0.10 (Button) NFC2 41 | 99, // D8 (NC) 42 | 8, // D9 is P0.08 43 | 11, // D10 is P0.11 CS 44 | 13, // D11 is P0.13 MOSI 45 | 12, // D12 is P0.12 MISO 46 | 14, // D13 is P0.14 SCK 47 | //I2C 48 | 2, // D14 is P0.2 (SDA) 49 | 3, // D15 is P0.3 (SCL) 50 | // D16 .. D21 (aka A0 .. A5) 51 | 3, // D16 is P0.03 (A0) 52 | 2, // D17 is P0.02 (A1) 53 | 4, // D18 is P0.04 (A2) 54 | 30, // D19 is P0.30 (A3) SW2 55 | 29, // D20 is P0.29 (A4) 56 | 28, // D21 is P0.28 (A5) 57 | 9, // P0.09 NFC 58 | 10, // P0.10 NFC 59 | 16, // SW1 (LED Green) 60 | }; -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/1.3.0/variants/NINA_B302_ublox/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | This library is free software; you can redistribute it and/or 4 | modify it under the terms of the GNU Lesser General Public 5 | License as published by the Free Software Foundation; either 6 | version 2.1 of the License, or (at your option) any later version. 7 | This library is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 | See the GNU Lesser General Public License for more details. 11 | You should have received a copy of the GNU Lesser General Public 12 | License along with this library; if not, write to the Free Software 13 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 14 | */ 15 | 16 | // API compatibility 17 | #include "variant.h" 18 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/1.3.0/variants/NINA_B302_ublox/variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2016 Sandeep Mistry All right reserved. 4 | Copyright (c) 2018, Adafruit Industries (adafruit.com) 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. 14 | See the GNU 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 | // Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip). 21 | // See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1) 22 | 23 | #include "variant.h" 24 | #include "wiring_constants.h" 25 | #include "wiring_digital.h" 26 | #include "nrf.h" 27 | 28 | const uint32_t g_ADigitalPinMap[] = 29 | { 30 | // D0 .. D13 31 | 29, // D0 is P0.29 (UART RX) 32 | 45, // D1 is P1.13 (UART TX) 33 | 44, // D2 is P1.12 (NFC2) 34 | 31, // D3 is P0.31 (LED1) 35 | 13, // D4 is P0.13 (LED2) 36 | 11, // D5 is P0.11 37 | 9, // D6 is P0.09 38 | 10, // D7 is P0.10 (Button) 39 | 41, // D8 is P1.09 40 | 12, // D9 is P0.12 41 | 14, // D10 is P0.14 42 | 15, // D11 is P0.15 43 | 32, // D12 is P1.00 44 | 7, // D13 is P0.07 45 | 46 | // D14 .. D21 (aka A0 .. A5) 47 | 4, // D14 is P0.04 (A0) 48 | 30, // D15 is P0.30 (A1) 49 | 5, // D16 is P0.05 (A2) 50 | 2, // D17 is P0.02 (A3) 51 | 28, // D18 is P0.28 (A4) 52 | 3, // D19 is P0.03 (A5) 53 | 54 | // D20 .. D21 (aka I2C pins) 55 | 16, // D20 is P0.16 (SDA) 56 | 24, // D21 is P0.24 (SCL) 57 | 58 | // QSPI pins (not exposed via any header / test point) 59 | 19, // D22 is P0.19 (QSPI CLK) 60 | 17, // D23 is P0.17 (QSPI CS) 61 | 20, // D24 is P0.20 (QSPI Data 0) 62 | 21, // D25 is P0.21 (QSPI Data 1) 63 | 22, // D26 is P0.22 (QSPI Data 2) 64 | 26, // D27 is P0.23 (QSPI Data 3) 65 | 66 | 40, // D28 is P1.08 - IO34 67 | 41, // D29 is P1.01 - IO35 68 | 44, // D30 is P1.02 - IO36 69 | 45, // D31 is P1.03 - IO37 70 | 42, // D32 is P1.10 - IO38 71 | 43, // D33 is P1.11 - IO39 72 | 47, // D34 is P1.15 - IO40 73 | 46, // D35 is P1.14 - IO41 74 | 26, // D36 is P0.26 - IO42 75 | 6, // D37 is P0.6 - IO43 76 | 27, // D38 is P0.27 - IO44 77 | }; 78 | 79 | void initVariant() 80 | { 81 | // LED1 & LED2 82 | pinMode(PIN_LED1, OUTPUT); 83 | ledOff(PIN_LED1); 84 | 85 | pinMode(PIN_LED2, OUTPUT); 86 | ledOff(PIN_LED2); 87 | } 88 | -------------------------------------------------------------------------------- /Packages_Patches/adafruit/hardware/nrf52/1.3.0/variants/sparkfun_nrf52840_mini/variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015 Arduino LLC. All right reserved. 3 | Copyright (c) 2016 Sandeep Mistry All right reserved. 4 | Copyright (c) 2018, Adafruit Industries (adafruit.com) 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. 14 | See the GNU 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 "variant.h" 22 | #include "wiring_constants.h" 23 | #include "wiring_digital.h" 24 | #include "nrf.h" 25 | 26 | const uint32_t g_ADigitalPinMap[] = 27 | { 28 | // P0 29 | 0, 1, 2, 3, 4, 5, 6, 7, 30 | 8, 9, 10, 11, 12, 13, 14, 15, 31 | 16, 17, 18, 19, 20, 21, 22, 23, 32 | 24, 25, 26, 27, 28, 29, 30, 31, 33 | 34 | // P1 35 | 32, 33, 34, 35, 36, 37, 38, 39, 36 | 40, 41, 42, 43, 44, 45, 46, 47, 37 | 48, 49, 50, 51, 52, 53, 54, 55, 38 | 56, 57, 58, 59, 60, 61, 62, 63 39 | }; 40 | void initVariant() 41 | { 42 | // LED1 & LED2 43 | pinMode(PIN_LED1, OUTPUT); 44 | ledOff(PIN_LED1); 45 | 46 | pinMode(PIN_LED2, OUTPUT); 47 | ledOff(PIN_LED2); 48 | } 49 | 50 | -------------------------------------------------------------------------------- /Packages_Patches/arduino/hardware/mbed_portenta/2.4.1/portenta_post_install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | portenta_h7_rules () { 4 | echo "" 5 | echo "# Portenta H7 bootloader mode UDEV rules" 6 | echo "" 7 | cat < /etc/udev/rules.d/49-portenta_h7.rules 18 | 19 | # reload udev rules 20 | echo "Reload rules..." 21 | udevadm trigger 22 | udevadm control --reload-rules 23 | -------------------------------------------------------------------------------- /Packages_Patches/arduino/hardware/mbed_portenta/2.5.2/portenta_post_install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | portenta_h7_rules () { 4 | echo "" 5 | echo "# Portenta H7 bootloader mode UDEV rules" 6 | echo "" 7 | cat < /etc/udev/rules.d/49-portenta_h7.rules 18 | 19 | # reload udev rules 20 | echo "Reload rules..." 21 | udevadm trigger 22 | udevadm control --reload-rules 23 | -------------------------------------------------------------------------------- /Packages_Patches/arduino/hardware/mbed_portenta/2.6.1/portenta_post_install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | portenta_h7_rules () { 4 | echo "" 5 | echo "# Portenta H7 bootloader mode UDEV rules" 6 | echo "" 7 | cat < /etc/udev/rules.d/49-portenta_h7.rules 18 | 19 | # reload udev rules 20 | echo "Reload rules..." 21 | udevadm trigger 22 | udevadm control --reload-rules 23 | -------------------------------------------------------------------------------- /Packages_Patches/arduino/hardware/mbed_portenta/2.7.2/portenta_post_install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | portenta_h7_rules () { 4 | echo "" 5 | echo "# Portenta H7 bootloader mode UDEV rules" 6 | echo "" 7 | cat < /etc/udev/rules.d/49-portenta_h7.rules 18 | 19 | # reload udev rules 20 | echo "Reload rules..." 21 | udevadm trigger 22 | udevadm control --reload-rules 23 | -------------------------------------------------------------------------------- /Packages_Patches/arduino/hardware/mbed_portenta/2.8.0/portenta_post_install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | portenta_h7_rules () { 4 | echo "" 5 | echo "# Portenta H7 bootloader mode UDEV rules" 6 | echo "" 7 | cat < /etc/udev/rules.d/49-portenta_h7.rules 18 | 19 | # reload udev rules 20 | echo "Reload rules..." 21 | udevadm trigger 22 | udevadm control --reload-rules 23 | -------------------------------------------------------------------------------- /Packages_Patches/arduino/hardware/mbed_portenta/3.0.0/portenta_post_install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | portenta_h7_rules () { 4 | echo "" 5 | echo "# Portenta H7 bootloader mode UDEV rules" 6 | echo "" 7 | cat < /etc/udev/rules.d/49-portenta_h7.rules 18 | 19 | # reload udev rules 20 | echo "Reload rules..." 21 | udevadm trigger 22 | udevadm control --reload-rules 23 | -------------------------------------------------------------------------------- /Packages_Patches/arduino/hardware/mbed_portenta/3.0.1/portenta_post_install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | portenta_h7_rules () { 4 | echo "" 5 | echo "# Portenta H7 bootloader mode UDEV rules" 6 | echo "" 7 | cat < /etc/udev/rules.d/49-portenta_h7.rules 18 | 19 | # reload udev rules 20 | echo "Reload rules..." 21 | udevadm trigger 22 | udevadm control --reload-rules 23 | -------------------------------------------------------------------------------- /Packages_Patches/arduino/hardware/mbed_portenta/3.1.1/portenta_post_install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | portenta_h7_rules () { 4 | echo "" 5 | echo "# Portenta H7 bootloader mode UDEV rules" 6 | echo "" 7 | cat < /etc/udev/rules.d/49-portenta_h7.rules 18 | 19 | # reload udev rules 20 | echo "Reload rules..." 21 | udevadm trigger 22 | udevadm control --reload-rules 23 | -------------------------------------------------------------------------------- /Packages_Patches/arduino/hardware/mbed_portenta/3.3.0/portenta_post_install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | portenta_h7_rules () { 4 | echo "" 5 | echo "# Portenta H7 bootloader mode UDEV rules" 6 | echo "" 7 | cat < /etc/udev/rules.d/49-portenta_h7.rules 18 | 19 | # reload udev rules 20 | echo "Reload rules..." 21 | udevadm trigger 22 | udevadm control --reload-rules 23 | -------------------------------------------------------------------------------- /Packages_Patches/arduino/hardware/mbed_portenta/3.4.1/portenta_post_install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | portenta_h7_rules () { 4 | echo "" 5 | echo "# Portenta H7 bootloader mode UDEV rules" 6 | echo "" 7 | cat < /etc/udev/rules.d/49-portenta_h7.rules 18 | 19 | # reload udev rules 20 | echo "Reload rules..." 21 | udevadm trigger 22 | udevadm control --reload-rules 23 | -------------------------------------------------------------------------------- /examples/ESP/AirQualitySensor/AirQualitySensor_GP2Y1014AU0F/AirQualitySensor_GP2Y1014AU0F.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khoih-prog/SinricPro_Generic/3f4e17eb2844e47914405cb1a02016d9ee6cbff2/examples/ESP/AirQualitySensor/AirQualitySensor_GP2Y1014AU0F/AirQualitySensor_GP2Y1014AU0F.jpg -------------------------------------------------------------------------------- /examples/ESP/Light/RGB_LED_Stripe_5050/RGB_LED_Stripe_5050.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khoih-prog/SinricPro_Generic/3f4e17eb2844e47914405cb1a02016d9ee6cbff2/examples/ESP/Light/RGB_LED_Stripe_5050/RGB_LED_Stripe_5050.png -------------------------------------------------------------------------------- /examples/ESP/Switch/MultiSwitch_advance_tactile-button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khoih-prog/SinricPro_Generic/3f4e17eb2844e47914405cb1a02016d9ee6cbff2/examples/ESP/Switch/MultiSwitch_advance_tactile-button.png -------------------------------------------------------------------------------- /examples/ESP/Switch/MutliSwitch_advance_toggle-switch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khoih-prog/SinricPro_Generic/3f4e17eb2844e47914405cb1a02016d9ee6cbff2/examples/ESP/Switch/MutliSwitch_advance_toggle-switch.png -------------------------------------------------------------------------------- /examples/ESP/temperaturesensor/DHT22_Wiring.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khoih-prog/SinricPro_Generic/3f4e17eb2844e47914405cb1a02016d9ee6cbff2/examples/ESP/temperaturesensor/DHT22_Wiring.png -------------------------------------------------------------------------------- /examples/ESP/temperaturesensor/README.md: -------------------------------------------------------------------------------- 1 | # Temperature Sensor Example 2 | ![Wiring](https://github.com/sinricpro/esp8266-esp32-sdk/raw/master/examples/temperaturesensor/DHT22_Wiring.png) 3 | 4 | D5: connected to DHT22 signal and via 10k resistor to +3.3V 5 | -------------------------------------------------------------------------------- /examples/Generic/AirQualitySensor/AirQualitySensor_GP2Y1014AU0F.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khoih-prog/SinricPro_Generic/3f4e17eb2844e47914405cb1a02016d9ee6cbff2/examples/Generic/AirQualitySensor/AirQualitySensor_GP2Y1014AU0F.jpg -------------------------------------------------------------------------------- /examples/Generic/AirQualitySensor/WIO_Terminal_AQSensor/defines.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | defines.h 3 | For WIO Terminal boards, running RTL8720DN WiFi, using Seeed_Arduino_rpcWiFi and Seeed_Arduino_rpcUnified libraries 4 | 5 | Based on and modified from SinricPro libarary (https://github.com/sinricpro/) 6 | to support other boards such as SAMD21, SAMD51, Adafruit's nRF52 boards, etc. 7 | 8 | Built by Khoi Hoang https://github.com/khoih-prog/SinricPro_Generic 9 | Licensed under MIT license 10 | 11 | Copyright (c) 2019 Sinric. All rights reserved. 12 | Licensed under Creative Commons Attribution-Share Alike (CC BY-SA) 13 | 14 | This file is part of the Sinric Pro (https://github.com/sinricpro/) 15 | **********************************************************************************************************************************/ 16 | 17 | #ifndef defines_h 18 | #define defines_h 19 | 20 | #define SINRIC_PRO_USING_RTL8720DN true 21 | 22 | #define WEBSOCKETS_NETWORK_TYPE NETWORK_RTL8720DN 23 | 24 | #if !defined(SEEED_WIO_TERMINAL) 25 | #error This code is intended to run on the SEEED_WIO_TERMINAL ! Please check your Tools->Board setting. 26 | #endif 27 | 28 | #warning Using SEEED_WIO_TERMINAL 29 | 30 | #define SRP_DEBUG_PORT Serial 31 | 32 | // Debug Level from 0 to 4 33 | #define _SRP_LOGLEVEL_ 1 34 | 35 | // Uncomment the following line to enable serial debug output 36 | #define ENABLE_DEBUG true 37 | 38 | #if ENABLE_DEBUG 39 | #define DEBUG_PORT Serial 40 | #define NODEBUG_WEBSOCKETS 41 | #define NDEBUG 42 | #endif 43 | 44 | #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" 45 | 46 | #ifndef BOARD_NAME 47 | #define BOARD_NAME BOARD_TYPE 48 | #endif 49 | 50 | #include 51 | 52 | // Select the IP address according to your local network 53 | IPAddress ip(192, 168, 2, 222); 54 | 55 | #define WIFI_SSID "YOUR-WIFI-SSID" 56 | #define WIFI_PASS "YOUR-WIFI-PASSWORD" 57 | 58 | #define APP_KEY "YOUR-APP-KEY" // Should look like "de0bxxxx-1x3x-4x3x-ax2x-5dabxxxxxxxx" 59 | #define APP_SECRET "YOUR-APP-SECRET" // Should look like "5f36xxxx-x3x7-4x3x-xexe-e86724a9xxxx-4c4axxxx-3x3x-x5xe-x9x3-333d65xxxxxx" 60 | 61 | #define DEVICE_ID "YOUR-DEVICE-ID" // Should look like "5dc1564130xxxxxxxxxxxxxx" 62 | 63 | #define BAUD_RATE 115200 // Change baudrate to your need 64 | 65 | #endif //defines_h 66 | -------------------------------------------------------------------------------- /examples/Generic/AirQualitySensor/WIO_Terminal_AQSensor_GP2Y1014AU0F/defines.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | defines.h 3 | For WIO Terminal boards, running RTL8720DN WiFi, using Seeed_Arduino_rpcWiFi and Seeed_Arduino_rpcUnified libraries 4 | 5 | Based on and modified from SinricPro libarary (https://github.com/sinricpro/) 6 | to support other boards such as SAMD21, SAMD51, Adafruit's nRF52 boards, etc. 7 | 8 | Built by Khoi Hoang https://github.com/khoih-prog/SinricPro_Generic 9 | Licensed under MIT license 10 | 11 | Copyright (c) 2019 Sinric. All rights reserved. 12 | Licensed under Creative Commons Attribution-Share Alike (CC BY-SA) 13 | 14 | This file is part of the Sinric Pro (https://github.com/sinricpro/) 15 | **********************************************************************************************************************************/ 16 | 17 | #ifndef defines_h 18 | #define defines_h 19 | 20 | #define SINRIC_PRO_USING_RTL8720DN true 21 | 22 | #define WEBSOCKETS_NETWORK_TYPE NETWORK_RTL8720DN 23 | 24 | #if !defined(SEEED_WIO_TERMINAL) 25 | #error This code is intended to run on the SEEED_WIO_TERMINAL ! Please check your Tools->Board setting. 26 | #endif 27 | 28 | #warning Using SEEED_WIO_TERMINAL 29 | 30 | #define SRP_DEBUG_PORT Serial 31 | 32 | // Debug Level from 0 to 4 33 | #define _SRP_LOGLEVEL_ 1 34 | 35 | // Uncomment the following line to enable serial debug output 36 | #define ENABLE_DEBUG true 37 | 38 | #if ENABLE_DEBUG 39 | #define DEBUG_PORT Serial 40 | #define NODEBUG_WEBSOCKETS 41 | #define NDEBUG 42 | #endif 43 | 44 | #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" 45 | 46 | #ifndef BOARD_NAME 47 | #define BOARD_NAME BOARD_TYPE 48 | #endif 49 | 50 | #include 51 | 52 | // Select the IP address according to your local network 53 | IPAddress ip(192, 168, 2, 222); 54 | 55 | #define WIFI_SSID "YOUR-WIFI-SSID" 56 | #define WIFI_PASS "YOUR-WIFI-PASSWORD" 57 | 58 | #define APP_KEY "YOUR-APP-KEY" // Should look like "de0bxxxx-1x3x-4x3x-ax2x-5dabxxxxxxxx" 59 | #define APP_SECRET "YOUR-APP-SECRET" // Should look like "5f36xxxx-x3x7-4x3x-xexe-e86724a9xxxx-4c4axxxx-3x3x-x5xe-x9x3-333d65xxxxxx" 60 | 61 | #define DEVICE_ID "YOUR-DEVICE-ID" // Should look like "5dc1564130xxxxxxxxxxxxxx" 62 | 63 | #define BAUD_RATE 115200 // Change baudrate to your need 64 | 65 | #endif //defines_h 66 | -------------------------------------------------------------------------------- /examples/Generic/Blinds/WIO_Terminal_Blinds/defines.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | defines.h 3 | For WIO Terminal boards, running RTL8720DN WiFi, using Seeed_Arduino_rpcWiFi and Seeed_Arduino_rpcUnified libraries 4 | 5 | Based on and modified from SinricPro libarary (https://github.com/sinricpro/) 6 | to support other boards such as SAMD21, SAMD51, Adafruit's nRF52 boards, etc. 7 | 8 | Built by Khoi Hoang https://github.com/khoih-prog/SinricPro_Generic 9 | Licensed under MIT license 10 | 11 | Copyright (c) 2019 Sinric. All rights reserved. 12 | Licensed under Creative Commons Attribution-Share Alike (CC BY-SA) 13 | 14 | This file is part of the Sinric Pro (https://github.com/sinricpro/) 15 | 16 | **********************************************************************************************************************************/ 17 | 18 | #ifndef defines_h 19 | #define defines_h 20 | 21 | #define SINRIC_PRO_USING_RTL8720DN true 22 | 23 | #define WEBSOCKETS_NETWORK_TYPE NETWORK_RTL8720DN 24 | 25 | #if !defined(SEEED_WIO_TERMINAL) 26 | #error This code is intended to run on the SEEED_WIO_TERMINAL ! Please check your Tools->Board setting. 27 | #endif 28 | 29 | #warning Using SEEED_WIO_TERMINAL 30 | 31 | #define SRP_DEBUG_PORT Serial 32 | 33 | // Debug Level from 0 to 4 34 | #define _SRP_LOGLEVEL_ 1 35 | 36 | // Uncomment the following line to enable serial debug output 37 | #define ENABLE_DEBUG true 38 | 39 | #if ENABLE_DEBUG 40 | #define DEBUG_PORT Serial 41 | #define NODEBUG_WEBSOCKETS 42 | #define NDEBUG 43 | #endif 44 | 45 | #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" 46 | 47 | #ifndef BOARD_NAME 48 | #define BOARD_NAME BOARD_TYPE 49 | #endif 50 | 51 | #include 52 | 53 | // Select the IP address according to your local network 54 | IPAddress ip(192, 168, 2, 222); 55 | 56 | #define WIFI_SSID "YOUR-WIFI-SSID" 57 | #define WIFI_PASS "YOUR-WIFI-PASSWORD" 58 | 59 | #define APP_KEY "YOUR-APP-KEY" // Should look like "de0bxxxx-1x3x-4x3x-ax2x-5dabxxxxxxxx" 60 | #define APP_SECRET "YOUR-APP-SECRET" // Should look like "5f36xxxx-x3x7-4x3x-xexe-e86724a9xxxx-4c4axxxx-3x3x-x5xe-x9x3-333d65xxxxxx" 61 | 62 | #define BLINDS_ID "YOUR-DEVICE-ID" // Should look like "5dc1564130xxxxxxxxxxxxxx" 63 | 64 | #define BAUD_RATE 115200 // Change baudrate to your need 65 | 66 | #endif //defines_h 67 | -------------------------------------------------------------------------------- /examples/Generic/Blinds/nRF52_WiFiNINA_Blinds/nRF52_WiFiNINA_Blinds.ino: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | nRF52_WiFiNINA_Blinds.ino 3 | For Adafruit nRF52 boards, running WiFiNINA 4 | 5 | Based on and modified from SinricPro libarary (https://github.com/sinricpro/) 6 | to support other boards such as SAMD21, SAMD51, Adafruit's nRF52 boards, etc. 7 | 8 | Built by Khoi Hoang https://github.com/khoih-prog/SinricPro_Generic 9 | Licensed under MIT license 10 | **********************************************************************************************************************************/ 11 | 12 | #include "defines.h" 13 | 14 | #include "SinricPro_Generic.h" 15 | #include "SinricProBlinds.h" 16 | 17 | int blindsPosition = 0; 18 | bool powerState = false; 19 | 20 | bool onPowerState(const String &deviceId, bool &state) 21 | { 22 | Serial.println("Device " + deviceId + " power turned " + String(state ? "on" : "off")); 23 | 24 | powerState = state; 25 | return true; // request handled properly 26 | } 27 | 28 | bool onSetPosition(const String &deviceId, int &position) 29 | { 30 | Serial.println("Device " + deviceId + " set position to " + String(position)); 31 | 32 | return true; // request handled properly 33 | } 34 | 35 | bool onAdjustPosition(const String &deviceId, int &positionDelta) 36 | { 37 | blindsPosition += positionDelta; 38 | 39 | Serial.println("Device " + deviceId + " position changed about " + String(positionDelta) + " to " + String( 40 | blindsPosition)); 41 | 42 | positionDelta = blindsPosition; // calculate and return absolute position 43 | return true; // request handled properly 44 | } 45 | 46 | 47 | // setup function for WiFi connection 48 | void setupWiFi() 49 | { 50 | Serial.print("\n[Wifi]: Connecting"); 51 | WiFi.begin(WIFI_SSID, WIFI_PASS); 52 | 53 | while (WiFi.status() != WL_CONNECTED) 54 | { 55 | Serial.print("."); 56 | delay(250); 57 | } 58 | 59 | Serial.print("[WiFi]: IP-Address is "); 60 | Serial.println(WiFi.localIP()); 61 | } 62 | 63 | void setupSinricPro() 64 | { 65 | // get a new Blinds device from SinricPro 66 | SinricProBlinds &myBlinds = SinricPro[BLINDS_ID]; 67 | myBlinds.onPowerState(onPowerState); 68 | myBlinds.onSetPosition(onSetPosition); 69 | myBlinds.onAdjustPosition(onAdjustPosition); 70 | 71 | // setup SinricPro 72 | SinricPro.onConnected([]() 73 | { 74 | Serial.println("Connected to SinricPro"); 75 | }); 76 | 77 | SinricPro.onDisconnected([]() 78 | { 79 | Serial.println("Disconnected from SinricPro"); 80 | }); 81 | 82 | SinricPro.begin(APP_KEY, APP_SECRET); 83 | } 84 | 85 | // main setup function 86 | void setup() 87 | { 88 | Serial.begin(BAUD_RATE); 89 | 90 | while (!Serial); 91 | 92 | Serial.println("\nStarting nRF52_WiFiNINA_Blinds on " + String(BOARD_NAME)); 93 | Serial.println("Version : " + String(SINRICPRO_VERSION_STR)); 94 | 95 | setupWiFi(); 96 | setupSinricPro(); 97 | } 98 | 99 | void loop() 100 | { 101 | SinricPro.handle(); 102 | } 103 | -------------------------------------------------------------------------------- /examples/Generic/ContactSensor/WIO_Terminal_ContactSensor/defines.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | defines.h 3 | For WIO Terminal boards, running RTL8720DN WiFi, using Seeed_Arduino_rpcWiFi and Seeed_Arduino_rpcUnified libraries 4 | 5 | Based on and modified from SinricPro libarary (https://github.com/sinricpro/) 6 | to support other boards such as SAMD21, SAMD51, Adafruit's nRF52 boards, etc. 7 | 8 | Built by Khoi Hoang https://github.com/khoih-prog/SinricPro_Generic 9 | Licensed under MIT license 10 | 11 | Copyright (c) 2019 Sinric. All rights reserved. 12 | Licensed under Creative Commons Attribution-Share Alike (CC BY-SA) 13 | 14 | This file is part of the Sinric Pro (https://github.com/sinricpro/) 15 | **********************************************************************************************************************************/ 16 | 17 | #ifndef defines_h 18 | #define defines_h 19 | 20 | #define SINRIC_PRO_USING_RTL8720DN true 21 | 22 | #define WEBSOCKETS_NETWORK_TYPE NETWORK_RTL8720DN 23 | 24 | #if !defined(SEEED_WIO_TERMINAL) 25 | #error This code is intended to run on the SEEED_WIO_TERMINAL ! Please check your Tools->Board setting. 26 | #endif 27 | 28 | #warning Using SEEED_WIO_TERMINAL 29 | 30 | #define SRP_DEBUG_PORT Serial 31 | 32 | // Debug Level from 0 to 4 33 | #define _SRP_LOGLEVEL_ 1 34 | 35 | // Uncomment the following line to enable serial debug output 36 | #define ENABLE_DEBUG true 37 | 38 | #if ENABLE_DEBUG 39 | #define DEBUG_PORT Serial 40 | #define NODEBUG_WEBSOCKETS 41 | #define NDEBUG 42 | #endif 43 | 44 | #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" 45 | 46 | #ifndef BOARD_NAME 47 | #define BOARD_NAME BOARD_TYPE 48 | #endif 49 | 50 | #include 51 | 52 | // Select the IP address according to your local network 53 | IPAddress ip(192, 168, 2, 222); 54 | 55 | #define WIFI_SSID "YOUR-WIFI-SSID" 56 | #define WIFI_PASS "YOUR-WIFI-PASSWORD" 57 | 58 | #define APP_KEY "YOUR-APP-KEY" // Should look like "de0bxxxx-1x3x-4x3x-ax2x-5dabxxxxxxxx" 59 | #define APP_SECRET "YOUR-APP-SECRET" // Should look like "5f36xxxx-x3x7-4x3x-xexe-e86724a9xxxx-4c4axxxx-3x3x-x5xe-x9x3-333d65xxxxxx" 60 | 61 | #define CONTACT_ID "YOUR-DEVICE-ID" // Should look like "5dc1564130xxxxxxxxxxxxxx" 62 | 63 | #define BAUD_RATE 115200 // Change baudrate to your need 64 | 65 | 66 | #define CONTACT_PIN 5 // PIN where contactsensor is connected to 67 | // LOW = contact is open 68 | // HIGH = contact is closed 69 | 70 | #endif //defines_h 71 | -------------------------------------------------------------------------------- /examples/Generic/DimSwitch/WIO_Terminal_DimSwitch/defines.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | defines.h 3 | For WIO Terminal boards, running RTL8720DN WiFi, using Seeed_Arduino_rpcWiFi and Seeed_Arduino_rpcUnified libraries 4 | 5 | Based on and modified from SinricPro libarary (https://github.com/sinricpro/) 6 | to support other boards such as SAMD21, SAMD51, Adafruit's nRF52 boards, etc. 7 | 8 | Built by Khoi Hoang https://github.com/khoih-prog/SinricPro_Generic 9 | Licensed under MIT license 10 | 11 | Copyright (c) 2019 Sinric. All rights reserved. 12 | Licensed under Creative Commons Attribution-Share Alike (CC BY-SA) 13 | 14 | This file is part of the Sinric Pro (https://github.com/sinricpro/) 15 | **********************************************************************************************************************************/ 16 | 17 | #ifndef defines_h 18 | #define defines_h 19 | 20 | #define SINRIC_PRO_USING_RTL8720DN true 21 | 22 | #define WEBSOCKETS_NETWORK_TYPE NETWORK_RTL8720DN 23 | 24 | #if !defined(SEEED_WIO_TERMINAL) 25 | #error This code is intended to run on the SEEED_WIO_TERMINAL ! Please check your Tools->Board setting. 26 | #endif 27 | 28 | #warning Using SEEED_WIO_TERMINAL 29 | 30 | #define SRP_DEBUG_PORT Serial 31 | 32 | // Debug Level from 0 to 4 33 | #define _SRP_LOGLEVEL_ 1 34 | 35 | // Uncomment the following line to enable serial debug output 36 | #define ENABLE_DEBUG true 37 | 38 | #if ENABLE_DEBUG 39 | #define DEBUG_PORT Serial 40 | #define NODEBUG_WEBSOCKETS 41 | #define NDEBUG 42 | #endif 43 | 44 | #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" 45 | 46 | #ifndef BOARD_NAME 47 | #define BOARD_NAME BOARD_TYPE 48 | #endif 49 | 50 | #include 51 | 52 | // Select the IP address according to your local network 53 | IPAddress ip(192, 168, 2, 222); 54 | 55 | #define WIFI_SSID "YOUR-WIFI-SSID" 56 | #define WIFI_PASS "YOUR-WIFI-PASSWORD" 57 | 58 | #define APP_KEY "YOUR-APP-KEY" // Should look like "de0bxxxx-1x3x-4x3x-ax2x-5dabxxxxxxxx" 59 | #define APP_SECRET "YOUR-APP-SECRET" // Should look like "5f36xxxx-x3x7-4x3x-xexe-e86724a9xxxx-4c4axxxx-3x3x-x5xe-x9x3-333d65xxxxxx" 60 | 61 | #define DIMSWITCH_ID "YOUR-DEVICE-ID" // Should look like "5dc1564130xxxxxxxxxxxxxx" 62 | 63 | #define BAUD_RATE 115200 // Change baudrate to your need 64 | 65 | #endif //defines_h 66 | -------------------------------------------------------------------------------- /examples/Generic/DoorBell/WIO_Terminal_DoorBell/defines.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | defines.h 3 | For WIO Terminal boards, running RTL8720DN WiFi, using Seeed_Arduino_rpcWiFi and Seeed_Arduino_rpcUnified libraries 4 | 5 | Based on and modified from SinricPro libarary (https://github.com/sinricpro/) 6 | to support other boards such as SAMD21, SAMD51, Adafruit's nRF52 boards, etc. 7 | 8 | Built by Khoi Hoang https://github.com/khoih-prog/SinricPro_Generic 9 | Licensed under MIT license 10 | 11 | Copyright (c) 2019 Sinric. All rights reserved. 12 | Licensed under Creative Commons Attribution-Share Alike (CC BY-SA) 13 | 14 | This file is part of the Sinric Pro (https://github.com/sinricpro/) 15 | **********************************************************************************************************************************/ 16 | 17 | #ifndef defines_h 18 | #define defines_h 19 | 20 | #define SINRIC_PRO_USING_RTL8720DN true 21 | 22 | #define WEBSOCKETS_NETWORK_TYPE NETWORK_RTL8720DN 23 | 24 | #if !defined(SEEED_WIO_TERMINAL) 25 | #error This code is intended to run on the SEEED_WIO_TERMINAL ! Please check your Tools->Board setting. 26 | #endif 27 | 28 | #warning Using SEEED_WIO_TERMINAL 29 | 30 | #define SRP_DEBUG_PORT Serial 31 | 32 | // Debug Level from 0 to 4 33 | #define _SRP_LOGLEVEL_ 1 34 | 35 | // Uncomment the following line to enable serial debug output 36 | #define ENABLE_DEBUG true 37 | 38 | #if ENABLE_DEBUG 39 | #define DEBUG_PORT Serial 40 | #define NODEBUG_WEBSOCKETS 41 | #define NDEBUG 42 | #endif 43 | 44 | #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" 45 | 46 | #ifndef BOARD_NAME 47 | #define BOARD_NAME BOARD_TYPE 48 | #endif 49 | 50 | #include 51 | 52 | // Select the IP address according to your local network 53 | IPAddress ip(192, 168, 2, 222); 54 | 55 | #define WIFI_SSID "YOUR-WIFI-SSID" 56 | #define WIFI_PASS "YOUR-WIFI-PASSWORD" 57 | 58 | #define APP_KEY "YOUR-APP-KEY" // Should look like "de0bxxxx-1x3x-4x3x-ax2x-5dabxxxxxxxx" 59 | #define APP_SECRET "YOUR-APP-SECRET" // Should look like "5f36xxxx-x3x7-4x3x-xexe-e86724a9xxxx-4c4axxxx-3x3x-x5xe-x9x3-333d65xxxxxx" 60 | 61 | #define DOORBELL_ID "YOUR-DEVICE-ID" // Should look like "5dc1564130xxxxxxxxxxxxxx" 62 | #define BAUD_RATE 115200 // Change baudrate to your need 63 | 64 | // change this to your button PIN 65 | #define BUTTON_PIN 5 66 | 67 | #endif //defines_h 68 | -------------------------------------------------------------------------------- /examples/Generic/Fan/WIO_Terminal_Fan/defines.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | defines.h 3 | For WIO Terminal boards, running RTL8720DN WiFi, using Seeed_Arduino_rpcWiFi and Seeed_Arduino_rpcUnified libraries 4 | 5 | Based on and modified from SinricPro libarary (https://github.com/sinricpro/) 6 | to support other boards such as SAMD21, SAMD51, Adafruit's nRF52 boards, etc. 7 | 8 | Built by Khoi Hoang https://github.com/khoih-prog/SinricPro_Generic 9 | Licensed under MIT license 10 | 11 | Copyright (c) 2019 Sinric. All rights reserved. 12 | Licensed under Creative Commons Attribution-Share Alike (CC BY-SA) 13 | 14 | This file is part of the Sinric Pro (https://github.com/sinricpro/) 15 | **********************************************************************************************************************************/ 16 | 17 | #ifndef defines_h 18 | #define defines_h 19 | 20 | #define SINRIC_PRO_USING_RTL8720DN true 21 | 22 | #define WEBSOCKETS_NETWORK_TYPE NETWORK_RTL8720DN 23 | 24 | #if !defined(SEEED_WIO_TERMINAL) 25 | #error This code is intended to run on the SEEED_WIO_TERMINAL ! Please check your Tools->Board setting. 26 | #endif 27 | 28 | #warning Using SEEED_WIO_TERMINAL 29 | 30 | #define SRP_DEBUG_PORT Serial 31 | 32 | // Debug Level from 0 to 4 33 | #define _SRP_LOGLEVEL_ 1 34 | 35 | // Uncomment the following line to enable serial debug output 36 | #define ENABLE_DEBUG true 37 | 38 | #if ENABLE_DEBUG 39 | #define DEBUG_PORT Serial 40 | #define NODEBUG_WEBSOCKETS 41 | #define NDEBUG 42 | #endif 43 | 44 | #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" 45 | 46 | #ifndef BOARD_NAME 47 | #define BOARD_NAME BOARD_TYPE 48 | #endif 49 | 50 | #include 51 | 52 | // Select the IP address according to your local network 53 | IPAddress ip(192, 168, 2, 222); 54 | 55 | #define WIFI_SSID "YOUR-WIFI-SSID" 56 | #define WIFI_PASS "YOUR-WIFI-PASSWORD" 57 | 58 | #define APP_KEY "YOUR-APP-KEY" // Should look like "de0bxxxx-1x3x-4x3x-ax2x-5dabxxxxxxxx" 59 | #define APP_SECRET "YOUR-APP-SECRET" // Should look like "5f36xxxx-x3x7-4x3x-xexe-e86724a9xxxx-4c4axxxx-3x3x-x5xe-x9x3-333d65xxxxxx" 60 | 61 | #define FAN_ID "YOUR-DEVICE-ID" // Should look like "5dc1564130xxxxxxxxxxxxxx" 62 | #define BAUD_RATE 115200 // Change baudrate to your need 63 | 64 | #endif //defines_h 65 | -------------------------------------------------------------------------------- /examples/Generic/GarageDoor/Generic_WiFiNINA_GarageDoor/Generic_WiFiNINA_GarageDoor.ino: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | Generic_WiFiNINA_GarageDoor.ino 3 | For Generic boards, running WiFiNINA 4 | 5 | Based on and modified from SinricPro libarary (https://github.com/sinricpro/) 6 | to support other boards such as SAMD21, SAMD51, Adafruit's nRF52 boards, etc. 7 | 8 | Built by Khoi Hoang https://github.com/khoih-prog/SinricPro_Generic 9 | Licensed under MIT license 10 | 11 | Copyright (c) 2019 Sinric. All rights reserved. 12 | Licensed under Creative Commons Attribution-Share Alike (CC BY-SA) 13 | 14 | This file is part of the Sinric Pro (https://github.com/sinricpro/) 15 | **********************************************************************************************************************************/ 16 | 17 | // STM32 Boards supported: Nucleo-144, Nucleo-64, Nucleo-32, Discovery, STM32F1, STM32F3, STM32F4, STM32H7, STM32L0, etc. 18 | // SAM DUE 19 | // Teensy 4.1, 4.0, 3.6, 3.5, 3.2/3.1, 3.0 20 | 21 | #include "defines.h" 22 | 23 | #include "SinricPro_Generic.h" 24 | #include "SinricProGarageDoor.h" 25 | 26 | bool onDoorState(const String& deviceId, bool &doorState) 27 | { 28 | Serial.print("Garage Door is now "); 29 | Serial.println(doorState ? "closed" : "open"); 30 | 31 | digitalWrite(LED_PIN, doorState ? LOW : HIGH); 32 | return true; 33 | } 34 | 35 | // setup function for WiFi connection 36 | void setupWiFi() 37 | { 38 | Serial.println("\n[Wifi]: Connecting"); 39 | WiFi.begin(WIFI_SSID, WIFI_PASS); 40 | 41 | while (WiFi.status() != WL_CONNECTED) 42 | { 43 | Serial.print("."); 44 | delay(250); 45 | } 46 | 47 | Serial.print("\n[WiFi]: IP-Address is "); 48 | Serial.println(WiFi.localIP()); 49 | } 50 | 51 | void setupSinricPro() 52 | { 53 | SinricProGarageDoor &myGarageDoor = SinricPro[GARAGEDOOR_ID]; 54 | myGarageDoor.onDoorState(onDoorState); 55 | 56 | // setup SinricPro 57 | SinricPro.onConnected([]() 58 | { 59 | Serial.println("Connected to SinricPro"); 60 | }); 61 | 62 | SinricPro.onDisconnected([]() 63 | { 64 | Serial.println("Disconnected from SinricPro"); 65 | }); 66 | 67 | SinricPro.begin(APP_KEY, APP_SECRET); 68 | } 69 | 70 | // main setup function 71 | void setup() 72 | { 73 | pinMode(LED_PIN, OUTPUT); // define LED GPIO as output 74 | digitalWrite(LED_PIN, LOW); // turn off LED on bootup 75 | 76 | Serial.begin(BAUD_RATE); 77 | 78 | while (!Serial); 79 | 80 | Serial.println("\nStarting Generic_WiFiNINA_GarageDoor on " + String(BOARD_NAME)); 81 | Serial.println("Version : " + String(SINRICPRO_VERSION_STR)); 82 | 83 | setupWiFi(); 84 | setupSinricPro(); 85 | } 86 | 87 | void loop() 88 | { 89 | SinricPro.handle(); 90 | } 91 | -------------------------------------------------------------------------------- /examples/Generic/GarageDoor/SAMD_WiFiNINA_GarageDoor/SAMD_WiFiNINA_GarageDoor.ino: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | SAMD_WiFiNINA_GarageDoor.ino 3 | For Arduino SAMD21, Adafruit SAMD21, SAMD51 boards, running WiFiNINA 4 | 5 | Based on and modified from SinricPro libarary (https://github.com/sinricpro/) 6 | to support other boards such as SAMD21, SAMD51, Adafruit's nRF52 boards, etc. 7 | 8 | Built by Khoi Hoang https://github.com/khoih-prog/SinricPro_Generic 9 | Licensed under MIT license 10 | 11 | Copyright (c) 2019 Sinric. All rights reserved. 12 | Licensed under Creative Commons Attribution-Share Alike (CC BY-SA) 13 | 14 | This file is part of the Sinric Pro (https://github.com/sinricpro/) 15 | **********************************************************************************************************************************/ 16 | 17 | // STM32 Boards supported: Nucleo-144, Nucleo-64, Nucleo-32, Discovery, STM32F1, STM32F3, STM32F4, STM32H7, STM32L0, etc. 18 | // SAM DUE 19 | // Teensy 4.1, 4.0, 3.6, 3.5, 3.2/3.1, 3.0 20 | 21 | #include "defines.h" 22 | 23 | #include "SinricPro_Generic.h" 24 | #include "SinricProGarageDoor.h" 25 | 26 | bool onDoorState(const String& deviceId, bool &doorState) 27 | { 28 | Serial.print("Garage Door is now "); 29 | Serial.println(doorState ? "closed" : "open"); 30 | 31 | digitalWrite(LED_PIN, doorState ? LOW : HIGH); 32 | return true; 33 | } 34 | 35 | // setup function for WiFi connection 36 | void setupWiFi() 37 | { 38 | Serial.println("\n[Wifi]: Connecting"); 39 | WiFi.begin(WIFI_SSID, WIFI_PASS); 40 | 41 | while (WiFi.status() != WL_CONNECTED) 42 | { 43 | Serial.print("."); 44 | delay(250); 45 | } 46 | 47 | Serial.print("\n[WiFi]: IP-Address is "); 48 | Serial.println(WiFi.localIP()); 49 | } 50 | 51 | void setupSinricPro() 52 | { 53 | SinricProGarageDoor &myGarageDoor = SinricPro[GARAGEDOOR_ID]; 54 | myGarageDoor.onDoorState(onDoorState); 55 | 56 | // setup SinricPro 57 | SinricPro.onConnected([]() 58 | { 59 | Serial.println("Connected to SinricPro"); 60 | }); 61 | 62 | SinricPro.onDisconnected([]() 63 | { 64 | Serial.println("Disconnected from SinricPro"); 65 | }); 66 | 67 | SinricPro.begin(APP_KEY, APP_SECRET); 68 | } 69 | 70 | // main setup function 71 | void setup() 72 | { 73 | pinMode(LED_PIN, OUTPUT); // define LED GPIO as output 74 | digitalWrite(LED_PIN, LOW); // turn off LED on bootup 75 | 76 | Serial.begin(BAUD_RATE); 77 | 78 | while (!Serial); 79 | 80 | Serial.println("\nStarting SAMD_WiFiNINA_GarageDoor on " + String(BOARD_NAME)); 81 | Serial.println("Version : " + String(SINRICPRO_VERSION_STR)); 82 | 83 | setupWiFi(); 84 | setupSinricPro(); 85 | } 86 | 87 | void loop() 88 | { 89 | SinricPro.handle(); 90 | } 91 | -------------------------------------------------------------------------------- /examples/Generic/GarageDoor/WIO_Terminal_GarageDoor/WIO_Terminal_GarageDoor.ino: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | WIO_Terminal_GarageDoor.ino 3 | For WIO Terminal boards, running RTL8720DN WiFi, using Seeed_Arduino_rpcWiFi and Seeed_Arduino_rpcUnified libraries 4 | 5 | Based on and modified from SinricPro libarary (https://github.com/sinricpro/) 6 | to support other boards such as SAMD21, SAMD51, Adafruit's nRF52 boards, etc. 7 | 8 | Built by Khoi Hoang https://github.com/khoih-prog/SinricPro_Generic 9 | Licensed under MIT license 10 | 11 | Copyright (c) 2019 Sinric. All rights reserved. 12 | Licensed under Creative Commons Attribution-Share Alike (CC BY-SA) 13 | 14 | This file is part of the Sinric Pro (https://github.com/sinricpro/) 15 | **********************************************************************************************************************************/ 16 | 17 | // STM32 Boards supported: Nucleo-144, Nucleo-64, Nucleo-32, Discovery, STM32F1, STM32F3, STM32F4, STM32H7, STM32L0, etc. 18 | // SAM DUE 19 | // Teensy 4.1, 4.0, 3.6, 3.5, 3.2/3.1, 3.0 20 | 21 | #include "defines.h" 22 | 23 | #include "SinricPro_Generic.h" 24 | #include "SinricProGarageDoor.h" 25 | 26 | bool onDoorState(const String& deviceId, bool &doorState) 27 | { 28 | Serial.print("Garage Door is now "); 29 | Serial.println(doorState ? "closed" : "open"); 30 | 31 | digitalWrite(LED_PIN, doorState ? LOW : HIGH); 32 | return true; 33 | } 34 | 35 | // setup function for WiFi connection 36 | void setupWiFi() 37 | { 38 | Serial.println("\n[Wifi]: Connecting"); 39 | WiFi.begin(WIFI_SSID, WIFI_PASS); 40 | 41 | while (WiFi.status() != WL_CONNECTED) 42 | { 43 | Serial.print("."); 44 | delay(250); 45 | } 46 | 47 | Serial.print("\n[WiFi]: IP-Address is "); 48 | Serial.println(WiFi.localIP()); 49 | } 50 | 51 | void setupSinricPro() 52 | { 53 | SinricProGarageDoor &myGarageDoor = SinricPro[GARAGEDOOR_ID]; 54 | myGarageDoor.onDoorState(onDoorState); 55 | 56 | // setup SinricPro 57 | SinricPro.onConnected([]() 58 | { 59 | Serial.println("Connected to SinricPro"); 60 | }); 61 | 62 | SinricPro.onDisconnected([]() 63 | { 64 | Serial.println("Disconnected from SinricPro"); 65 | }); 66 | 67 | SinricPro.begin(APP_KEY, APP_SECRET); 68 | } 69 | 70 | // main setup function 71 | void setup() 72 | { 73 | pinMode(LED_PIN, OUTPUT); // define LED GPIO as output 74 | digitalWrite(LED_PIN, LOW); // turn off LED on bootup 75 | 76 | Serial.begin(BAUD_RATE); 77 | 78 | while (!Serial); 79 | 80 | Serial.println("\nStarting WIO_Terminal_GarageDoor on " + String(BOARD_NAME)); 81 | Serial.println("Version : " + String(SINRICPRO_VERSION_STR)); 82 | 83 | setupWiFi(); 84 | setupSinricPro(); 85 | } 86 | 87 | void loop() 88 | { 89 | SinricPro.handle(); 90 | } 91 | -------------------------------------------------------------------------------- /examples/Generic/GarageDoor/WIO_Terminal_GarageDoor/defines.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | defines.h 3 | For WIO Terminal boards, running RTL8720DN WiFi, using Seeed_Arduino_rpcWiFi and Seeed_Arduino_rpcUnified libraries 4 | 5 | Based on and modified from SinricPro libarary (https://github.com/sinricpro/) 6 | to support other boards such as SAMD21, SAMD51, Adafruit's nRF52 boards, etc. 7 | 8 | Built by Khoi Hoang https://github.com/khoih-prog/SinricPro_Generic 9 | Licensed under MIT license 10 | 11 | Copyright (c) 2019 Sinric. All rights reserved. 12 | Licensed under Creative Commons Attribution-Share Alike (CC BY-SA) 13 | 14 | This file is part of the Sinric Pro (https://github.com/sinricpro/) 15 | **********************************************************************************************************************************/ 16 | 17 | #ifndef defines_h 18 | #define defines_h 19 | 20 | #define SINRIC_PRO_USING_RTL8720DN true 21 | 22 | #define WEBSOCKETS_NETWORK_TYPE NETWORK_RTL8720DN 23 | 24 | #if !defined(SEEED_WIO_TERMINAL) 25 | #error This code is intended to run on the SEEED_WIO_TERMINAL ! Please check your Tools->Board setting. 26 | #endif 27 | 28 | #warning Using SEEED_WIO_TERMINAL 29 | 30 | #define SRP_DEBUG_PORT Serial 31 | 32 | // Debug Level from 0 to 4 33 | #define _SRP_LOGLEVEL_ 1 34 | 35 | // Uncomment the following line to enable serial debug output 36 | #define ENABLE_DEBUG true 37 | 38 | #if ENABLE_DEBUG 39 | #define DEBUG_PORT Serial 40 | #define NODEBUG_WEBSOCKETS 41 | #define NDEBUG 42 | #endif 43 | 44 | #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" 45 | 46 | #ifndef BOARD_NAME 47 | #define BOARD_NAME BOARD_TYPE 48 | #endif 49 | 50 | #include 51 | 52 | // Select the IP address according to your local network 53 | IPAddress ip(192, 168, 2, 222); 54 | 55 | #define WIFI_SSID "YOUR-WIFI-SSID" 56 | #define WIFI_PASS "YOUR-WIFI-PASSWORD" 57 | 58 | #define APP_KEY "YOUR-APP-KEY" // Should look like "de0bxxxx-1x3x-4x3x-ax2x-5dabxxxxxxxx" 59 | #define APP_SECRET "YOUR-APP-SECRET" // Should look like "5f36xxxx-x3x7-4x3x-xexe-e86724a9xxxx-4c4axxxx-3x3x-x5xe-x9x3-333d65xxxxxx" 60 | 61 | #define GARAGEDOOR_ID "YOUR-DEVICE-ID" // Should look like "5dc1564130xxxxxxxxxxxxxx" 62 | 63 | #define BAUD_RATE 115200 // Change baudrate to your need 64 | #define LED_PIN 13 // GPIO for LED 65 | 66 | #endif //defines_h 67 | -------------------------------------------------------------------------------- /examples/Generic/GarageDoor/nRF52_WiFiNINA_GarageDoor/nRF52_WiFiNINA_GarageDoor.ino: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | nRF52_WiFiNINA_GarageDoor.ino 3 | For Adafruit nRF52 boards, running W5x00 or ENC28J60 Ethernet shield 4 | 5 | Based on and modified from SinricPro libarary (https://github.com/sinricpro/) 6 | to support other boards such as SAMD21, SAMD51, Adafruit's nRF52 boards, etc. 7 | 8 | Built by Khoi Hoang https://github.com/khoih-prog/SinricPro_Generic 9 | Licensed under MIT license 10 | 11 | Copyright (c) 2019 Sinric. All rights reserved. 12 | Licensed under Creative Commons Attribution-Share Alike (CC BY-SA) 13 | 14 | This file is part of the Sinric Pro (https://github.com/sinricpro/) 15 | **********************************************************************************************************************************/ 16 | 17 | // STM32 Boards supported: Nucleo-144, Nucleo-64, Nucleo-32, Discovery, STM32F1, STM32F3, STM32F4, STM32H7, STM32L0, etc. 18 | // SAM DUE 19 | // Teensy 4.1, 4.0, 3.6, 3.5, 3.2/3.1, 3.0 20 | 21 | #include "defines.h" 22 | 23 | #include "SinricPro_Generic.h" 24 | #include "SinricProGarageDoor.h" 25 | 26 | bool onDoorState(const String& deviceId, bool &doorState) 27 | { 28 | Serial.print("Garage Door is now "); 29 | Serial.println(doorState ? "closed" : "open"); 30 | 31 | digitalWrite(LED_PIN, doorState ? LOW : HIGH); 32 | return true; 33 | } 34 | 35 | // setup function for WiFi connection 36 | void setupWiFi() 37 | { 38 | Serial.println("\n[Wifi]: Connecting"); 39 | WiFi.begin(WIFI_SSID, WIFI_PASS); 40 | 41 | while (WiFi.status() != WL_CONNECTED) 42 | { 43 | Serial.print("."); 44 | delay(250); 45 | } 46 | 47 | Serial.print("\n[WiFi]: IP-Address is "); 48 | Serial.println(WiFi.localIP()); 49 | } 50 | 51 | void setupSinricPro() 52 | { 53 | SinricProGarageDoor &myGarageDoor = SinricPro[GARAGEDOOR_ID]; 54 | myGarageDoor.onDoorState(onDoorState); 55 | 56 | // setup SinricPro 57 | SinricPro.onConnected([]() 58 | { 59 | Serial.println("Connected to SinricPro"); 60 | }); 61 | 62 | SinricPro.onDisconnected([]() 63 | { 64 | Serial.println("Disconnected from SinricPro"); 65 | }); 66 | 67 | SinricPro.begin(APP_KEY, APP_SECRET); 68 | } 69 | 70 | // main setup function 71 | void setup() 72 | { 73 | pinMode(LED_PIN, OUTPUT); // define LED GPIO as output 74 | digitalWrite(LED_PIN, LOW); // turn off LED on bootup 75 | 76 | Serial.begin(BAUD_RATE); 77 | 78 | while (!Serial); 79 | 80 | Serial.println("\nStarting nRF52_WiFiNINA_GarageDoor on " + String(BOARD_NAME)); 81 | Serial.println("Version : " + String(SINRICPRO_VERSION_STR)); 82 | 83 | setupWiFi(); 84 | setupSinricPro(); 85 | } 86 | 87 | void loop() 88 | { 89 | SinricPro.handle(); 90 | } 91 | -------------------------------------------------------------------------------- /examples/Generic/Light/WIO_Terminal_Light/defines.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | defines.h 3 | For WIO Terminal boards, running RTL8720DN WiFi, using Seeed_Arduino_rpcWiFi and Seeed_Arduino_rpcUnified libraries 4 | 5 | Based on and modified from SinricPro libarary (https://github.com/sinricpro/) 6 | to support other boards such as SAMD21, SAMD51, Adafruit's nRF52 boards, etc. 7 | 8 | Built by Khoi Hoang https://github.com/khoih-prog/SinricPro_Generic 9 | Licensed under MIT license 10 | 11 | Copyright (c) 2019 Sinric. All rights reserved. 12 | Licensed under Creative Commons Attribution-Share Alike (CC BY-SA) 13 | 14 | This file is part of the Sinric Pro (https://github.com/sinricpro/) 15 | **********************************************************************************************************************************/ 16 | 17 | #ifndef defines_h 18 | #define defines_h 19 | 20 | #define SINRIC_PRO_USING_RTL8720DN true 21 | 22 | #define WEBSOCKETS_NETWORK_TYPE NETWORK_RTL8720DN 23 | 24 | #if !defined(SEEED_WIO_TERMINAL) 25 | #error This code is intended to run on the SEEED_WIO_TERMINAL ! Please check your Tools->Board setting. 26 | #endif 27 | 28 | #warning Using SEEED_WIO_TERMINAL 29 | 30 | #define SRP_DEBUG_PORT Serial 31 | 32 | // Debug Level from 0 to 4 33 | #define _SRP_LOGLEVEL_ 1 34 | 35 | // Uncomment the following line to enable serial debug output 36 | #define ENABLE_DEBUG true 37 | 38 | #if ENABLE_DEBUG 39 | #define DEBUG_PORT Serial 40 | #define NODEBUG_WEBSOCKETS 41 | #define NDEBUG 42 | #endif 43 | 44 | #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" 45 | 46 | #ifndef BOARD_NAME 47 | #define BOARD_NAME BOARD_TYPE 48 | #endif 49 | 50 | #include 51 | 52 | // Select the IP address according to your local network 53 | IPAddress ip(192, 168, 2, 222); 54 | 55 | #define WIFI_SSID "YOUR-WIFI-SSID" 56 | #define WIFI_PASS "YOUR-WIFI-PASSWORD" 57 | 58 | #define APP_KEY "YOUR-APP-KEY" // Should look like "de0bxxxx-1x3x-4x3x-ax2x-5dabxxxxxxxx" 59 | #define APP_SECRET "YOUR-APP-SECRET" // Should look like "5f36xxxx-x3x7-4x3x-xexe-e86724a9xxxx-4c4axxxx-3x3x-x5xe-x9x3-333d65xxxxxx" 60 | 61 | #define LIGHT_ID "YOUR-DEVICE-ID" // Should look like "5dc1564130xxxxxxxxxxxxxx" 62 | 63 | #define BAUD_RATE 115200 // Change baudrate to your need 64 | 65 | #endif //defines_h 66 | -------------------------------------------------------------------------------- /examples/Generic/Lock/Generic_WiFiNINA_Lock/Generic_WiFiNINA_Lock.ino: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | Generic_WiFiNINA_Lock.ino 3 | For Generic boards, running WiFiNINA 4 | 5 | Based on and modified from SinricPro libarary (https://github.com/sinricpro/) 6 | to support other boards such as SAMD21, SAMD51, Adafruit's nRF52 boards, etc. 7 | 8 | Built by Khoi Hoang https://github.com/khoih-prog/SinricPro_Generic 9 | Licensed under MIT license 10 | 11 | Copyright (c) 2019 Sinric. All rights reserved. 12 | Licensed under Creative Commons Attribution-Share Alike (CC BY-SA) 13 | 14 | This file is part of the Sinric Pro (https://github.com/sinricpro/) 15 | **********************************************************************************************************************************/ 16 | 17 | // STM32 Boards supported: Nucleo-144, Nucleo-64, Nucleo-32, Discovery, STM32F1, STM32F3, STM32F4, STM32H7, STM32L0, etc. 18 | // SAM DUE 19 | // Teensy 4.1, 4.0, 3.6, 3.5, 3.2/3.1, 3.0 20 | 21 | #include "defines.h" 22 | 23 | #include "SinricPro_Generic.h" 24 | #include "SinricProLock.h" 25 | 26 | bool onLockState(String deviceId, bool &lockState) 27 | { 28 | Serial.println("Device " + deviceId + String(lockState ? "locked" : "unlocked")); 29 | 30 | return true; 31 | } 32 | 33 | // setup function for WiFi connection 34 | void setupWiFi() 35 | { 36 | Serial.print("\n[Wifi]: Connecting"); 37 | WiFi.begin(WIFI_SSID, WIFI_PASS); 38 | 39 | while (WiFi.status() != WL_CONNECTED) 40 | { 41 | Serial.print("."); 42 | delay(250); 43 | } 44 | 45 | Serial.print("[WiFi]: IP-Address is "); 46 | Serial.println(WiFi.localIP()); 47 | } 48 | 49 | void setupSinricPro() 50 | { 51 | SinricProLock &myLock = SinricPro[LOCK_ID]; 52 | myLock.onLockState(onLockState); 53 | 54 | // setup SinricPro 55 | SinricPro.onConnected([]() 56 | { 57 | Serial.println("Connected to SinricPro"); 58 | }); 59 | 60 | SinricPro.onDisconnected([]() 61 | { 62 | Serial.println("Disconnected from SinricPro"); 63 | }); 64 | 65 | SinricPro.begin(APP_KEY, APP_SECRET); 66 | } 67 | 68 | // main setup function 69 | void setup() 70 | { 71 | Serial.begin(BAUD_RATE); 72 | 73 | while (!Serial); 74 | 75 | Serial.println("\nStarting Generic_WiFiNINA_Lock on " + String(BOARD_NAME)); 76 | Serial.println("Version : " + String(SINRICPRO_VERSION_STR)); 77 | 78 | setupWiFi(); 79 | setupSinricPro(); 80 | } 81 | 82 | void loop() 83 | { 84 | SinricPro.handle(); 85 | } 86 | -------------------------------------------------------------------------------- /examples/Generic/Lock/SAMD_WiFiNINA_Lock/SAMD_WiFiNINA_Lock.ino: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | SAMD_WiFiNINA_Lock.ino 3 | For Arduino SAMD21, Adafruit SAMD21, SAMD51 boards, running WiFiNINA 4 | 5 | Based on and modified from SinricPro libarary (https://github.com/sinricpro/) 6 | to support other boards such as SAMD21, SAMD51, Adafruit's nRF52 boards, etc. 7 | 8 | Built by Khoi Hoang https://github.com/khoih-prog/SinricPro_Generic 9 | Licensed under MIT license 10 | 11 | Copyright (c) 2019 Sinric. All rights reserved. 12 | Licensed under Creative Commons Attribution-Share Alike (CC BY-SA) 13 | 14 | This file is part of the Sinric Pro (https://github.com/sinricpro/) 15 | **********************************************************************************************************************************/ 16 | 17 | // STM32 Boards supported: Nucleo-144, Nucleo-64, Nucleo-32, Discovery, STM32F1, STM32F3, STM32F4, STM32H7, STM32L0, etc. 18 | // SAM DUE 19 | // Teensy 4.1, 4.0, 3.6, 3.5, 3.2/3.1, 3.0 20 | 21 | #include "defines.h" 22 | 23 | #include "SinricPro_Generic.h" 24 | #include "SinricProLock.h" 25 | 26 | bool onLockState(String deviceId, bool &lockState) 27 | { 28 | Serial.println("Device " + deviceId + String(lockState ? "locked" : "unlocked")); 29 | 30 | return true; 31 | } 32 | 33 | // setup function for WiFi connection 34 | void setupWiFi() 35 | { 36 | Serial.print("\n[Wifi]: Connecting"); 37 | WiFi.begin(WIFI_SSID, WIFI_PASS); 38 | 39 | while (WiFi.status() != WL_CONNECTED) 40 | { 41 | Serial.print("."); 42 | delay(250); 43 | } 44 | 45 | Serial.print("[WiFi]: IP-Address is "); 46 | Serial.println(WiFi.localIP()); 47 | } 48 | 49 | void setupSinricPro() 50 | { 51 | SinricProLock &myLock = SinricPro[LOCK_ID]; 52 | myLock.onLockState(onLockState); 53 | 54 | // setup SinricPro 55 | SinricPro.onConnected([]() 56 | { 57 | Serial.println("Connected to SinricPro"); 58 | }); 59 | 60 | SinricPro.onDisconnected([]() 61 | { 62 | Serial.println("Disconnected from SinricPro"); 63 | }); 64 | 65 | SinricPro.begin(APP_KEY, APP_SECRET); 66 | } 67 | 68 | // main setup function 69 | void setup() 70 | { 71 | Serial.begin(BAUD_RATE); 72 | 73 | while (!Serial); 74 | 75 | Serial.println("\nStarting SAMD_WiFiNINA_Lock on " + String(BOARD_NAME)); 76 | Serial.println("Version : " + String(SINRICPRO_VERSION_STR)); 77 | 78 | setupWiFi(); 79 | setupSinricPro(); 80 | } 81 | 82 | void loop() 83 | { 84 | SinricPro.handle(); 85 | } 86 | -------------------------------------------------------------------------------- /examples/Generic/Lock/WIO_Terminal_Lock/WIO_Terminal_Lock.ino: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | WIO_Terminal_Lock.ino 3 | For WIO Terminal boards, running RTL8720DN WiFi, using Seeed_Arduino_rpcWiFi and Seeed_Arduino_rpcUnified libraries 4 | 5 | Based on and modified from SinricPro libarary (https://github.com/sinricpro/) 6 | to support other boards such as SAMD21, SAMD51, Adafruit's nRF52 boards, etc. 7 | 8 | Built by Khoi Hoang https://github.com/khoih-prog/SinricPro_Generic 9 | Licensed under MIT license 10 | 11 | Copyright (c) 2019 Sinric. All rights reserved. 12 | Licensed under Creative Commons Attribution-Share Alike (CC BY-SA) 13 | 14 | This file is part of the Sinric Pro (https://github.com/sinricpro/) 15 | **********************************************************************************************************************************/ 16 | 17 | // STM32 Boards supported: Nucleo-144, Nucleo-64, Nucleo-32, Discovery, STM32F1, STM32F3, STM32F4, STM32H7, STM32L0, etc. 18 | // SAM DUE 19 | // Teensy 4.1, 4.0, 3.6, 3.5, 3.2/3.1, 3.0 20 | 21 | #include "defines.h" 22 | 23 | #include "SinricPro_Generic.h" 24 | #include "SinricProLock.h" 25 | 26 | bool onLockState(String deviceId, bool &lockState) 27 | { 28 | Serial.println("Device " + deviceId + String(lockState ? "locked" : "unlocked")); 29 | 30 | return true; 31 | } 32 | 33 | // setup function for WiFi connection 34 | void setupWiFi() 35 | { 36 | Serial.print("\n[Wifi]: Connecting"); 37 | WiFi.begin(WIFI_SSID, WIFI_PASS); 38 | 39 | while (WiFi.status() != WL_CONNECTED) 40 | { 41 | Serial.print("."); 42 | delay(250); 43 | } 44 | 45 | Serial.print("[WiFi]: IP-Address is "); 46 | Serial.println(WiFi.localIP()); 47 | } 48 | 49 | void setupSinricPro() 50 | { 51 | SinricProLock &myLock = SinricPro[LOCK_ID]; 52 | myLock.onLockState(onLockState); 53 | 54 | // setup SinricPro 55 | SinricPro.onConnected([]() 56 | { 57 | Serial.println("Connected to SinricPro"); 58 | }); 59 | 60 | SinricPro.onDisconnected([]() 61 | { 62 | Serial.println("Disconnected from SinricPro"); 63 | }); 64 | 65 | SinricPro.begin(APP_KEY, APP_SECRET); 66 | } 67 | 68 | // main setup function 69 | void setup() 70 | { 71 | Serial.begin(BAUD_RATE); 72 | 73 | while (!Serial); 74 | 75 | Serial.println("\nStarting WIO_Terminal_Lock on " + String(BOARD_NAME)); 76 | Serial.println("Version : " + String(SINRICPRO_VERSION_STR)); 77 | 78 | setupWiFi(); 79 | setupSinricPro(); 80 | } 81 | 82 | void loop() 83 | { 84 | SinricPro.handle(); 85 | } 86 | -------------------------------------------------------------------------------- /examples/Generic/Lock/WIO_Terminal_Lock/defines.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | defines.h 3 | For WIO Terminal boards, running RTL8720DN WiFi, using Seeed_Arduino_rpcWiFi and Seeed_Arduino_rpcUnified libraries 4 | 5 | Based on and modified from SinricPro libarary (https://github.com/sinricpro/) 6 | to support other boards such as SAMD21, SAMD51, Adafruit's nRF52 boards, etc. 7 | 8 | Built by Khoi Hoang https://github.com/khoih-prog/SinricPro_Generic 9 | Licensed under MIT license 10 | 11 | Copyright (c) 2019 Sinric. All rights reserved. 12 | Licensed under Creative Commons Attribution-Share Alike (CC BY-SA) 13 | 14 | This file is part of the Sinric Pro (https://github.com/sinricpro/) 15 | **********************************************************************************************************************************/ 16 | 17 | #ifndef defines_h 18 | #define defines_h 19 | 20 | #define SINRIC_PRO_USING_RTL8720DN true 21 | 22 | #define WEBSOCKETS_NETWORK_TYPE NETWORK_RTL8720DN 23 | 24 | #if !defined(SEEED_WIO_TERMINAL) 25 | #error This code is intended to run on the SEEED_WIO_TERMINAL ! Please check your Tools->Board setting. 26 | #endif 27 | 28 | #warning Using SEEED_WIO_TERMINAL 29 | 30 | #define SRP_DEBUG_PORT Serial 31 | 32 | // Debug Level from 0 to 4 33 | #define _SRP_LOGLEVEL_ 1 34 | 35 | // Uncomment the following line to enable serial debug output 36 | #define ENABLE_DEBUG true 37 | 38 | #if ENABLE_DEBUG 39 | #define DEBUG_PORT Serial 40 | #define NODEBUG_WEBSOCKETS 41 | #define NDEBUG 42 | #endif 43 | 44 | #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" 45 | 46 | #ifndef BOARD_NAME 47 | #define BOARD_NAME BOARD_TYPE 48 | #endif 49 | 50 | #include 51 | 52 | // Select the IP address according to your local network 53 | IPAddress ip(192, 168, 2, 222); 54 | 55 | #define WIFI_SSID "YOUR-WIFI-SSID" 56 | #define WIFI_PASS "YOUR-WIFI-PASSWORD" 57 | 58 | #define APP_KEY "YOUR-APP-KEY" // Should look like "de0bxxxx-1x3x-4x3x-ax2x-5dabxxxxxxxx" 59 | #define APP_SECRET "YOUR-APP-SECRET" // Should look like "5f36xxxx-x3x7-4x3x-xexe-e86724a9xxxx-4c4axxxx-3x3x-x5xe-x9x3-333d65xxxxxx" 60 | 61 | #define LOCK_ID "YOUR-DEVICE-ID" // Should look like "5dc1564130xxxxxxxxxxxxxx" 62 | 63 | #define BAUD_RATE 115200 // Change baudrate to your need 64 | 65 | #endif //defines_h 66 | -------------------------------------------------------------------------------- /examples/Generic/Lock/nRF52_WiFiNINA_Lock/nRF52_WiFiNINA_Lock.ino: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | SAMD_WiFiNINA_Lock.ino 3 | For Adafruit nRF52 boards, running WiFiNINA 4 | 5 | Based on and modified from SinricPro libarary (https://github.com/sinricpro/) 6 | to support other boards such as SAMD21, SAMD51, Adafruit's nRF52 boards, etc. 7 | 8 | Built by Khoi Hoang https://github.com/khoih-prog/SinricPro_Generic 9 | Licensed under MIT license 10 | 11 | Copyright (c) 2019 Sinric. All rights reserved. 12 | Licensed under Creative Commons Attribution-Share Alike (CC BY-SA) 13 | 14 | This file is part of the Sinric Pro (https://github.com/sinricpro/) 15 | **********************************************************************************************************************************/ 16 | 17 | // STM32 Boards supported: Nucleo-144, Nucleo-64, Nucleo-32, Discovery, STM32F1, STM32F3, STM32F4, STM32H7, STM32L0, etc. 18 | // SAM DUE 19 | // Teensy 4.1, 4.0, 3.6, 3.5, 3.2/3.1, 3.0 20 | 21 | #include "defines.h" 22 | 23 | #include "SinricPro_Generic.h" 24 | #include "SinricProLock.h" 25 | 26 | bool onLockState(String deviceId, bool &lockState) 27 | { 28 | Serial.println("Device " + deviceId + String(lockState ? "locked" : "unlocked")); 29 | 30 | return true; 31 | } 32 | 33 | // setup function for WiFi connection 34 | void setupWiFi() 35 | { 36 | Serial.print("\n[Wifi]: Connecting"); 37 | WiFi.begin(WIFI_SSID, WIFI_PASS); 38 | 39 | while (WiFi.status() != WL_CONNECTED) 40 | { 41 | Serial.print("."); 42 | delay(250); 43 | } 44 | 45 | Serial.print("[WiFi]: IP-Address is "); 46 | Serial.println(WiFi.localIP()); 47 | } 48 | 49 | void setupSinricPro() 50 | { 51 | SinricProLock &myLock = SinricPro[LOCK_ID]; 52 | myLock.onLockState(onLockState); 53 | 54 | // setup SinricPro 55 | SinricPro.onConnected([]() 56 | { 57 | Serial.println("Connected to SinricPro"); 58 | }); 59 | 60 | SinricPro.onDisconnected([]() 61 | { 62 | Serial.println("Disconnected from SinricPro"); 63 | }); 64 | 65 | SinricPro.begin(APP_KEY, APP_SECRET); 66 | } 67 | 68 | // main setup function 69 | void setup() 70 | { 71 | Serial.begin(BAUD_RATE); 72 | 73 | while (!Serial); 74 | 75 | Serial.println("\nStarting nRF52_WiFiNINA_Lock on " + String(BOARD_NAME)); 76 | Serial.println("Version : " + String(SINRICPRO_VERSION_STR)); 77 | 78 | setupWiFi(); 79 | setupSinricPro(); 80 | } 81 | 82 | void loop() 83 | { 84 | SinricPro.handle(); 85 | } 86 | -------------------------------------------------------------------------------- /examples/Generic/MotionSensor/WIO_Terminal_MotionSensor/defines.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | defines.h 3 | For WIO Terminal boards, running RTL8720DN WiFi, using Seeed_Arduino_rpcWiFi and Seeed_Arduino_rpcUnified libraries 4 | 5 | Based on and modified from SinricPro libarary (https://github.com/sinricpro/) 6 | to support other boards such as SAMD21, SAMD51, Adafruit's nRF52 boards, etc. 7 | 8 | Built by Khoi Hoang https://github.com/khoih-prog/SinricPro_Generic 9 | Licensed under MIT license 10 | 11 | Copyright (c) 2019 Sinric. All rights reserved. 12 | Licensed under Creative Commons Attribution-Share Alike (CC BY-SA) 13 | 14 | This file is part of the Sinric Pro (https://github.com/sinricpro/) 15 | **********************************************************************************************************************************/ 16 | 17 | #ifndef defines_h 18 | #define defines_h 19 | 20 | #define SINRIC_PRO_USING_RTL8720DN true 21 | 22 | #define WEBSOCKETS_NETWORK_TYPE NETWORK_RTL8720DN 23 | 24 | #if !defined(SEEED_WIO_TERMINAL) 25 | #error This code is intended to run on the SEEED_WIO_TERMINAL ! Please check your Tools->Board setting. 26 | #endif 27 | 28 | #warning Using SEEED_WIO_TERMINAL 29 | 30 | #define SRP_DEBUG_PORT Serial 31 | 32 | // Debug Level from 0 to 4 33 | #define _SRP_LOGLEVEL_ 1 34 | 35 | // Uncomment the following line to enable serial debug output 36 | #define ENABLE_DEBUG true 37 | 38 | #if ENABLE_DEBUG 39 | #define DEBUG_PORT Serial 40 | #define NODEBUG_WEBSOCKETS 41 | #define NDEBUG 42 | #endif 43 | 44 | #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" 45 | 46 | #ifndef BOARD_NAME 47 | #define BOARD_NAME BOARD_TYPE 48 | #endif 49 | 50 | #include 51 | 52 | // Select the IP address according to your local network 53 | IPAddress ip(192, 168, 2, 222); 54 | 55 | #define WIFI_SSID "YOUR-WIFI-SSID" 56 | #define WIFI_PASS "YOUR-WIFI-PASSWORD" 57 | 58 | #define APP_KEY "YOUR-APP-KEY" // Should look like "de0bxxxx-1x3x-4x3x-ax2x-5dabxxxxxxxx" 59 | #define APP_SECRET "YOUR-APP-SECRET" // Should look like "5f36xxxx-x3x7-4x3x-xexe-e86724a9xxxx-4c4axxxx-3x3x-x5xe-x9x3-333d65xxxxxx" 60 | 61 | #define MOTIONSENSOR_ID "YOUR-DEVICE-ID" // Should look like "5dc1564130xxxxxxxxxxxxxx" 62 | 63 | #define BAUD_RATE 115200 // Change baudrate to your need 64 | 65 | #define MOTIONSENSOR_PIN 5 // PIN where motionsensor is connected to 66 | // LOW = motion is not detected 67 | // HIGH = motion is detected 68 | 69 | #endif //defines_h 70 | -------------------------------------------------------------------------------- /examples/Generic/PowerSensor/WIO_Terminal_PowerSensor/defines.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | defines.h 3 | For WIO Terminal boards, running RTL8720DN WiFi, using Seeed_Arduino_rpcWiFi and Seeed_Arduino_rpcUnified libraries 4 | 5 | Based on and modified from SinricPro libarary (https://github.com/sinricpro/) 6 | to support other boards such as SAMD21, SAMD51, Adafruit's nRF52 boards, etc. 7 | 8 | Built by Khoi Hoang https://github.com/khoih-prog/SinricPro_Generic 9 | Licensed under MIT license 10 | 11 | Copyright (c) 2019 Sinric. All rights reserved. 12 | Licensed under Creative Commons Attribution-Share Alike (CC BY-SA) 13 | 14 | This file is part of the Sinric Pro (https://github.com/sinricpro/) 15 | **********************************************************************************************************************************/ 16 | 17 | #ifndef defines_h 18 | #define defines_h 19 | 20 | #define SINRIC_PRO_USING_RTL8720DN true 21 | 22 | #define WEBSOCKETS_NETWORK_TYPE NETWORK_RTL8720DN 23 | 24 | #if !defined(SEEED_WIO_TERMINAL) 25 | #error This code is intended to run on the SEEED_WIO_TERMINAL ! Please check your Tools->Board setting. 26 | #endif 27 | 28 | #warning Using SEEED_WIO_TERMINAL 29 | 30 | #define SRP_DEBUG_PORT Serial 31 | 32 | // Debug Level from 0 to 4 33 | #define _SRP_LOGLEVEL_ 1 34 | 35 | // Uncomment the following line to enable serial debug output 36 | #define ENABLE_DEBUG true 37 | 38 | #if ENABLE_DEBUG 39 | #define DEBUG_PORT Serial 40 | #define NODEBUG_WEBSOCKETS 41 | #define NDEBUG 42 | #endif 43 | 44 | #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" 45 | 46 | #ifndef BOARD_NAME 47 | #define BOARD_NAME BOARD_TYPE 48 | #endif 49 | 50 | #include 51 | 52 | // Select the IP address according to your local network 53 | IPAddress ip(192, 168, 2, 222); 54 | 55 | #define WIFI_SSID "YOUR-WIFI-SSID" 56 | #define WIFI_PASS "YOUR-WIFI-PASSWORD" 57 | 58 | #define APP_KEY "YOUR-APP-KEY" // Should look like "de0bxxxx-1x3x-4x3x-ax2x-5dabxxxxxxxx" 59 | #define APP_SECRET "YOUR-APP-SECRET" // Should look like "5f36xxxx-x3x7-4x3x-xexe-e86724a9xxxx-4c4axxxx-3x3x-x5xe-x9x3-333d65xxxxxx" 60 | 61 | #define POWERSENSOR_ID "YOUR-DEVICE-ID" // Should look like "5dc1564130xxxxxxxxxxxxxx" 62 | 63 | #define BAUD_RATE 115200 // Change baudrate to your need 64 | 65 | #define SAMPLE_EVERY_SEC 60 // Send every 60 seconds new data to server 66 | 67 | #endif //defines_h 68 | -------------------------------------------------------------------------------- /examples/Generic/Speaker/WIO_Terminal_Speaker/defines.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | defines.h 3 | For WIO Terminal boards, running RTL8720DN WiFi, using Seeed_Arduino_rpcWiFi and Seeed_Arduino_rpcUnified libraries 4 | 5 | Based on and modified from SinricPro libarary (https://github.com/sinricpro/) 6 | to support other boards such as SAMD21, SAMD51, Adafruit's nRF52 boards, etc. 7 | 8 | Built by Khoi Hoang https://github.com/khoih-prog/SinricPro_Generic 9 | Licensed under MIT license 10 | 11 | Copyright (c) 2019 Sinric. All rights reserved. 12 | Licensed under Creative Commons Attribution-Share Alike (CC BY-SA) 13 | 14 | This file is part of the Sinric Pro (https://github.com/sinricpro/) 15 | **********************************************************************************************************************************/ 16 | 17 | #ifndef defines_h 18 | #define defines_h 19 | 20 | #define SINRIC_PRO_USING_RTL8720DN true 21 | 22 | #define WEBSOCKETS_NETWORK_TYPE NETWORK_RTL8720DN 23 | 24 | #if !defined(SEEED_WIO_TERMINAL) 25 | #error This code is intended to run on the SEEED_WIO_TERMINAL ! Please check your Tools->Board setting. 26 | #endif 27 | 28 | #warning Using SEEED_WIO_TERMINAL 29 | 30 | #define SRP_DEBUG_PORT Serial 31 | 32 | // Debug Level from 0 to 4 33 | #define _SRP_LOGLEVEL_ 1 34 | 35 | // Uncomment the following line to enable serial debug output 36 | #define ENABLE_DEBUG true 37 | 38 | #if ENABLE_DEBUG 39 | #define DEBUG_PORT Serial 40 | #define NODEBUG_WEBSOCKETS 41 | #define NDEBUG 42 | #endif 43 | 44 | #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" 45 | 46 | #ifndef BOARD_NAME 47 | #define BOARD_NAME BOARD_TYPE 48 | #endif 49 | 50 | #include 51 | 52 | // Select the IP address according to your local network 53 | IPAddress ip(192, 168, 2, 222); 54 | 55 | #define WIFI_SSID "YOUR-WIFI-SSID" 56 | #define WIFI_PASS "YOUR-WIFI-PASSWORD" 57 | 58 | #define APP_KEY "YOUR-APP-KEY" // Should look like "de0bxxxx-1x3x-4x3x-ax2x-5dabxxxxxxxx" 59 | #define APP_SECRET "YOUR-APP-SECRET" // Should look like "5f36xxxx-x3x7-4x3x-xexe-e86724a9xxxx-4c4axxxx-3x3x-x5xe-x9x3-333d65xxxxxx" 60 | 61 | #define SPEAKER_ID "YOUR-DEVICE-ID" // Should look like "5dc1564130xxxxxxxxxxxxxx" 62 | #define BAUD_RATE 115200 // Change baudrate to your need 63 | 64 | #define BANDS_INDEX_BASS 0 65 | #define BANDS_INDEX_MIDRANGE 1 66 | #define BANDS_INDEX_TREBBLE 2 67 | 68 | #endif //defines_h 69 | -------------------------------------------------------------------------------- /examples/Generic/Switch/MultiSwitch_advance_tactile-button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khoih-prog/SinricPro_Generic/3f4e17eb2844e47914405cb1a02016d9ee6cbff2/examples/Generic/Switch/MultiSwitch_advance_tactile-button.png -------------------------------------------------------------------------------- /examples/Generic/Switch/MutliSwitch_advance_toggle-switch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khoih-prog/SinricPro_Generic/3f4e17eb2844e47914405cb1a02016d9ee6cbff2/examples/Generic/Switch/MutliSwitch_advance_toggle-switch.png -------------------------------------------------------------------------------- /examples/Generic/Switch/WIO_Terminal/WIOT_MultiSwitch_LCD/WIOT_MultiSwitch_LCD_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khoih-prog/SinricPro_Generic/3f4e17eb2844e47914405cb1a02016d9ee6cbff2/examples/Generic/Switch/WIO_Terminal/WIOT_MultiSwitch_LCD/WIOT_MultiSwitch_LCD_1.jpg -------------------------------------------------------------------------------- /examples/Generic/Switch/WIO_Terminal/WIOT_MultiSwitch_LCD/WIOT_MultiSwitch_LCD_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khoih-prog/SinricPro_Generic/3f4e17eb2844e47914405cb1a02016d9ee6cbff2/examples/Generic/Switch/WIO_Terminal/WIOT_MultiSwitch_LCD/WIOT_MultiSwitch_LCD_2.jpg -------------------------------------------------------------------------------- /examples/Generic/Switch/WIO_Terminal/WIOT_MultiSwitch_LCD/defines.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | defines.h 3 | For WIO Terminal boards, running RTL8720DN WiFi, using Seeed_Arduino_rpcWiFi and Seeed_Arduino_rpcUnified libraries 4 | 5 | Based on and modified from SinricPro libarary (https://github.com/sinricpro/) 6 | to support other boards such as SAMD21, SAMD51, Adafruit's nRF52 boards, etc. 7 | 8 | Built by Khoi Hoang https://github.com/khoih-prog/SinricPro_Generic 9 | Licensed under MIT license 10 | 11 | Copyright (c) 2019 Sinric. All rights reserved. 12 | Licensed under Creative Commons Attribution-Share Alike (CC BY-SA) 13 | 14 | This file is part of the Sinric Pro (https://github.com/sinricpro/) 15 | **********************************************************************************************************************************/ 16 | 17 | #ifndef defines_h 18 | #define defines_h 19 | 20 | #define SINRIC_PRO_USING_RTL8720DN true 21 | 22 | #define WEBSOCKETS_NETWORK_TYPE NETWORK_RTL8720DN 23 | 24 | #if !defined(SEEED_WIO_TERMINAL) 25 | #error This code is intended to run on the SEEED_WIO_TERMINAL ! Please check your Tools->Board setting. 26 | #endif 27 | 28 | #warning Using SEEED_WIO_TERMINAL 29 | 30 | #define SRP_DEBUG_PORT Serial 31 | 32 | // Debug Level from 0 to 4 33 | #define _SRP_LOGLEVEL_ 1 34 | 35 | // Uncomment the following line to enable serial debug output 36 | #define ENABLE_DEBUG true 37 | 38 | #if ENABLE_DEBUG 39 | #define DEBUG_PORT Serial 40 | #define NODEBUG_WEBSOCKETS 41 | #define NDEBUG 42 | #endif 43 | 44 | #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" 45 | 46 | #ifndef BOARD_NAME 47 | #define BOARD_NAME BOARD_TYPE 48 | #endif 49 | 50 | #include 51 | 52 | // Select the IP address according to your local network 53 | IPAddress ip(192, 168, 2, 222); 54 | 55 | #define WIFI_SSID "YOUR-WIFI-SSID" 56 | #define WIFI_PASS "YOUR-WIFI-PASSWORD" 57 | 58 | 59 | #define APP_KEY "YOUR-APP-KEY" // Should look like "de0bxxxx-1x3x-4x3x-ax2x-5dabxxxxxxxx" 60 | #define APP_SECRET "YOUR-APP-SECRET" // Should look like "5f36xxxx-x3x7-4x3x-xexe-e86724a9xxxx-4c4axxxx-3x3x-x5xe-x9x3-333d65xxxxxx" 61 | 62 | #define SWITCH_ID_1 "YOUR-DEVICE-ID" // Should look like "5dc1564130xxxxxxxxxxxxxx" 63 | #define SWITCH_ID_2 "YOUR-DEVICE-ID" // Should look like "5dc1564130xxxxxxxxxxxxxx" 64 | #define SWITCH_ID_3 "YOUR-DEVICE-ID" // Should look like "5dc1564130xxxxxxxxxxxxxx" 65 | 66 | #define BAUD_RATE 115200 // Change baudrate to your need 67 | 68 | // comment the following line if you use a toggle switches instead of tactile buttons 69 | #define TACTILE_BUTTON 1 70 | 71 | #define DEBOUNCE_TIME 250 72 | 73 | #endif //defines_h 74 | -------------------------------------------------------------------------------- /examples/Generic/Switch/WIO_Terminal/WIO_Terminal_MultiSwitch_advance/defines.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | defines.h 3 | For WIO Terminal boards, running RTL8720DN WiFi, using Seeed_Arduino_rpcWiFi and Seeed_Arduino_rpcUnified libraries 4 | 5 | Based on and modified from SinricPro libarary (https://github.com/sinricpro/) 6 | to support other boards such as SAMD21, SAMD51, Adafruit's nRF52 boards, etc. 7 | 8 | Built by Khoi Hoang https://github.com/khoih-prog/SinricPro_Generic 9 | Licensed under MIT license 10 | 11 | Copyright (c) 2019 Sinric. All rights reserved. 12 | Licensed under Creative Commons Attribution-Share Alike (CC BY-SA) 13 | 14 | This file is part of the Sinric Pro (https://github.com/sinricpro/) 15 | **********************************************************************************************************************************/ 16 | 17 | #ifndef defines_h 18 | #define defines_h 19 | 20 | #define SINRIC_PRO_USING_RTL8720DN true 21 | 22 | #define WEBSOCKETS_NETWORK_TYPE NETWORK_RTL8720DN 23 | 24 | #if !defined(SEEED_WIO_TERMINAL) 25 | #error This code is intended to run on the SEEED_WIO_TERMINAL ! Please check your Tools->Board setting. 26 | #endif 27 | 28 | #warning Using SEEED_WIO_TERMINAL 29 | 30 | #define SRP_DEBUG_PORT Serial 31 | 32 | // Debug Level from 0 to 4 33 | #define _SRP_LOGLEVEL_ 1 34 | 35 | // Uncomment the following line to enable serial debug output 36 | #define ENABLE_DEBUG true 37 | 38 | #if ENABLE_DEBUG 39 | #define DEBUG_PORT Serial 40 | #define NODEBUG_WEBSOCKETS 41 | #define NDEBUG 42 | #endif 43 | 44 | #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" 45 | 46 | #ifndef BOARD_NAME 47 | #define BOARD_NAME BOARD_TYPE 48 | #endif 49 | 50 | #include 51 | 52 | // Select the IP address according to your local network 53 | IPAddress ip(192, 168, 2, 222); 54 | 55 | #define WIFI_SSID "YOUR-WIFI-SSID" 56 | #define WIFI_PASS "YOUR-WIFI-PASSWORD" 57 | 58 | #define APP_KEY "YOUR-APP-KEY" // Should look like "de0bxxxx-1x3x-4x3x-ax2x-5dabxxxxxxxx" 59 | #define APP_SECRET "YOUR-APP-SECRET" // Should look like "5f36xxxx-x3x7-4x3x-xexe-e86724a9xxxx-4c4axxxx-3x3x-x5xe-x9x3-333d65xxxxxx" 60 | 61 | #define SWITCH_ID_1 "YOUR-DEVICE-ID" // Should look like "5dc1564130xxxxxxxxxxxxxx" 62 | #define SWITCH_ID_2 "YOUR-DEVICE-ID" // Should look like "5dc1564130xxxxxxxxxxxxxx" 63 | #define SWITCH_ID_3 "YOUR-DEVICE-ID" // Should look like "5dc1564130xxxxxxxxxxxxxx" 64 | #define SWITCH_ID_4 "YOUR-DEVICE-ID" // Should look like "5dc1564130xxxxxxxxxxxxxx" 65 | 66 | #define BAUD_RATE 115200 // Change baudrate to your need 67 | 68 | // comment the following line if you use a toggle switches instead of tactile buttons 69 | #define TACTILE_BUTTON 1 70 | 71 | #define DEBOUNCE_TIME 250 72 | 73 | #endif //defines_h 74 | -------------------------------------------------------------------------------- /examples/Generic/Switch/WIO_Terminal/WIO_Terminal_MultiSwitch_beginner/defines.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | defines.h 3 | For WIO Terminal boards, running RTL8720DN WiFi, using Seeed_Arduino_rpcWiFi and Seeed_Arduino_rpcUnified libraries 4 | 5 | Based on and modified from SinricPro libarary (https://github.com/sinricpro/) 6 | to support other boards such as SAMD21, SAMD51, Adafruit's nRF52 boards, etc. 7 | 8 | Built by Khoi Hoang https://github.com/khoih-prog/SinricPro_Generic 9 | Licensed under MIT license 10 | 11 | Copyright (c) 2019 Sinric. All rights reserved. 12 | Licensed under Creative Commons Attribution-Share Alike (CC BY-SA) 13 | 14 | This file is part of the Sinric Pro (https://github.com/sinricpro/) 15 | **********************************************************************************************************************************/ 16 | 17 | #ifndef defines_h 18 | #define defines_h 19 | 20 | #define SINRIC_PRO_USING_RTL8720DN true 21 | 22 | #define WEBSOCKETS_NETWORK_TYPE NETWORK_RTL8720DN 23 | 24 | #if !defined(SEEED_WIO_TERMINAL) 25 | #error This code is intended to run on the SEEED_WIO_TERMINAL ! Please check your Tools->Board setting. 26 | #endif 27 | 28 | #warning Using SEEED_WIO_TERMINAL 29 | 30 | #define SRP_DEBUG_PORT Serial 31 | 32 | // Debug Level from 0 to 4 33 | #define _SRP_LOGLEVEL_ 1 34 | 35 | // Uncomment the following line to enable serial debug output 36 | #define ENABLE_DEBUG true 37 | 38 | #if ENABLE_DEBUG 39 | #define DEBUG_PORT Serial 40 | #define NODEBUG_WEBSOCKETS 41 | #define NDEBUG 42 | #endif 43 | 44 | #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" 45 | 46 | #ifndef BOARD_NAME 47 | #define BOARD_NAME BOARD_TYPE 48 | #endif 49 | 50 | #include 51 | 52 | // Select the IP address according to your local network 53 | IPAddress ip(192, 168, 2, 222); 54 | 55 | #define WIFI_SSID "YOUR-WIFI-SSID" 56 | #define WIFI_PASS "YOUR-WIFI-PASSWORD" 57 | 58 | #define APP_KEY "YOUR-APP-KEY" // Should look like "de0bxxxx-1x3x-4x3x-ax2x-5dabxxxxxxxx" 59 | #define APP_SECRET "YOUR-APP-SECRET" // Should look like "5f36xxxx-x3x7-4x3x-xexe-e86724a9xxxx-4c4axxxx-3x3x-x5xe-x9x3-333d65xxxxxx" 60 | 61 | #define SWITCH_ID_1 "YOUR-DEVICE-ID" // Should look like "5dc1564130xxxxxxxxxxxxxx" 62 | #define SWITCH_ID_2 "YOUR-DEVICE-ID" // Should look like "5dc1564130xxxxxxxxxxxxxx" 63 | #define SWITCH_ID_3 "YOUR-DEVICE-ID" // Should look like "5dc1564130xxxxxxxxxxxxxx" 64 | #define SWITCH_ID_4 "YOUR-DEVICE-ID" // Should look like "5dc1564130xxxxxxxxxxxxxx" 65 | 66 | #define BAUD_RATE 115200 // Change baudrate to your need 67 | 68 | #endif //defines_h 69 | -------------------------------------------------------------------------------- /examples/Generic/Switch/WIO_Terminal/WIO_Terminal_MultiSwitch_intermediate/defines.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | defines.h 3 | For WIO Terminal boards, running RTL8720DN WiFi, using Seeed_Arduino_rpcWiFi and Seeed_Arduino_rpcUnified libraries 4 | 5 | Based on and modified from SinricPro libarary (https://github.com/sinricpro/) 6 | to support other boards such as SAMD21, SAMD51, Adafruit's nRF52 boards, etc. 7 | 8 | Built by Khoi Hoang https://github.com/khoih-prog/SinricPro_Generic 9 | Licensed under MIT license 10 | 11 | Copyright (c) 2019 Sinric. All rights reserved. 12 | Licensed under Creative Commons Attribution-Share Alike (CC BY-SA) 13 | 14 | This file is part of the Sinric Pro (https://github.com/sinricpro/) 15 | **********************************************************************************************************************************/ 16 | 17 | #ifndef defines_h 18 | #define defines_h 19 | 20 | #define SINRIC_PRO_USING_RTL8720DN true 21 | 22 | #define WEBSOCKETS_NETWORK_TYPE NETWORK_RTL8720DN 23 | 24 | #if !defined(SEEED_WIO_TERMINAL) 25 | #error This code is intended to run on the SEEED_WIO_TERMINAL ! Please check your Tools->Board setting. 26 | #endif 27 | 28 | #warning Using SEEED_WIO_TERMINAL 29 | 30 | #define SRP_DEBUG_PORT Serial 31 | 32 | // Debug Level from 0 to 4 33 | #define _SRP_LOGLEVEL_ 1 34 | 35 | // Uncomment the following line to enable serial debug output 36 | #define ENABLE_DEBUG true 37 | 38 | #if ENABLE_DEBUG 39 | #define DEBUG_PORT Serial 40 | #define NODEBUG_WEBSOCKETS 41 | #define NDEBUG 42 | #endif 43 | 44 | #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" 45 | 46 | #ifndef BOARD_NAME 47 | #define BOARD_NAME BOARD_TYPE 48 | #endif 49 | 50 | #include 51 | 52 | // Select the IP address according to your local network 53 | IPAddress ip(192, 168, 2, 222); 54 | 55 | #define WIFI_SSID "YOUR-WIFI-SSID" 56 | #define WIFI_PASS "YOUR-WIFI-PASSWORD" 57 | 58 | #define APP_KEY "YOUR-APP-KEY" // Should look like "de0bxxxx-1x3x-4x3x-ax2x-5dabxxxxxxxx" 59 | #define APP_SECRET "YOUR-APP-SECRET" // Should look like "5f36xxxx-x3x7-4x3x-xexe-e86724a9xxxx-4c4axxxx-3x3x-x5xe-x9x3-333d65xxxxxx" 60 | 61 | #define SWITCH_ID_1 "YOUR-DEVICE-ID" // Should look like "5dc1564130xxxxxxxxxxxxxx" 62 | #define SWITCH_ID_2 "YOUR-DEVICE-ID" // Should look like "5dc1564130xxxxxxxxxxxxxx" 63 | #define SWITCH_ID_3 "YOUR-DEVICE-ID" // Should look like "5dc1564130xxxxxxxxxxxxxx" 64 | #define SWITCH_ID_4 "YOUR-DEVICE-ID" // Should look like "5dc1564130xxxxxxxxxxxxxx" 65 | 66 | #define BAUD_RATE 115200 // Change baudrate to your need 67 | 68 | #define DEVICES 4 // define how much devices are in SWITCH_IDs array 69 | 70 | #endif //defines_h 71 | -------------------------------------------------------------------------------- /examples/Generic/Switch/WIO_Terminal/WIO_Terminal_Switch/defines.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | defines.h 3 | For WIO Terminal boards, running RTL8720DN WiFi, using Seeed_Arduino_rpcWiFi and Seeed_Arduino_rpcUnified libraries 4 | 5 | Based on and modified from SinricPro libarary (https://github.com/sinricpro/) 6 | to support other boards such as SAMD21, SAMD51, Adafruit's nRF52 boards, etc. 7 | 8 | Built by Khoi Hoang https://github.com/khoih-prog/SinricPro_Generic 9 | Licensed under MIT license 10 | 11 | Copyright (c) 2019 Sinric. All rights reserved. 12 | Licensed under Creative Commons Attribution-Share Alike (CC BY-SA) 13 | 14 | This file is part of the Sinric Pro (https://github.com/sinricpro/) 15 | **********************************************************************************************************************************/ 16 | 17 | #ifndef defines_h 18 | #define defines_h 19 | 20 | #define SINRIC_PRO_USING_RTL8720DN true 21 | 22 | #define WEBSOCKETS_NETWORK_TYPE NETWORK_RTL8720DN 23 | 24 | #if !defined(SEEED_WIO_TERMINAL) 25 | #error This code is intended to run on the SEEED_WIO_TERMINAL ! Please check your Tools->Board setting. 26 | #endif 27 | 28 | #warning Using SEEED_WIO_TERMINAL 29 | 30 | #define SRP_DEBUG_PORT Serial 31 | 32 | // Debug Level from 0 to 4 33 | #define _SRP_LOGLEVEL_ 1 34 | 35 | // Uncomment the following line to enable serial debug output 36 | #define ENABLE_DEBUG true 37 | 38 | #if ENABLE_DEBUG 39 | #define DEBUG_PORT Serial 40 | #define NODEBUG_WEBSOCKETS 41 | #define NDEBUG 42 | #endif 43 | 44 | #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" 45 | 46 | #ifndef BOARD_NAME 47 | #define BOARD_NAME BOARD_TYPE 48 | #endif 49 | 50 | #include 51 | 52 | // Select the IP address according to your local network 53 | IPAddress ip(192, 168, 2, 222); 54 | 55 | #define WIFI_SSID "YOUR-WIFI-SSID" 56 | #define WIFI_PASS "YOUR-WIFI-PASSWORD" 57 | 58 | #define APP_KEY "YOUR-APP-KEY" // Should look like "de0bxxxx-1x3x-4x3x-ax2x-5dabxxxxxxxx" 59 | #define APP_SECRET "YOUR-APP-SECRET" // Should look like "5f36xxxx-x3x7-4x3x-xexe-e86724a9xxxx-4c4axxxx-3x3x-x5xe-x9x3-333d65xxxxxx" 60 | 61 | #define SWITCH_ID "YOUR-DEVICE-ID" // Should look like "5dc1564130xxxxxxxxxxxxxx" 62 | 63 | #define BAUD_RATE 115200 // Change baudrate to your need 64 | 65 | #define BUTTON_PIN 0 // GPIO for BUTTON (inverted: LOW = pressed, HIGH = released) 66 | #define LED_PIN 2 // GPIO for LED (inverted) 67 | #endif //defines_h 68 | -------------------------------------------------------------------------------- /examples/Generic/TV/WIO_Terminal_TV/defines.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | defines.h 3 | For WIO Terminal boards, running RTL8720DN WiFi, using Seeed_Arduino_rpcWiFi and Seeed_Arduino_rpcUnified libraries 4 | 5 | Based on and modified from SinricPro libarary (https://github.com/sinricpro/) 6 | to support other boards such as SAMD21, SAMD51, Adafruit's nRF52 boards, etc. 7 | 8 | Built by Khoi Hoang https://github.com/khoih-prog/SinricPro_Generic 9 | Licensed under MIT license 10 | 11 | Copyright (c) 2019 Sinric. All rights reserved. 12 | Licensed under Creative Commons Attribution-Share Alike (CC BY-SA) 13 | 14 | This file is part of the Sinric Pro (https://github.com/sinricpro/) 15 | **********************************************************************************************************************************/ 16 | 17 | #ifndef defines_h 18 | #define defines_h 19 | 20 | #define SINRIC_PRO_USING_RTL8720DN true 21 | 22 | #define WEBSOCKETS_NETWORK_TYPE NETWORK_RTL8720DN 23 | 24 | #if !defined(SEEED_WIO_TERMINAL) 25 | #error This code is intended to run on the SEEED_WIO_TERMINAL ! Please check your Tools->Board setting. 26 | #endif 27 | 28 | #warning Using SEEED_WIO_TERMINAL 29 | 30 | #define SRP_DEBUG_PORT Serial 31 | 32 | // Debug Level from 0 to 4 33 | #define _SRP_LOGLEVEL_ 1 34 | 35 | // Uncomment the following line to enable serial debug output 36 | #define ENABLE_DEBUG true 37 | 38 | #if ENABLE_DEBUG 39 | #define DEBUG_PORT Serial 40 | #define NODEBUG_WEBSOCKETS 41 | #define NDEBUG 42 | #endif 43 | 44 | #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" 45 | 46 | #ifndef BOARD_NAME 47 | #define BOARD_NAME BOARD_TYPE 48 | #endif 49 | 50 | #include 51 | 52 | // Select the IP address according to your local network 53 | IPAddress ip(192, 168, 2, 222); 54 | 55 | #define WIFI_SSID "YOUR-WIFI-SSID" 56 | #define WIFI_PASS "YOUR-WIFI-PASSWORD" 57 | 58 | #define APP_KEY "YOUR-APP-KEY" // Should look like "de0bxxxx-1x3x-4x3x-ax2x-5dabxxxxxxxx" 59 | #define APP_SECRET "YOUR-APP-SECRET" // Should look like "5f36xxxx-x3x7-4x3x-xexe-e86724a9xxxx-4c4axxxx-3x3x-x5xe-x9x3-333d65xxxxxx" 60 | 61 | #define TV_ID "YOUR-DEVICE-ID" // Should look like "5dc1564130xxxxxxxxxxxxxx" 62 | 63 | #define BAUD_RATE 115200 // Change baudrate to your need 64 | 65 | #endif //defines_h 66 | -------------------------------------------------------------------------------- /examples/Generic/TemperatureSensor/DHT22_Wiring.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khoih-prog/SinricPro_Generic/3f4e17eb2844e47914405cb1a02016d9ee6cbff2/examples/Generic/TemperatureSensor/DHT22_Wiring.png -------------------------------------------------------------------------------- /examples/Generic/TemperatureSensor/README.md: -------------------------------------------------------------------------------- 1 | # Temperature Sensor Example 2 | ![Wiring](https://github.com/sinricpro/esp8266-esp32-sdk/raw/master/examples/temperaturesensor/DHT22_Wiring.png) 3 | 4 | D5: connected to DHT22 signal and via 10k resistor to +3.3V 5 | -------------------------------------------------------------------------------- /examples/Generic/Thermostat/WIO_Terminal_Thermostat/defines.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | defines.h 3 | For WIO Terminal boards, running RTL8720DN WiFi, using Seeed_Arduino_rpcWiFi and Seeed_Arduino_rpcUnified libraries 4 | 5 | Based on and modified from SinricPro libarary (https://github.com/sinricpro/) 6 | to support other boards such as SAMD21, SAMD51, Adafruit's nRF52 boards, etc. 7 | 8 | Built by Khoi Hoang https://github.com/khoih-prog/SinricPro_Generic 9 | Licensed under MIT license 10 | 11 | Copyright (c) 2019 Sinric. All rights reserved. 12 | Licensed under Creative Commons Attribution-Share Alike (CC BY-SA) 13 | 14 | This file is part of the Sinric Pro (https://github.com/sinricpro/) 15 | **********************************************************************************************************************************/ 16 | 17 | #ifndef defines_h 18 | #define defines_h 19 | 20 | #define SINRIC_PRO_USING_RTL8720DN true 21 | 22 | #define WEBSOCKETS_NETWORK_TYPE NETWORK_RTL8720DN 23 | 24 | #if !defined(SEEED_WIO_TERMINAL) 25 | #error This code is intended to run on the SEEED_WIO_TERMINAL ! Please check your Tools->Board setting. 26 | #endif 27 | 28 | #warning Using SEEED_WIO_TERMINAL 29 | 30 | #define SRP_DEBUG_PORT Serial 31 | 32 | // Debug Level from 0 to 4 33 | #define _SRP_LOGLEVEL_ 1 34 | 35 | // Uncomment the following line to enable serial debug output 36 | #define ENABLE_DEBUG true 37 | 38 | #if ENABLE_DEBUG 39 | #define DEBUG_PORT Serial 40 | #define NODEBUG_WEBSOCKETS 41 | #define NDEBUG 42 | #endif 43 | 44 | #define BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" 45 | 46 | #ifndef BOARD_NAME 47 | #define BOARD_NAME BOARD_TYPE 48 | #endif 49 | 50 | #include 51 | 52 | // Select the IP address according to your local network 53 | IPAddress ip(192, 168, 2, 222); 54 | 55 | #define WIFI_SSID "YOUR-WIFI-SSID" 56 | #define WIFI_PASS "YOUR-WIFI-PASSWORD" 57 | 58 | #define APP_KEY "YOUR-APP-KEY" // Should look like "de0bxxxx-1x3x-4x3x-ax2x-5dabxxxxxxxx" 59 | #define APP_SECRET "YOUR-APP-SECRET" // Should look like "5f36xxxx-x3x7-4x3x-xexe-e86724a9xxxx-4c4axxxx-3x3x-x5xe-x9x3-333d65xxxxxx" 60 | 61 | #define APP_KEY "YOUR-APP-KEY" // Should look like "de0bxxxx-1x3x-4x3x-ax2x-5dabxxxxxxxx" 62 | #define APP_SECRET "YOUR-APP-SECRET" // Should look like "5f36xxxx-x3x7-4x3x-xexe-e86724a9xxxx-4c4axxxx-3x3x-x5xe-x9x3-333d65xxxxxx" 63 | 64 | #define THERMOSTAT_ID "YOUR_DEVICE_ID_HERE" // Should look like "5dc1564130xxxxxxxxxxxxxx" 65 | 66 | #define BAUD_RATE 115200 // Change baudrate to your need 67 | 68 | #endif //defines_h 69 | -------------------------------------------------------------------------------- /examples/WT32_ETH01/Light/RGB_LED_Stripe_5050/RGB_LED_Stripe_5050.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khoih-prog/SinricPro_Generic/3f4e17eb2844e47914405cb1a02016d9ee6cbff2/examples/WT32_ETH01/Light/RGB_LED_Stripe_5050/RGB_LED_Stripe_5050.png -------------------------------------------------------------------------------- /examples/WT32_ETH01/temperaturesensor/DHT22_Wiring.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khoih-prog/SinricPro_Generic/3f4e17eb2844e47914405cb1a02016d9ee6cbff2/examples/WT32_ETH01/temperaturesensor/DHT22_Wiring.png -------------------------------------------------------------------------------- /examples/WT32_ETH01/temperaturesensor/README.md: -------------------------------------------------------------------------------- 1 | # Temperature Sensor Example 2 | ![Wiring](https://github.com/sinricpro/esp8266-esp32-sdk/raw/master/examples/temperaturesensor/DHT22_Wiring.png) 3 | 4 | D5: connected to DHT22 signal and via 10k resistor to +3.3V 5 | -------------------------------------------------------------------------------- /library.properties: -------------------------------------------------------------------------------- 1 | name=SinricPro_Generic 2 | version=2.8.5 3 | author=Boris Jaeger , Khoi Hoang 4 | maintainer=Khoi Hoang 5 | sentence=Library for https://sinric.pro - Simple way to connect your device to Alexa 6 | paragraph=Simple way to control your IoT development boards like ESP8226, ESP32, WT32_ETH01, Arduino SAMD21, Adafruit SAMD21, SAMD51, nRF52, STM32F/L/H/G/WB/MP1, Teensy, SAM DUE, RP2040-based (Nano_RP2040_Connect, RASPBERRY_PI_PICO), Portenta_H7 using W5x00/ENC28J60 Ethernet, WiFiNINA or RTL8720DN, Portenta Ethernet, with Amazon Alexa or Google Home. 7 | category=Communication 8 | url=https://github.com/khoih-prog/SinricPro_Generic 9 | architectures=* 10 | repository=https://github.com/khoih-prog/SinricPro_Generic 11 | license=CC-BY-SA 12 | depends=ArduinoJson, WebSockets_Generic, WebServer_WT32_ETH01, WiFiNINA_Generic, WiFi101_Generic, Ethernet_Generic, UIPEthernet, STM32duino STM32Ethernet, STM32duino LwIP 13 | includes=SinricPro_Generic.h 14 | -------------------------------------------------------------------------------- /pics/ICSP_connector.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/khoih-prog/SinricPro_Generic/3f4e17eb2844e47914405cb1a02016d9ee6cbff2/pics/ICSP_connector.jpg -------------------------------------------------------------------------------- /src/SinricProCamera.h: -------------------------------------------------------------------------------- 1 | /********************************************************************************************************************************* 2 | SinricProCamera.h - Sinric Pro Library for boards 3 | 4 | Based on and modified from SinricPro libarary (https://github.com/sinricpro/) 5 | to support other boards such as SAMD21, SAMD51, Adafruit's nRF52 boards, Teensy, SAM DUE, STM32, etc. 6 | 7 | Built by Khoi Hoang https://github.com/khoih-prog/SinricPro_Generic 8 | Licensed under MIT license 9 | 10 | Copyright (c) 2019 Sinric. All rights reserved. 11 | Licensed under Creative Commons Attribution-Share Alike (CC BY-SA) 12 | 13 | This file is part of the Sinric Pro (https://github.com/sinricpro/) 14 | 15 | Version: 2.8.5 16 | 17 | Version Modified By Date Comments 18 | ------- ----------- ---------- ----------- 19 | 2.4.0 K Hoang 21/05/2020 Initial porting to support SAMD21, SAMD51 nRF52 boards, such as AdaFruit Itsy-Bitsy, 20 | Feather, Gemma, Trinket, Hallowing Metro M0/M4, NRF52840 Feather, Itsy-Bitsy, STM32, etc. 21 | 2.5.1 K Hoang 02/08/2020 Add support to STM32F/L/H/G/WB/MP1. Add debug feature, examples. Restructure examples. 22 | Sync with SinricPro v2.5.1: add Speaker SelectInput, Camera. Enable Ethernetx lib support. 23 | 2.6.1 K Hoang 15/08/2020 Sync with SinricPro v2.6.1: add AirQualitySensor, Camera Class. 24 | 2.7.0 K Hoang 06/10/2020 Sync with SinricPro v2.7.0: Added AppKey, AppSecret and DeviceId classes and RTT function. 25 | 2.7.4 K Hoang 12/11/2020 Sync with SinricPro v2.7.4. Add WIO Terminal support and examples 26 | 2.8.0 K Hoang 10/12/2020 Sync with SinricPro v2.8.0. Add examples. Use std::queue instead of QueueList. SSL Option. 27 | 2.8.1 K Hoang 02/06/2021 Add support to RP2040 using Arduino-mbed or arduino-pico core with WiFiNINA or Ethernet 28 | 2.8.2 K Hoang 20/07/2021 Add support to WT32_ETH01 (ESP32 + LAN8720A) 29 | 2.8.3 K Hoang 12/10/2021 Update `platform.ini` and `library.json` 30 | 2.8.4 K Hoang 01/12/2021 Auto detect ESP32 core for LittleFS. Fix bug in examples for WT32_ETH01 31 | 2.8.5 K Hoang 23/04/2022 Use Ethernet_Generic library as default. Add support to Portenta_H7, etc. 32 | **********************************************************************************************************************************/ 33 | 34 | #ifndef _SINRIC_PRO_CAMERA_H_ 35 | #define _SINRIC_PRO_CAMERA_H_ 36 | 37 | #include "SinricProDevice.h" 38 | 39 | /** 40 | @class SinricProCamera 41 | @brief Camera suporting basic on / off command 42 | **/ 43 | class SinricProCamera : public SinricProDevice 44 | { 45 | public: 46 | SinricProCamera(const DeviceId &deviceId); 47 | 48 | String getProductType() 49 | { 50 | return SinricProDevice::getProductType() + String("CAMERA"); 51 | } 52 | }; 53 | 54 | SinricProCamera::SinricProCamera(const DeviceId &deviceId) : SinricProDevice(deviceId) {} 55 | 56 | 57 | #endif // _SINRIC_PRO_CAMERA_H_ 58 | 59 | -------------------------------------------------------------------------------- /src/SinricProFan.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | SinricProFan.h - Sinric Pro Library for boards 3 | 4 | Based on and modified from SinricPro libarary (https://github.com/sinricpro/) 5 | to support other boards such as SAMD21, SAMD51, Adafruit's nRF52 boards, Teensy, SAM DUE, STM32, etc. 6 | 7 | Built by Khoi Hoang https://github.com/khoih-prog/SinricPro_Generic 8 | Licensed under MIT license 9 | 10 | Copyright (c) 2019 Sinric. All rights reserved. 11 | Licensed under Creative Commons Attribution-Share Alike (CC BY-SA) 12 | 13 | This file is part of the Sinric Pro (https://github.com/sinricpro/) 14 | 15 | Version: 2.8.5 16 | 17 | Version Modified By Date Comments 18 | ------- ----------- ---------- ----------- 19 | 2.4.0 K Hoang 21/05/2020 Initial porting to support SAMD21, SAMD51 nRF52 boards, such as AdaFruit Itsy-Bitsy, 20 | Feather, Gemma, Trinket, Hallowing Metro M0/M4, NRF52840 Feather, Itsy-Bitsy, STM32, etc. 21 | 2.5.1 K Hoang 02/08/2020 Add support to STM32F/L/H/G/WB/MP1. Add debug feature, examples. Restructure examples. 22 | Sync with SinricPro v2.5.1: add Speaker SelectInput, Camera. Enable Ethernetx lib support. 23 | 2.6.1 K Hoang 15/08/2020 Sync with SinricPro v2.6.1: add AirQualitySensor, Camera Class. 24 | 2.7.0 K Hoang 06/10/2020 Sync with SinricPro v2.7.0: Added AppKey, AppSecret and DeviceId classes and RTT function. 25 | 2.7.4 K Hoang 12/11/2020 Sync with SinricPro v2.7.4. Add WIO Terminal support and examples 26 | 2.8.0 K Hoang 10/12/2020 Sync with SinricPro v2.8.0. Add examples. Use std::queue instead of QueueList. SSL Option. 27 | 2.8.1 K Hoang 02/06/2021 Add support to RP2040 using Arduino-mbed or arduino-pico core with WiFiNINA or Ethernet 28 | 2.8.2 K Hoang 20/07/2021 Add support to WT32_ETH01 (ESP32 + LAN8720A) 29 | 2.8.3 K Hoang 12/10/2021 Update `platform.ini` and `library.json` 30 | 2.8.4 K Hoang 01/12/2021 Auto detect ESP32 core for LittleFS. Fix bug in examples for WT32_ETH01 31 | 2.8.5 K Hoang 23/04/2022 Use Ethernet_Generic library as default. Add support to Portenta_H7, etc. 32 | *****************************************************************************************************************************/ 33 | 34 | #ifndef _SINRIC_PRO_FAN_H_ 35 | #define _SINRIC_PRO_FAN_H_ 36 | 37 | #include "SinricProDevice.h" 38 | #include "SinricProDimSwitch.h" 39 | 40 | /** 41 | @class SinricProFan 42 | @brief Device to turn on / off a fan and change it's speed by using powerlevel 43 | **/ 44 | class SinricProFan : public SinricProDimSwitch 45 | { 46 | public: 47 | SinricProFan(const DeviceId &deviceId); 48 | 49 | // From v2.5.1 50 | String getProductType() 51 | { 52 | return SinricProDevice::getProductType() + String("FAN"); 53 | } 54 | ////// 55 | }; 56 | 57 | SinricProFan::SinricProFan(const DeviceId &deviceId) : SinricProDimSwitch(deviceId) {} 58 | 59 | #endif //_SINRIC_PRO_FAN_H_ 60 | -------------------------------------------------------------------------------- /src/SinricProInterface.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | SinricProInterface.h - Sinric Pro Library for boards 3 | 4 | Based on and modified from SinricPro libarary (https://github.com/sinricpro/) 5 | to support other boards such as SAMD21, SAMD51, Adafruit's nRF52 boards, Teensy, SAM DUE, STM32, etc. 6 | 7 | Built by Khoi Hoang https://github.com/khoih-prog/SinricPro_Generic 8 | Licensed under MIT license 9 | 10 | Copyright (c) 2019 Sinric. All rights reserved. 11 | Licensed under Creative Commons Attribution-Share Alike (CC BY-SA) 12 | 13 | This file is part of the Sinric Pro (https://github.com/sinricpro/) 14 | 15 | Version: 2.8.5 16 | 17 | Version Modified By Date Comments 18 | ------- ----------- ---------- ----------- 19 | 2.4.0 K Hoang 21/05/2020 Initial porting to support SAMD21, SAMD51 nRF52 boards, such as AdaFruit Itsy-Bitsy, 20 | Feather, Gemma, Trinket, Hallowing Metro M0/M4, NRF52840 Feather, Itsy-Bitsy, STM32, etc. 21 | 2.5.1 K Hoang 02/08/2020 Add support to STM32F/L/H/G/WB/MP1. Add debug feature, examples. Restructure examples. 22 | Sync with SinricPro v2.5.1: add Speaker SelectInput, Camera. Enable Ethernetx lib support. 23 | 2.6.1 K Hoang 15/08/2020 Sync with SinricPro v2.6.1: add AirQualitySensor, Camera Class. 24 | 2.7.0 K Hoang 06/10/2020 Sync with SinricPro v2.7.0: Added AppKey, AppSecret and DeviceId classes and RTT function. 25 | 2.7.4 K Hoang 12/11/2020 Sync with SinricPro v2.7.4. Add WIO Terminal support and examples 26 | 2.8.0 K Hoang 10/12/2020 Sync with SinricPro v2.8.0. Add examples. Use std::queue instead of QueueList. SSL Option. 27 | 2.8.1 K Hoang 02/06/2021 Add support to RP2040 using Arduino-mbed or arduino-pico core with WiFiNINA or Ethernet 28 | 2.8.2 K Hoang 20/07/2021 Add support to WT32_ETH01 (ESP32 + LAN8720A) 29 | 2.8.3 K Hoang 12/10/2021 Update `platform.ini` and `library.json` 30 | 2.8.4 K Hoang 01/12/2021 Auto detect ESP32 core for LittleFS. Fix bug in examples for WT32_ETH01 31 | 2.8.5 K Hoang 23/04/2022 Use Ethernet_Generic library as default. Add support to Portenta_H7, etc. 32 | *****************************************************************************************************************************/ 33 | 34 | #ifndef _SINRIC_PRO_INTERFACE_H_ 35 | #define _SINRIC_PRO_INTERFACE_H_ 36 | 37 | #include "ArduinoJson.h" 38 | #include "SinricProQueue.h" 39 | #include "SinricProId.h" 40 | 41 | class SinricProInterface 42 | { 43 | public: 44 | virtual void sendMessage(JsonDocument& jsonEvent); 45 | virtual DynamicJsonDocument prepareEvent(DeviceId deviceId, const char* action, const char* cause); 46 | virtual unsigned long getTimestamp(); 47 | 48 | // From v2.5.1 49 | virtual bool isConnected(); 50 | ////// 51 | }; 52 | 53 | 54 | #endif //_SINRIC_PRO_INTERFACE_H_ 55 | -------------------------------------------------------------------------------- /src/SinricProSwitch.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************************************************************** 2 | SinricProSwitch.h - Sinric Pro Library for boards 3 | 4 | Based on and modified from SinricPro libarary (https://github.com/sinricpro/) 5 | to support other boards such as SAMD21, SAMD51, Adafruit's nRF52 boards, Teensy, SAM DUE, STM32, etc. 6 | 7 | Built by Khoi Hoang https://github.com/khoih-prog/SinricPro_Generic 8 | Licensed under MIT license 9 | 10 | Copyright (c) 2019 Sinric. All rights reserved. 11 | Licensed under Creative Commons Attribution-Share Alike (CC BY-SA) 12 | 13 | This file is part of the Sinric Pro (https://github.com/sinricpro/) 14 | 15 | Version: 2.8.5 16 | 17 | Version Modified By Date Comments 18 | ------- ----------- ---------- ----------- 19 | 2.4.0 K Hoang 21/05/2020 Initial porting to support SAMD21, SAMD51 nRF52 boards, such as AdaFruit Itsy-Bitsy, 20 | Feather, Gemma, Trinket, Hallowing Metro M0/M4, NRF52840 Feather, Itsy-Bitsy, STM32, etc. 21 | 2.5.1 K Hoang 02/08/2020 Add support to STM32F/L/H/G/WB/MP1. Add debug feature, examples. Restructure examples. 22 | Sync with SinricPro v2.5.1: add Speaker SelectInput, Camera. Enable Ethernetx lib support. 23 | 2.6.1 K Hoang 15/08/2020 Sync with SinricPro v2.6.1: add AirQualitySensor, Camera Class. 24 | 2.7.0 K Hoang 06/10/2020 Sync with SinricPro v2.7.0: Added AppKey, AppSecret and DeviceId classes and RTT function. 25 | 2.7.4 K Hoang 12/11/2020 Sync with SinricPro v2.7.4. Add WIO Terminal support and examples 26 | 2.8.0 K Hoang 10/12/2020 Sync with SinricPro v2.8.0. Add examples. Use std::queue instead of QueueList. SSL Option. 27 | 2.8.1 K Hoang 02/06/2021 Add support to RP2040 using Arduino-mbed or arduino-pico core with WiFiNINA or Ethernet 28 | 2.8.2 K Hoang 20/07/2021 Add support to WT32_ETH01 (ESP32 + LAN8720A) 29 | 2.8.3 K Hoang 12/10/2021 Update `platform.ini` and `library.json` 30 | 2.8.4 K Hoang 01/12/2021 Auto detect ESP32 core for LittleFS. Fix bug in examples for WT32_ETH01 31 | 2.8.5 K Hoang 23/04/2022 Use Ethernet_Generic library as default. Add support to Portenta_H7, etc. 32 | *****************************************************************************************************************************/ 33 | 34 | #ifndef _SINRIC_PRO_SWITCH_H_ 35 | #define _SINRIC_PRO_SWITCH_H_ 36 | 37 | #include "SinricProDevice.h" 38 | 39 | /** 40 | @class SinricProSwitch 41 | @brief Device suporting basic on / off command 42 | **/ 43 | class SinricProSwitch : public SinricProDevice 44 | { 45 | public: 46 | SinricProSwitch(const DeviceId &deviceId); 47 | 48 | // From v2.5.1 49 | String getProductType() 50 | { 51 | return SinricProDevice::getProductType() + String("SWITCH"); 52 | } 53 | ////// 54 | }; 55 | 56 | SinricProSwitch::SinricProSwitch(const DeviceId &deviceId) : SinricProDevice(deviceId) {} 57 | 58 | 59 | #endif //_SINRIC_PRO_SWITCH_H_ 60 | -------------------------------------------------------------------------------- /src/extralib/Crypto/AESLib.cpp: -------------------------------------------------------------------------------- 1 | #include "AESLib.h" 2 | 3 | uint8_t AESLib::getrnd() 4 | { 5 | uint8_t really_random = *(volatile uint8_t *)0x3FF20E44; 6 | return really_random; 7 | } 8 | 9 | void AESLib::gen_iv(byte *iv) 10 | { 11 | for (int i = 0 ; i < N_BLOCK ; i++ ) 12 | { 13 | iv[i] = (byte) getrnd(); 14 | } 15 | } 16 | 17 | /*String AESLib::decrypt(String msg, byte key[], byte my_iv[]) { 18 | 19 | 20 | aes.set_key(key, sizeof(key)); 21 | //int base64_decode(char * output, char * input, int inputLen) { 22 | char decoded[200]; 23 | char temp[200]; 24 | msg.toCharArray(temp, 200); 25 | 26 | base64_decode(decoded, temp, msg.length()); 27 | 28 | byte out[200]; 29 | aes.do_aes_decrypt((byte *)decoded, N_BLOCK, out, key, 128, (byte *)my_iv); 30 | 31 | char message[msg.length()]; 32 | base64_decode(message, (char *)out, msg.length()); 33 | printf("Out %s \n", message); 34 | 35 | //Serial.println("Decoded: " + String(decoded)); 36 | 37 | //N_BLOCK 38 | 39 | }*/ 40 | 41 | /*void decrypt(String b64data, String IV_base64, int size) 42 | { 43 | char data_decoded[200]; 44 | char iv_decoded[200]; 45 | byte out[200]; 46 | char temp[200]; 47 | b64data.toCharArray(temp, 200); 48 | base64_decode(data_decoded, temp, b64data.length()); 49 | IV_base64.toCharArray(temp, 200); 50 | 51 | base64_decode(iv_decoded, temp, IV_base64.length()); 52 | 53 | aes.do_aes_decrypt((byte *)data_decoded, size, out, key, 128, (byte *)iv_decoded); 54 | char message[msg.length()]; 55 | base64_decode(message, (char *)out, b64data.length()); 56 | printf("Out %s \n", message); 57 | }*/ 58 | 59 | 60 | 61 | String AESLib::encrypt(String msg, byte key[], byte my_iv[]) 62 | { 63 | char b64data[200]; 64 | byte cipher[1000]; 65 | 66 | aes.set_key( key, sizeof(key)); 67 | base64_encode(b64data, (char *)my_iv, N_BLOCK); 68 | int b64len = base64_encode(b64data, (char *)msg.c_str(), msg.length()); 69 | // Encrypt! With AES128, our key and IV, CBC and pkcs7 padding 70 | aes.do_aes_encrypt((byte *)b64data, b64len, cipher, key, 128, my_iv); 71 | base64_encode(b64data, (char *)cipher, aes.get_size() ); 72 | return String(b64data); 73 | } -------------------------------------------------------------------------------- /src/extralib/Crypto/AESLib.h: -------------------------------------------------------------------------------- 1 | #ifndef AESLib_h 2 | #define AESLib_h 3 | 4 | #include "Arduino.h" 5 | #include "AES.h" 6 | #include "Base64.h" 7 | 8 | class AESLib 9 | { 10 | public: 11 | void gen_iv(byte *iv); 12 | String encrypt(String msg, byte key[], byte my_iv[]); 13 | //String decrypt(String msg, byte key[], byte my_iv[]); 14 | 15 | private: 16 | uint8_t getrnd(); 17 | AES_Crypto aes; 18 | }; 19 | 20 | 21 | #endif //AESLib_h 22 | -------------------------------------------------------------------------------- /src/extralib/Crypto/AES_config.h: -------------------------------------------------------------------------------- 1 | /* code was modified by george spanos 2 | 16/12/14 3 | 4 | */ 5 | 6 | #ifndef __AES_CONFIG_H__ 7 | #define __AES_CONFIG_H__ 8 | 9 | #if (defined(__linux) || defined(linux)) && !defined(__ARDUINO_X86__) 10 | 11 | #define AES_LINUX 12 | 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #else 20 | #include 21 | #endif 22 | 23 | #include 24 | #include 25 | 26 | #if defined(__ARDUINO_X86__) || (defined (__linux) || defined (linux)) 27 | #undef PROGMEM 28 | #define PROGMEM __attribute__(( section(".progmem.data") )) 29 | #define pgm_read_byte(p) (*(p)) 30 | typedef unsigned char byte; 31 | #define printf_P printf 32 | #define PSTR(x) (x) 33 | #else 34 | // KH 35 | #if (defined(ESP8266) || defined(ESP32)) 36 | #include 37 | #else 38 | #include 39 | #include 40 | #endif 41 | #endif 42 | 43 | #define N_ROW 4 44 | #define N_COL 4 45 | #define N_BLOCK (N_ROW * N_COL) 46 | #define N_MAX_ROUNDS 14 47 | #define KEY_SCHEDULE_BYTES ((N_MAX_ROUNDS + 1) * N_BLOCK) 48 | #define SUCCESS (0) 49 | #define FAILURE (-1) 50 | 51 | #endif //__AES_CONFIG_H__ 52 | -------------------------------------------------------------------------------- /src/extralib/Crypto/Base64.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2013 Adam Rudd. 3 | See LICENSE for more information 4 | 5 | */ 6 | #ifndef _BASE64_H 7 | #define _BASE64_H 8 | 9 | /* b64_alphabet: 10 | Description: Base64 alphabet table, a mapping between integers 11 | and base64 digits 12 | Notes: This is an extern here but is defined in Base64.c 13 | */ 14 | extern const char b64_alphabet[]; 15 | 16 | /* base64_encode: 17 | Description: 18 | Encode a string of characters as base64 19 | Parameters: 20 | output: the output buffer for the encoding, stores the encoded string 21 | input: the input buffer for the encoding, stores the binary to be encoded 22 | inputLen: the length of the input buffer, in bytes 23 | Return value: 24 | Returns the length of the encoded string 25 | Requirements: 26 | 1. output must not be null or empty 27 | 2. input must not be null 28 | 3. inputLen must be greater than or equal to 0 29 | */ 30 | int base64_encode(char *output, char *input, int inputLen); 31 | 32 | /* base64_decode: 33 | Description: 34 | Decode a base64 encoded string into bytes 35 | Parameters: 36 | output: the output buffer for the decoding, 37 | stores the decoded binary 38 | input: the input buffer for the decoding, 39 | stores the base64 string to be decoded 40 | inputLen: the length of the input buffer, in bytes 41 | Return value: 42 | Returns the length of the decoded string 43 | Requirements: 44 | 1. output must not be null or empty 45 | 2. input must not be null 46 | 3. inputLen must be greater than or equal to 0 47 | */ 48 | int base64_decode(char *output, char *input, int inputLen); 49 | 50 | /* base64_enc_len: 51 | Description: 52 | Returns the length of a base64 encoded string whose decoded 53 | form is inputLen bytes long 54 | Parameters: 55 | inputLen: the length of the decoded string 56 | Return value: 57 | The length of a base64 encoded string whose decoded form 58 | is inputLen bytes long 59 | Requirements: 60 | None 61 | */ 62 | int base64_enc_len(int inputLen); 63 | 64 | /* base64_dec_len: 65 | Description: 66 | Returns the length of the decoded form of a 67 | base64 encoded string 68 | Parameters: 69 | input: the base64 encoded string to be measured 70 | inputLen: the length of the base64 encoded string 71 | Return value: 72 | Returns the length of the decoded form of a 73 | base64 encoded string 74 | Requirements: 75 | 1. input must not be null 76 | 2. input must be greater than or equal to zero 77 | */ 78 | int base64_dec_len(char *input, int inputLen); 79 | 80 | #endif // _BASE64_H 81 | -------------------------------------------------------------------------------- /utils/astyle_library.conf: -------------------------------------------------------------------------------- 1 | # Code formatting rules for Arduino libraries, modified from for KH libraries: 2 | # 3 | # https://github.com/arduino/Arduino/blob/master/build/shared/examples_formatter.conf 4 | # 5 | 6 | # astyle --style=allman -s2 -t2 -C -S -xW -Y -M120 -f -p -xg -H -xb -c --xC120 -xL *.h *.cpp *.ino 7 | 8 | --mode=c 9 | --lineend=linux 10 | --style=allman 11 | 12 | # -r or -R 13 | #--recursive 14 | 15 | # -c => Converts tabs into spaces 16 | convert-tabs 17 | 18 | # -s2 => 2 spaces indentation 19 | --indent=spaces=2 20 | 21 | # -t2 => tab =2 spaces 22 | #--indent=tab=2 23 | 24 | # -C 25 | --indent-classes 26 | 27 | # -S 28 | --indent-switches 29 | 30 | # -xW 31 | --indent-preproc-block 32 | 33 | # -Y => indent classes, switches (and cases), comments starting at column 1 34 | --indent-col1-comments 35 | 36 | # -M120 => maximum of 120 spaces to indent a continuation line 37 | --max-continuation-indent=120 38 | 39 | # -xC120 => max‑code‑length will break a line if the code exceeds # characters 40 | --max-code-length=120 41 | 42 | # -f => 43 | --break-blocks 44 | 45 | # -p => put a space around operators 46 | --pad-oper 47 | 48 | # -xg => Insert space padding after commas 49 | --pad-comma 50 | 51 | # -H => put a space after if/for/while 52 | pad-header 53 | 54 | # -xb => Break one line headers (e.g. if/for/while) 55 | --break-one-line-headers 56 | 57 | # -c => Converts tabs into spaces 58 | #--convert-tabs 59 | 60 | # if you like one-liners, keep them 61 | #keep-one-line-statements 62 | 63 | # -xV 64 | --attach-closing-while 65 | 66 | #unpad-paren 67 | 68 | # -xp 69 | remove-comment-prefix 70 | 71 | -------------------------------------------------------------------------------- /utils/restyle.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | for dir in . ; do 4 | find $dir -type f \( -name "*.c" -o -name "*.h" -o -name "*.cpp" -o -name "*.ino" \) -exec astyle --suffix=none --options=./utils/astyle_library.conf \{\} \; 5 | done 6 | 7 | --------------------------------------------------------------------------------