This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <Arduino.h> | |
| #include <ModbusMaster.h> | |
| #define MAX485_DE_RE 4 | |
| ModbusMaster node; | |
| void preTransmission() | |
| { | |
| digitalWrite(MAX485_DE_RE, HIGH); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function vi ($File){ | |
| $File = $File -replace "\\", "/" -replace " ", "\ " | |
| bash -c "vi $File" | |
| } | |
| function nano ($File){ | |
| $File = $File -replace "\\", "/" -replace " ", "\ " | |
| bash -c "nano $File" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys | |
| import tty | |
| import termios | |
| def user_input(prompt, default = None, sensitive = False, ret_type = str, required = True): | |
| prompt_default = default | |
| # if they provided a default, the input cannot be required | |
| if default is not None: | |
| required = False |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * | |
| * This code is a BLE client for the AB Shutter3. | |
| * It scans for the AB Shutter3 and connects to it. | |
| * It then subscribes to the Input Report characteristic and waits for button events. | |
| * When a button event is received, it prints the button event to the serial monitor. | |
| * | |
| * The code is written in C++ and uses the NimBLE library. | |
| * | |
| * The code is written for the ESP32 board. |
OlderNewer