New armachat based on Raspberry Pi PICO an Circuitpython code

Overview

Armachat-circuitpython

New Armachat based on Raspberry Pi PICO an Circuitpython code

Software working features:

send message with header and store to memory

receive message and parse header, store to memory

display message memory with message details like SNR and RSSI

count messages in memory by type

display some hw details like free memory and power supply voltage, it is good for future battery operation

Terminal display with messages from background systems

AES256 encryption

TODO:

Need much better LoRa libray with, CAD, status detection, and INTERUPT !!!

message confirmation and status change in memory

contact list

setup and save configuration

boot safe mode

save memory to flash

...

Comments
  • Intermittent boot and screen flicker.

    Intermittent boot and screen flicker.

    I am building 5 pieces of the Compact version. The pcb's came from pcb way, the bss123 mosfets came from here https://www.tme.eu/ro/details/bss123ixtsa1/tranzistori-canal-n-smd/infineon-technologies/. the pi picos are original raspberrys. The screens have been ordered from ali and all 5 behave the same - https://www.aliexpress.com/item/4001220638683.html?spm=a2g0o.order_list.order_list_main.4.4cd21802nwPZro

    As the title describes, when I connect the stripped board with just the display and the rpi board, if I get lucky enough for the thing to boot, the screen flickers and the rpi freezes and disconnects. I do not know what to try anymore. At first I thought it was the chinese LORA module, but on the second armachat pcb I did not even solder it. The behavior is the same if I power it through an external battery.

    Do you have any suggestions?

    Thank you.

    opened by kog001 6
  • boot_out error

    boot_out error

    One issue solved, a new one appeared.

    I installed the new software and configured the config.py as indicated. The display shows only the snake in the corner.

    The boot_out file gives the following error: boot.py output: Traceback (most recent call last): File "boot.py", line 11, in < module> File "/lib/picomputer.py", line 2, in < module> File "/lib/config.py", line 229, in < module> IndexError: Group index out of range

    Any ideas?

    Thanks.

    opened by kog001 2
  • Bobricius main

    Bobricius main

    Now reading and writing to config.txt file to keep settings between reboots

    Notes:

    • If a new property is added to config.py, it will be written to config.txt if it is one of the types included in config_includeTypes list.
    • A property may be excluded by placing it in the config_excludeNames list.

    Limitations

    • To save configuration changes, the filesytem needs to be changed to writable on boot by pressing the ALT key.
    • If the config.txt file is edited by hand comments are allowed but the whole line must be a comment. Inline comments are not allowed.
    • If a hex, binary. or octal value is in the config.txt file, it will be changed to decimal if the config file is saved.
    • Currently only str, int, and float types are supported.
    opened by richteel 0
  • Bobricius main

    Bobricius main

    A few more changes

    boot.py

    • The progress bar change was lost in previous check-in

    code.py

    • loraProfile settings now match Meshtastic
    • Able to change freq on the fly
    • Able to change power on the fly

    config.py

    • Changed comments for loraProfile settings
    • Set loraProfile to 1
    opened by richteel 0
  • Bobricius main

    Bobricius main

    It is possible that I missed something, but I believe this complete list of changes.

    • Formatting changes in all three files. I'm using the Mu editor, https://codewith.mu/, that has Check and Tidy functions to help standardize formatting. The formatting changes are from using those functions in the Mu editor.

    boot.py

    • Pull model information from config.py to obtain the model and keyboard setup information.

    • Used the adafruit_matrixkeypad to scan the keyboard.

    • Display prompts based on the Armachat model

    • Added a progress bar to show remaining time to make a selection for safe and write modes.

    code.py

    • Added a function named screenSafeText, which removed characters from a string that is a non-printable character. There were some random errors due to received messages having non-printable characters. When the messages were displayed, there would be no font in the font file for them, which would cause the code to crash.

    • Added a 0.1 second delay when checking for a key press. I was experiencing skipping screens as the left or right button (bsp, ent) was read twice or more on one key press. This is not a perfect solution but the results in a better user experience.

    • Added try/catch blocks around attempts to read or write files. I would have rather used file exists for reads but it appears that CircuitPython's file library does not have an exists function. The use of try/catch blocks appears to be the preferred method to check for a file's existence.

    • Corrected the prompt for left and right buttons when shown on line 8. If this is different on the max version, then it is best to add an if else block around these prompts. On the Compact model, the enter key is right and the delete/backspace is the left.

    • In the function loraProfileSetup, modemPreset was assigned but was not referenced with the global keyword so it was treated as a local variable and would not impact the Armchat function. Added to the global keyword to fix the issue.

    • Created the function radioInit to allow changing of the LoRa radio on the fly.

    • Added the CPU Temperature from Kayto's code

    • Added the Ping function from Kayto's code

    config.py

    • No changes other than format
    opened by richteel 0
  • security: Updating AES mode to one that does not require a unique IV

    security: Updating AES mode to one that does not require a unique IV

    Looking at the config around the IV and the use of it in the code it seems that the system would encrypt more than one message with the same IV, making the messages vulnerable to attacks explained here

    This PR changes the mode to CBC, which can use a fixed IV, and has minimal drawbacks. An alternative to this would be to use a nonce as the IV and send it along with the ciphertext for use in decryption.

    Thanks!

    opened by ZephSibley 2
  • Addressable Headers

    Addressable Headers

    I am not much help on the circuitpython coding here but for a typical framework for addressable Headers- to allow rejection of random packets and allow specific addresses then the following may be of use.

    https://github.com/LowPowerLab/RFM69 Send and recieve code shows networkid and node id as part of header. I have used Moetino networks for sensor data and its really reliable.

    opened by Kayto 1
  • Just going to do a pull request

    Just going to do a pull request

    I was just going to make a pull request as I made several changes than make the compact version more stable and usable. I see some changes made today so I will compare and see if everything was addressed in your update.

    Fixes made following forks

    • richteel/Armachat-circuitpython
    • Kayto/Armachat-circuitpython

    • Much more stable
    • Viewing messages after sending a message does not cause a crash
    • Index issue fixed to prevent random crashes
    • The boot.py file is setup for Compact version. Use previous version if using max version
    • BTW: Save memory to flash does work if you change the file system to write mode by pressing the ALT key when booting and pressing the S key when viewing messages.
    opened by richteel 11
Owner
Peter Misenko
Peter Misenko
Raspberry Pi Pico and LoRaWAN from CircuitPython

Raspberry Pi Pico and LoRaWAN from CircuitPython Enable LoRaWAN communications on your Raspberry Pi Pico or any RP2040-based board using CircuitPython

Alasdair Allan 15 Oct 8, 2022
Hourglass on the pi pico using circuitpython

hourglass-on-pico "Hourglass" on the raspberry pi pico using circuitpython circuitpython version 7.0.0 Components used: Raspberry Pi Pico ADXL345 acce

null 4 Jul 18, 2022
A simple portable USB MIDI controller based on Raspberry-PI Pico and a 16-button keypad, written in Circuit Python

RPI-Pico-16-BTn-MIDI-Controller-using-CircuitPython A simple portable USB MIDI controller based on Raspberry-PI Pico, written in Circuit Python. Link

Rounak Dutta 3 Dec 4, 2022
Raspberry Pi Pico support for VS Code

Pico-Go VS Code Extension Pico-Go provides code auto-completion and allows you to communicate with your Raspberry Pi Pico board using the built-in REP

Chris Wood 114 Dec 28, 2022
a library for using WS2812b leds (aka neopixels) with Raspberry Pi Pico

pico_ws2812b a library for using WS2812b leds (aka neopixels) with Raspberry Pi Pico You'll first need to save the ws2812b.py file to your device (for

null 76 Nov 25, 2022
A Python class for controlling the Pimoroni RGB Keypad for Raspberry Pi Pico

rgbkeypad A Python class for controlling the Pimoroni RGB Keypad for the Raspberry Pi Pico. Compatible with MicroPython and CircuitPython. keypad = RG

Martin O'Hanlon 43 Nov 11, 2022
Raspberry Pi Pico development platform for PlatformIO

Raspberry Pi Pico development platform for PlatformIO A few words in the beginning Before experimental please Reinstall the platform Version: 1.0.0 Th

Georgi Angelov 160 Dec 23, 2022
A Raspberry Pi Pico powered Macro board, like a Streamdeck but cheaper and simpler.

Env-MCRO A Raspberry Pi Pico powered Macro board, like a Streamdeck but cheaper and simpler. (btw this image is a bit outdated, some of the silkscreen

EnviousData 68 Oct 14, 2022
A Raspberry Pi Pico plant sensor hub coded in Micropython

plantsensor A Raspberry Pi Pico plant sensor hub coded in Micropython I used: 1x Raspberry Pi Pico - microcontroller 1x Waveshare Pico OLED 1.3 - scre

null 78 Sep 20, 2022
Raspberry Pi Pico Escape Room game.

Pico Escape Room Raspberry Pi Pico Escape Room game. Parts Raspberry Pi Pico Set of 2 x 20-pin Headers for Raspberry Pi Pico 4PCS Breadboards Kit Incl

Kevin Thomas 5 Feb 2, 2022
An open source operating system designed primarily for the Raspberry Pi Pico, written entirely in MicroPython

PycOS An open source operating system designed primarily for the Raspberry Pi Pico, written entirely in MicroPython. "PycOS" is an combination of the

null 8 Oct 6, 2022
Turn your Raspberry Pi Pico into a USB Rubber Ducky

pico-ducky Turn your Raspberry Pi Pico into a USB Rubber Ducky Install Requirements CircuitPython for the Raspberry Pi Pico adafruit-circuitpython-bun

Konstantinos 5 Nov 8, 2022
Play music on Raspberry Pi Pico Without CPU involvement

MicroPython_PIO_Music_DMA Play music on Raspberry Pi Pico Without CPU involvement This is based on PIOBeep (https://github.com/benevpi/pico_pio_buzz)

null 3 Nov 27, 2022
Raspberry Pi Pico as a Rubber Ducky

Raspberry-Pi-Pico-as-a-Rubber-Ducky Kurulum Raspberry Pi Pico cihazınız için CircuitPython'u indirin. Boot düğmesine basılı tutarken cihazı bir USB ba

Furkan Enes POLATOĞLU 6 Dec 13, 2022
A rubiks cube timer using a distance sensor and a raspberry pi 4, and possibly the pi pico to reduce size and cost.

distance sensor cube timer A rubiks cube timer using a distance sensor and a raspberry pi 4, and possibly the pi pico to reduce size and cost. How to

null 3 Feb 21, 2022
Adafruit IO connected smart thermostat based on CircuitPython.

Adafruit IO Thermostat Adafruit IO connected smart thermostat based on CircuitPython. Background and Motivation I have a 24 V Heat-only system with a

Shubham Chaudhary 1 Jan 18, 2022
A modular sequencer based on Pi Pico & EuroPi

PicoSequencer A modular sequencer based on Pi Pico & EuroPi by Zeno Van Moerkerke / Keurslager Kurt For now it is 'only' a trigger sequencer, but I si

null 5 Oct 27, 2022
CircuitPython library for the CH559 USB to Serial chip

CH559 (USB to Serial) CircuitPython Library Why? Because you might want to get keyboard/mouse/gamepad/HID input into your CircuitPython projects witho

Guy Dupont 3 Nov 19, 2022
circuitpython version of PyBasic for microcontrollers

cPyBasic Circuitpython version of PyBasic for microcontrollers Current version work only for Adafruit titano & CardKB for now. The origninal PyBasic w

BeBoXoS 3 Nov 14, 2021