View on GitHub

Armachat Redesign/Refactoring

Armachat Redesign from Peter Misenko's work at bobricius / Armachat-circuitpython

Download this project as a .zip file Download this project as a tar.gz file

Initial Setup/Hardware Configuration

The default hardware setup is for the Armachat Compact with 320x240 pixel screen utilizing ST7789 controller. If you have different hardware, you will need to edit the armachat/config.py or the config.txt file. If the config.txt file exists, it supersedes the settings in the armachat/config.py file. The directions will show editing of the config.txt as that is the preferred method for configuring the Armachat.

To configure an Armachat, such as the Armachat Watch, follow these steps.

  1. If the Armachat does not have a config.txt file in the root directory, create one. You may copy the following contents to place in the config.txt file.
    # Brightness may be from 0 to 4
    bright = 4
    
    # Volume may be from 0 to 6
    volume = 6
    
    # Sleep may be 0 to 6
    #	0 = Never		4 = 120
    #	1 = 15 secs		5 = 300
    #	2 = 30 secs		6 = 600
    #	3 = 60
    sleep = 0
    
    # Tone may be from 1000 to 10000 in steps of 1000
    tone = 5000
    
    # Melody may be from 0 to length of items minus one, in melodies 
    # list of the included melody file in audio.py
    melody = 30
    
    # Region values may be 
    # US, EU433, EU868, CN, JP, ANZ, RU, KR, TW, IN, NZ865, TH, Unset
    region = "US"
    
    # LoRa Profile may be from 1 to 6
    # Matches Mestastic values in table at
    # https://meshtastic.org/docs/settings/channel
    #	1 = Bw500Cr45Sf128       Short/Fast
    #	2 = Bw125Cr45Sf128       Short/Slow
    #	3 = Bw250Cr47Sf1024      Medium/Fast
    #	4 = Bw250Cr46Sf2048      Medium/Slow
    #	5 = Bw31_25Cr48Sf512     Long/Fast
    #	6 = Bw125Cr48Sf4096      Long/Slow
    loraProfile = 1
    
    # Frequency values are dependent on the module freq
    freq = 915.25
    
    # Power values may be 5 to 23
    power = 5
    
    hopLimit = 3
    unitName = "ARMACHAT"
    myName = "Test 1"
    myAddress = "12-36-124-1"
    groupMask = "255-255-255-0"
    destinations = "Test 2|12-36-124-2|Test 3|12-36-124-3|Test 4|12-36-124-4"
    password = "Sixteen byte key"
    passwordIv = "Sixteen byte key"
    # Model value may be max, compact, or watch
    model = "watch"
    

  2. Edit the "model" value by setting it to one following values:
    • max
      • Display Resolution: 320x240 pixels (Rotation: 270°)
      • Display Controller: ST7789
    • compact
      • Display Resolution: 320x240 pixels (Rotation: 270°)
      • Display Controller: ST7789
    • watch
      • Display Resolution: 160x80 pixels (Rotation: 90°)
      • Display Controller: ST7789
  3. If you are not located in the United States, you may need to modify the radio settings to stay compliant with your local communications laws. The following settings are the radio settings.
    • region
    • loraProfile
    • freq
    • power
    The LoRa radio configuration settings are based on the Meshtastic settings found at https://meshtastic.org/docs/settings/config/lora. The settings are checked to make certain that they are valid for the region selected. The settings for frequency and power are calculated usign the infromation in the table below.

    LoRa Region Information
    regionmodulefreqCenterfreqStartfreqEnddutyCyclepowerLimit
    US915915.000902.000928.00010030
    EU433433433.500433.000434.0001012
    EU868868869.525869.400869.6501016
    CN433490.000470.000510.00010019
    JP915924.300920.800927.80010016
    ANZ915921.500915.000928.00010030
    RU868868.950868.700869.20010020
    KR915921.500920.000923.00010030
    TW915922.500920.000925.00010030
    IN866866.000865.000867.00010030
    NZ865866866.000864.000868.00010030
    TH915922.500920.000925.00010016
    Unset915915.000902.000928.00010030