Skip to content
This repository was archived by the owner on Nov 24, 2019. It is now read-only.
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 27 additions & 47 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@ OctoPrint-TFT [![GitHub release](https://img.shields.io/github/release/mcuadros/

_OctoPrint-TFT_, a touch interface for TFT touch modules based on GTK+3.

Is a _X application_ to be executed directly in the X Server without any windows
manager, as _frontend of a [OctoPrint](http://octoprint.org) server_ in a Raspberry Pi
equipped with any [TFT Touch module](https://www.waveshare.com/wiki/3.5inch_RPi_LCD_(A)).
This is an _X application_ that is executed directly in the X Server, without any window manager, as the _frontend of an [OctoPrint](http://octoprint.org) server_ on a Raspberry Pi equipped with any [TFT Touch module](https://www.waveshare.com/wiki/3.5inch_RPi_LCD_(A)).

Allows you to control your 3D Printer, like you can do with any [TFT/LCD panel](http://reprap.org/wiki/RepRapTouch), but using _OctoPrint_ and a Raspberry Pi.
It allows you to control your 3D Printer, like you can do with any [TFT/LCD panel](http://reprap.org/wiki/RepRapTouch), but using _OctoPrint_ and a Raspberry Pi.

<img width="480" src="https://user-images.githubusercontent.com/1573114/33559609-a73a969e-d90d-11e7-9cf2-cf212412aaa5.png" />

Expand All @@ -19,74 +17,57 @@ Allows you to control your 3D Printer, like you can do with any [TFT/LCD panel](

### How this is different from TouchUI?

[TouchUI](http://plugins.octoprint.org/plugins/touchui/), is an amazing plugin
for Octoprint, was created as a responsive design for access to OctoPrint,
from low resolution devices, such as smartphones, tablets, etc.
[TouchUI](http://plugins.octoprint.org/plugins/touchui/) is an amazing plugin for Octoprint. It was created as a responsive design for access to OctoPrint from low resolution devices such as smartphones, tablets, etc.

Executing TouchUI under a RPi w/TFT modules, presents two big problems,
first isn't optimized to be used with resistive touch screens with low resolutions
like 480x320 and second requires a browser to be access, consuming a lot of
resources.
Executing TouchUI under a RPi w/TFT modules presents two big problems:
1. It is not optimized to be used with resistive touch screens with low resolutions like 480x320
2. It requires a browser to be used for access, consuming extra resources.

This is the main reason because I develop this X application to be executed
in my 3d printer.
For these reasons I developed this X application to be used with my 3d printer.

Installation
------------
Basic Installation
------------------

### Dependencies
(If you are having difficulty getting this working with your TFT, please see the wiki page: [TFT Installation Tips](https://github.com/CJeffyB/OctoPrint-TFT/wiki/TFT-Installation-Tips))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you move it to the bottom of the installation section?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.


*OctoPrint-TFT* is based on [Golang](golang.org), usually this means that is
dependency-less, but in this case [GTK+3](https://developer.gnome.org/gtk3/3.0/gtk.html)
is used, this means that GTK+3 libraries are required to be installed on
the system.
### Dependencies

If you are using `Raspbian` or any other `Debian` based distribution, GTK+3 can
be installed using:
*OctoPrint-TFT* is based on [Golang](golang.org), usually this means no dependencies, but in this case [GTK+3](https://developer.gnome.org/gtk3/3.0/gtk.html) is used. Therefore, GTK+3 libraries are required to be installed on the system.

If you are using `Raspbian` or any other `Debian` based distribution, GTK+3 can be installed using:
```sh
sudo apt-get install libgtk-3-0
> sudo apt-get install libgtk-3-0
```
OctoPi does not come with graphical environment, additionally install:

Since OctoPi does not come with a graphical environment, additionally install:
```sh
sudo apt-get install xserver-xorg xinit
> sudo apt-get install xserver-xorg xinit
```


### Installation on Raspbian/OctoPi (recommended)

The recommended way to install *OctoPrint-TFT* is use the `.deb` packages
from the [Releases](https://github.com/mcuadros/OctoPrint-TFT/releases) page. The packages
are available for Debian based distributions such as Raspbian and OctoPi for
versions `jessie` and `stretch`.
The recommended way to install *OctoPrint-TFT* is use the `.deb` packages from the [Releases](https://github.com/mcuadros/OctoPrint-TFT/releases) page. The packages are available for Debian based distributions such as Raspbian and OctoPi for versions `jessie` and `stretch`.

For example for a Raspbian Jessie:
```sh
> wget https://github.com/mcuadros/OctoPrint-TFT/releases/download/v0.1.0/octoprint-tft_0.1.0-1.jessie_armhf.deb
> dpkg -i octoprint-tft_0.1.0-1.jessie_armhf.deb
```


### Install from source

The compilation and packaging tasks are managed by the [`Makefile`](Makefile)
and backed on [Docker](Dockerfile). Docker is used to avoid installing any other
dependencies since all the operations are done inside of the container.
The compilation and packaging tasks are managed by the [`Makefile`](Makefile) and backed on [Docker](Dockerfile). Docker is used to avoid installing any other dependencies since all the operations are done inside of the container.

If you need to install docker inside `Raspbian` or any other linux distrubution
just run:
If you need to install docker inside `Raspbian` or any other linux distrubution just run:

```sh
curl -fsSL get.docker.com -o get-docker.sh
sh get-docker.sh
> curl -fsSL get.docker.com -o get-docker.sh
> sh get-docker.sh
```

> You can read more about this at [`docker-install`](https://github.com/docker/docker-install)

To compile the project, assuming that you already cloned this repository, just
execute the `build` target, this will generate in `build` folder all the binaries
and debian packages:
To compile the project, assuming that you already cloned this repository, just execute the `build` target, this will generate in `build` folder all the binaries and debian packages:

```sh
> make build
Expand All @@ -101,18 +82,17 @@ Configuration

### Basic Configuration

The basic configuration is handled via environment variables, if you are using
the `.deb` package you can configure it at `/etc/octoprint-tft-environment`.
The basic configuration is handled via environment variables, if you are using the `.deb` package you can configure it at `/etc/octoprint-tft-environment`.

- `OCTOPRINT_CONFIG_FILE` - Location of the OctoPrint's config.yaml file. If empty the file will be searched at the `pi` home folder or the current user. Only used for locally installed OctoPrint servers.
- `OCTOPRINT_CONFIG_FILE` - Location of OctoPrint's `config.yaml` file. If this is not set, the file will be searched for at the `pi` home folder (or the home folder of the current user). Only used for locally installed OctoPrint servers.

- `OCTOPRINT_HOST` - OctoPrint HTTP address, example `http://localhost:5000`, if OctoPrint is locally installed will be read from the config file.
- `OCTOPRINT_HOST` - OctoPrint HTTP address, example: `http://localhost:5000`. If OctoPrint is locally installed, this will be read from the `config.yaml` file. **The http:// is necessary.**

- `OCTOPRINT_APIKEY` - OctoPrint-TFT expects an [API key]( http://docs.octoprint.org/en/master/api/general.html) to be supplied. This API key can be either the globally configured one or a user specific one if “Access Control”. if OctoPrint is locally installed will be read from the config file.
- `OCTOPRINT_APIKEY` - OctoPrint-TFT expects an [API key]( http://docs.octoprint.org/en/master/api/general.html) to be supplied. This API key can be either the globally configured one, or a user specific one if “Access Control” is enabled. If OctoPrint is locally installed this will be read from the `config.yaml` file.

- `OCTOPRINT_TFT_STYLE_PATH` - Several themes are supported, and style configurations can be done through CSS. This variable defines the location of the application theme.

- `OCTOPRINT_TFT_RESOLUTION` - Resolution of the application, should be configured to the resolution of your screen, for example `800x480`. By default `480x320`.
- `OCTOPRINT_TFT_RESOLUTION` - Resolution of the application, should be configured to the resolution of your screen. For example: `800x480`. By default `480x320`.


### Custom controls and commands
Expand Down