Meshtastic xx TTGO with rotary encoder for canned message
In the canned meaage sector, there is an example using ttgo with rotary encoder
It's a 5 pin device, define as following B o --- o PRESS
GND o | |
A o --- o GND
In the example, it use 3 GPIO to read out encoder and the push button
TTGO LoRa V1:A - GPIO-22
B - GPIO-23
PRESS - GPIO-21
B - GPIO-23
PRESS - GPIO-21
for the SW setting, it seems clear, but when I try to config, it's alittle confusing.
1. I have a TTGO lora32 V2(I guess, it's an old board, not much doc remain on their site), it works with Lilygo T-lora 1.3-2.0.
I first tried to pins on 22/23/21, it did not work, since it's has been used by IIC OLED, I ended up suing
GPIO 13/15/4 as A/B and PRESS(but by accident, I plug into02 and 15, this work with this setting)
For the SW setting, if you use web client, there is no place to set the canned message.
1st setting:
enable both module enabled and Rotary encoder #1 enabled.(there are some setting below about rotary encode )
2. config use pins to define what GPIO to connect, and then it calcuated the encoder input as CW,CCW as well as the push. The following 3 lines are serve to define the action in char.
When I select rotEnc1, it did not work, when I set to _any, it works.
I'm not quite sure why, since there is a Rotary encoder #1 enabled on the top.
So as the Up Down enabled, not sure what is this, but if you don't set it, it did not work for me.
The message is sperated with | , you don't need it at the last message.
After setting all these, when I rotate the encoder, the canned message will show up, a press will set it out.
you will first see "sending..." later on get a :sent to unknow" message
留言
張貼留言