deejdsp

package module
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2020 License: MIT Imports: 19 Imported by: 0

README

deejdsp GO

This is a deej project that uses custom written plugins to support displays!

This uses my modifed fork of deej. This is still in the development phase but expect to see a more finished version soon (never mind on the soon part)! Its Highly recomended that you use a microcontroller base around the Atmega32u4 (like a arduino leonardo or micro)

HERE!

TODO

  1. Add Taskbar send File
  2. Get a image from a session
  3. Arrange a image in the center of the screen
  4. Convert image to .b file format see jax-b\ssd1306FilePrep
  5. Add config file option for auto generate image (req 1-3)
    • this will use a sha-1 hash of the process name truncated to 8 characters in order to prevent confilt with user generated images
    • if the file does not exist on the end device it will be generated and sent
  6. Find free images for other deej config options (master, system, mic)

You can view my wireing guide

EasyEDA You will also need a sd card adapter in order to store your images. This can be scaled from two to eight of sliders and displays. With some work it can also be scalled far beyond.

My whole PCB (Still WIP) and wireing project can be found on EasyEDA

Original code is by Omri Harel
The Main Development also has a discord

Discord

POC Video

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertImage

func ConvertImage(srcimg image.Image, index int32, threshold int) ([][]byte, error)

ConvertImage returns a byteslice with the converted image Basicly a copy of the main test program in my ssd1306 file prep lib but we dont write it to a file

func CreateAutoMap

func CreateAutoMap(SliderMap *deej.SliderMap, SessionMap *deej.SessionMap) map[int]string

CreateAutoMap creates a automatic mapping of sessions to the displays

func CreateFileName

func CreateFileName(processname string) string

CreateFileName creates a truncated 8 character filename using sha1 and the .b ending

func GetIconFromAPI

func GetIconFromAPI(icofdr *iconfinderapi.Iconfinder, keyword string) (image.Image, error)

GetIconFromAPI gets an icon from online This calls the API from icon finder and tryes to get the first icon that matches the requirements It only looks up 3 icons It filters on flat icons, it cannot be a icon that needs to be bought It cannot be a vector image

Types

type DSPCanonicalConfig

type DSPCanonicalConfig struct {
	DisplayMapping map[int]string
	StartupDelay   int

	CommandDelay           int
	BWThreshold            int
	IconFinderDotComAPIKey string
	// contains filtered or unexported fields
}

DSPCanonicalConfig config of DSP

func NewDSPConfig

func NewDSPConfig(logger *zap.SugaredLogger) (*DSPCanonicalConfig, error)

NewDSPConfig creates the config object

func (*DSPCanonicalConfig) Load

func (cc *DSPCanonicalConfig) Load() error

Load reads a config file from disk and tries to parse it

type SerialDSP

type SerialDSP struct {
	// contains filtered or unexported fields
}

SerialDSP stuct for Serial Dispaly Objects

func NewSerialDSP

func NewSerialDSP(sio *deej.SerialIO, siu *SerialInUse, logger *zap.SugaredLogger) (*SerialDSP, error)

NewSerialDSP Creates a new DSP object

func (*SerialDSP) DisplayOff

func (serDSP *SerialDSP) DisplayOff() error

DisplayOff turns the dislpay off

func (*SerialDSP) DisplayOn

func (serDSP *SerialDSP) DisplayOn() error

DisplayOn turns the dislpay on

func (*SerialDSP) SetImage

func (serDSP *SerialDSP) SetImage(filename string) error

SetImage Sends the string of the filename for the image selection

func (*SerialDSP) SetTimeDelay

func (serDSP *SerialDSP) SetTimeDelay(delay time.Duration)

SetTimeDelay sets the time to delay after a command has been executed

type SerialInUse

type SerialInUse struct {
	ExternalFuncUsingSerial bool
	// contains filtered or unexported fields
}

func NewSerialInUse

func NewSerialInUse() *SerialInUse

func (*SerialInUse) Done

func (siu *SerialInUse) Done()

func (*SerialInUse) ExternalInUse

func (siu *SerialInUse) ExternalInUse() bool

func (*SerialInUse) JoinLine

func (siu *SerialInUse) JoinLine() chan bool

func (*SerialInUse) PreformingTask

func (siu *SerialInUse) PreformingTask()

type SerialSD

type SerialSD struct {
	// contains filtered or unexported fields
}

SerialSD strut for serial objects

func NewSerialSD

func NewSerialSD(sio *deej.SerialIO, siu *SerialInUse, logger *zap.SugaredLogger, verbose bool) (*SerialSD, error)

NewSerialSD Creates a new sd object

func (*SerialSD) CheckForFile

func (serSD *SerialSD) CheckForFile(filename string) (bool, error)

CheckForFile Checks if a file exsists on the SD card

func (*SerialSD) CheckForFileLOAD

func (serSD *SerialSD) CheckForFileLOAD(filename string, filelist []string) (bool, error)

CheckForFile Checks if a file exsists on the SD card

func (*SerialSD) Delete

func (serSD *SerialSD) Delete(filename string) error

Delete deletes a file off of the SD card

func (*SerialSD) ListDir

func (serSD *SerialSD) ListDir() ([]string, error)

ListDir lists the dir to logger and returns it as a string

func (*SerialSD) SendByteSlice

func (serSD *SerialSD) SendByteSlice(byteslice []byte, DestFilename string) error

SendByteSlice Sends a file to the sd card

func (*SerialSD) SendFile

func (serSD *SerialSD) SendFile(filepath string, DestFilename string) error

SendFile Sends a file to the sd card

func (*SerialSD) SetTimeDelay

func (serSD *SerialSD) SetTimeDelay(delay time.Duration)

SetTimeDelay sets the time to delay after a command has been executed

type SerialTCA

type SerialTCA struct {
	// contains filtered or unexported fields
}

SerialTCA strut for serial objects

func NewSerialTCA

func NewSerialTCA(sio *deej.SerialIO, siu *SerialInUse, logger *zap.SugaredLogger) (*SerialTCA, error)

NewSerialTCA Creates a new TCA object

func (*SerialTCA) SelectPort

func (serTCA *SerialTCA) SelectPort(PortNumber uint8) error

SelectPort Slect the port number on the TCA9548A Port can be 0-7

func (*SerialTCA) SetTimeDelay

func (serTCA *SerialTCA) SetTimeDelay(delay time.Duration)

SetTimeDelay sets the time to delay after a command has been executed

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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