Last active
August 27, 2019 08:48
-
-
Save SamadKhafi/a857944169fe9d1fb811fb0945340d26 to your computer and use it in GitHub Desktop.
Debug Nextion display from your linux terminal.
This file contains 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
#!/bin/bash | |
############################################# | |
# # | |
# [Installation]: # | |
# 1. Paste this file in ~ directory # | |
# 2. chmod +x ./nextion # | |
# # | |
# [Usage]: # | |
# ./nextion baudrate usbaddress # | |
# # | |
# [Example]: # | |
# ./nextion 9600 /dev/ttyUSB0 # | |
# # | |
# [Nextion Commands]: # | |
# https://nextion.tech/instruction-set/ # | |
# # | |
############################################# | |
echo "Welcome to Nextion Serial Terminal, "; | |
echo -e "use :q command to quit.\n"; | |
while read line && [ "$line" != ":q" ]; | |
do | |
( stty raw speed $1 >/dev/null; echo -ne "$line\xFF\xFF\xFF" ) >$2 <&1; | |
echo -e "\e[32mSent \u2713\e[39m"; | |
done | |
echo "Goodbye."; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment