module
Version:
v0.0.0-...-48e7947
Opens a new window with list of versions in this module.
Published: Jul 25, 2021
License: MIT
Opens a new window with license information.
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
- Get the source code
go get github.com/samarkin/screen-server/cmd/oledd
go get github.com/samarkin/screen-server/cmd/create-user
- Disable go modules
go env -w GO111MODULE=auto
- Create user
cd $GOPATH/src/github.com/samarkin/screen-server/cmd/oledd
go run github.com/samarkin/screen-server/cmd/create-user
- Build and run
go run github.com/samarkin/screen-server/cmd/oledd
Sample Usage
-
Find out IP of your Raspberry Pi. For example, 192.168.1.5
.
-
From any computer connected to the same network make an HTTP request to port 6533
(OLED spelled on phone keypad)
-
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'`
-
Display a message
curl -v -H $tokenHeader --data '{"text": "Hello, world!"}' http://192.168.1.5:6533/api/messages
Full API Description
Directories
¶
|
|
cmd
|
|
|
|
|
|
|
|
|
|
|
|
Click to show internal directories.
Click to hide internal directories.