Code Monkey home page Code Monkey logo

dglab-http's Introduction

Dungeon-Lab HTTP客户端 (蛋糕实验室)

使用HTTP服务控制您的MP3

项目开发不易 如果可能的话请支持该项目 (QQ: 401395069)

此外 如果您需要使用这个项目进行商业活动 请参考官方API文档的联系我们一栏

如何运行

下载预编译的二进制 (大概也许只提供Windows的 如果有好心人愿意开PR帮我配置Github Actions也可以)

运行: ./dglab-http [你的MP3的蓝牙地址]

如何编译

git clone https://github.com/tinygo-org/bluetooth
cd bluetooth
git clone https://github.com/Rabbit0w0/dglab-http
go build ./dglab-http

HTTP API

/status - ANY

获得当前设备信息

响应

  • battery 电量 (int [0, 100])
  • chanAPower A输出强度 (int [0, 2047])
  • chanBPower B输出强度 (int [0, 2047])

/setPower - POST

设置输出强度

请求

  • powerA A输出强度 (int [0, 2047])
  • powerB B输出强度 (int [0, 2047])
  • 注: 这里的强度应该是APP内显示强度乘以7

响应

  • message 信息
  • bluetoothPayload 蓝牙荷载

/sendWave - POST

发送波形数据

请求

  • channel 输出频道 1为A 2为B (int [0, 1])
  • paramX X数据 (int [0, 31])
  • paramY Y数据 (int [0, 1023])
  • paramZ Z数据 (int [0, 31])

响应

  • message 信息
  • bluetoothPayload 蓝牙荷载
type SetPowerRequest struct {
	PowerA uint `json:"powerA" binding:"required,min=0,max=2047"`
	PowerB uint `json:"powerB" binding:"required,min=0,max=2047"`
}

type SendWaveRequest struct {
	Channel uint `json:"channel" binding:"required,min=1,max=2"`
	ParamX  uint `json:"paramX" binding:"required,min=0,max=31"`
	ParamY  uint `json:"paramY" binding:"required,min=0,max=1023"`
	ParamZ  uint `json:"paramZ" binding:"required,min=0,max=31"`
}

请我喝杯咖啡

dglab-http's People

Contributors

rabbit0w0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

phillychi3

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.