Switch/Tunnel for ThroughLoRa-SoftwareBitBang.
- Author
- drtrigon
- Date
- 2018-08-08
- Version
- 1.1
- added missing default to switch cases
- added watchdog for recovery from heavy failures
- changed LoRa frequency/channel
-
1.0
- See Also
- https://github.com/gioblu/PJON/tree/master/src/strategies/ThroughLoRa
* OneWire PJON Generic "OWPG" scheme:
* @ref OWPJON/LINUX/Local/LocalUDP/RemoteWorker/DeviceGeneric/DeviceGeneric.cpp
* For isolated remote SWBB networks on the same bus use e.g. LoRa and setup 2 tunnels/switches
* OWPJON/ARDUINO/Local/SoftwareBitBang/Tunneler/BlinkingSwitch_SWBB-TL/ (this sketch)
*
* Compatible with: atmega328 (Uno, Nano, Uno/Yun combo Dragino LG01-S), atmega32u4 (Yun)
*
* Pinout:
* 1wire PJON data bus (OWPJON SWBB):
* 1WIRE DATA -> Arduino Pin D4
* GND black -> Arduino GND
* 1wire Sniffer/Master/Client Shield
* Dragino Lora Shield Shield or Dragino LG01-S
* @see https://github.com/gioblu/PJON/tree/master/src/strategies/ThroughLoRa#supported-shieldsmodules
*
* Dragino LG01-S:
* - Dragino is recognized as "Yun" but contains an "Uno" (m328p); select "Arduino/Genuino Uno"
* @see http://192.168.11.16/cgi-bin/luci//admin/sensor/mcu
* correct but not needed would be to use
* http://www.dragino.com/downloads/downloads/YunShield/package_dragino_yun_test_index.json
* and select "Dragino Yun + UNO or LG01/OLG01"
* - Disable Dargino wifi; like Yun use WebInterface to configure LAN, DHCP, DISABLE WIFI
* also see comments, hints, etc. in @ref Yun_Dragino_Server_LoRa_WAN/Yun_Dragino_Server_LoRa_WAN.ino
* - Bidirectional Level Shifting 3.3V<->5V needed for SWBB; 3v6 Zener and 4k7 resistor voltage divider
* (consider using @ref OWPJON/ARDUINO/Local/SoftwareBitBang/Tunneler/BlinkingSwitch_3way/BlinkingSwitch_3way.ino
* to isolate 3.3V and 5V bus from each other - also consider LUDP-SWBB-TL 3way tunnel)
* @ref OWPJON/README.md
* @see http://vusb.wikidot.com/hardware
* @see http://www.partsim.com/simulator/#148247
* - LoRa tx power 10..17 dBm; @see https://www.digitalairwireless.com/articles/blog/wifi-transmit-power-calculations-made-simples
* - LoRa settings vs. datarate; @see http://www.rfwireless-world.com/calculators/LoRa-Data-Rate-Calculator.html
* - LoRa settings for max. datarate; lowest SF, CR - highest BW. For max. range; highest SF, (CR for reliability) - lowest BW
* - LoRa frequency and debug; scan for free before using, @see Uno_Serial_LoRa_Sniffer/Uno_Serial_LoRa_Sniffer.ino
* - Debug Dragino; @see http://www.dragino.com/downloads/downloads/YunShield/YUN_SHIELD_QUICK_START_GUIDE_v1.0.pdf
* For reboot via network @see http://192.168.11.16/cgi-bin/luci//admin.
*
* Test on Ubuntu or Raspberry Pi Server (owpshell) confer the docu of
* following files:
* - @ref OWPJON/LINUX/Local/LocalUDP/RemoteWorker/DeviceGeneric/DeviceGeneric.cpp
* - @ref OWPJON/LINUX/Local/ThroughSerial/RemoteWorker/DeviceGeneric/DeviceGeneric.cpp
*
* Thanks to:
* gioblu - PJON 11.0 and support
* @see https://www.pjon.org/
* @see https://github.com/gioblu/PJON
* fredilarsen - support
* Matheus-Garbelini - support
*