Copyright 2023 (C) Peter McGoron. This file is a part of Upsilon, a free and open source software project. For license terms, refer to the files in `doc/copying` in the Upsilon source distribution. __________________________________________________________________________ This manual describes the controller software programming. This guide does not describe Verilog: see `verilog_manual.md` for that. # Preqreuisites You must know basic Linux shell (change directories, edit files with `vi`) and basic SSH usage (sftp, ssh). Knowledge of Micropython (a subset of Python) is required for scripting. I assume that you have the controller running and accessable. See `docker.md` for the easy quick-start guide. # Programming in MicroPython ## Introduction to MicroPython MicroPython is a programming language that is very similar to Python. It is stripped down and designed to run on very small devices. If you have written Python, you will be able to use MicroPython without issue. If you are not a hardcore Python programmer, you might not even notice a difference. Everything you need to know is [here](https://docs.micropython.org). ## Standard Library There are two modules of the standard library: `mmio` and `comm`. `mmio` are wrappers that handle reads and writes from MMIO pins. This file is automatically generated by the build process. This file is generated in the `gateware` directory (if you use the Docker build system, the file is automatically copied to `boot/mmio.py`). `comm` contains higher level wrappers for DAC and ADC pins. This module is documented well enough that you should be able to read it and understand how to use it. # FAQ ## SCP Is Not Working SCP by default uses SFTP, which dropbear does not support. Pass `-O` to all SCP invocations to use the legacy SCP protocol.