Install Mu Editor

From CanSat
Revision as of 17:07, 23 November 2021 by Fcorthay (talk | contribs) (Created page with "= Install Mu-Editor = == Linux == Install mu-editor: su apt install libfreetype6-dev apt install libsdl1.2-dev pip3 install mu-editor Alternatively: * install the requi...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Install Mu-Editor

Linux

Install mu-editor:

su
apt install libfreetype6-dev
apt install libsdl1.2-dev
pip3 install mu-editor

Alternatively:

  • install the required python packages:
apt install python3-pip
apt install python3-setuptools
apt install python3-dev
apt install python3-pyqt5.qtsvg python3-pyqt5.qsci python3-pyqt5.qtserialport
apt install python3-venv
pip3 install virtualenv
pip3 install appdirs
pip3 install pyflakes pycodestyle qtconsole semver black
pip install pyserial
pip3 install adafruit-board-toolkit
USER=francois
cp /home/$USER/Downloads/mu-master.zip /tmp/
cd /tmp
unzip mu-master.zip
cd mu-master/
pip3 install -r requirements.txt
make clean
cd ..
mv mu-master /usr/opt/

Give user access to the serial port:

usermod -a -G dialout $USER
exit

Test it (sudo to allow first run installs):

mkdir -p ~/.local/share/mu
ll /dev/tty* | grep -vP 'tty\d' | grep -vP 'ttyS\d'
sudo /usr/opt/mu-master/run.py &

Windows

Download the installer and run it.

Install CircuitPython

Raspberry Pi Pico

Download the latest release.

If the RPI-RP2 drive doesn't automatically appear when the Pico is connected to the PC, hold down the BOOTSEL button, and while continuing to hold it, plug the Pico into USB. Continue to hold the BOOTSEL button until the RPI-RP2 drive appears.

Drag the adafruit_circuitpython_etc.uf2 file to RPI-RP2. The RPI-RP2 drive will disappear and a new disk drive called CIRCUITPY will appear.

Write some code in /media/francois/CIRCUITPY/code.py. If it doesn't run on file saving, press ctl-D.

"""Example for Pico. Blinks the built-in LED."""
import time
import board
import digitalio
 
led = digitalio.DigitalInOut(board.LED)
led.direction = digitalio.Direction.OUTPUT
 
while True:
    led.value = not led.value
    time.sleep(0.5)

LoRa RFM95

Install BOSSA:

su
apt install -y bossa-cli
bossac -h
exit

Download CircuitPython.

Connect the feather to an USB port, double-click the reset bitton. The red "#13" LED should pulse on and off. Install CircuitPython:

ll /dev/tty* | grep -vP 'tty\d' | grep -vP 'ttyS\d'
ll ~/Downloads/adafruit-circuitpython-feather_m0_rfm9x-*
bossac -p /dev/ttyACM0 -i
bossac -p /dev/ttyACM0 -e -w -v -R --offset=0x2000 ~/Downloads/adafruit-circuitpython-feather_m0_rfm9x-en_US-6.1.0.bin