screen-server

module
v0.0.0-...-48e7947 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 25, 2021 License: MIT

README

ScreenServer

The goal of this project is to develop a remotely controlled OLED screen.

Technology Stack

  • Raspberry Pi 3 Model B (to be potentially replaced with a cheaper alternative)
  • SH1106-driven 128x64 OLED screen
  • Golang

To Build

  1. Get the source code
go get github.com/samarkin/screen-server/cmd/oledd
go get github.com/samarkin/screen-server/cmd/create-user
  1. Disable go modules
go env -w GO111MODULE=auto
  1. Create user
cd $GOPATH/src/github.com/samarkin/screen-server/cmd/oledd
go run github.com/samarkin/screen-server/cmd/create-user
  1. Build and run
go run github.com/samarkin/screen-server/cmd/oledd

Sample Usage

  1. Find out IP of your Raspberry Pi. For example, 192.168.1.5.

  2. From any computer connected to the same network make an HTTP request to port 6533 (OLED spelled on phone keypad)

    1. Obtain the auth token first (using login in password that you provided previously):

      tokenHeader=`curl -v --silent --data '{"login":"admin", "password":"admin"}' http://192.168.1.5:6533/api/login 2>&1 | grep X-Session-Token | cut -c 3- | tr -d '\r\n'`
      
    2. Display a message

      curl -v -H $tokenHeader --data '{"text": "Hello, world!"}' http://192.168.1.5:6533/api/messages
      

Full API Description

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL