Merge branch 'master' of https://code.jcktrue.dk/jct/jcktrue.dk
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@ -7,3 +7,4 @@ public/
|
|||||||
assets/jsconfig.json
|
assets/jsconfig.json
|
||||||
_vendor
|
_vendor
|
||||||
.hugo_build.lock
|
.hugo_build.lock
|
||||||
|
hugo
|
@ -1,14 +1,9 @@
|
|||||||
# SITE SETUP
|
|
||||||
# Guide: https://wowchemy.com/docs/getting-started/
|
|
||||||
# Documentation: https://wowchemy.com/docs/
|
|
||||||
# This file is formatted using YAML syntax - learn more at https://learnxinyminutes.com/docs/yaml/
|
|
||||||
|
|
||||||
# Appearance
|
# Appearance
|
||||||
|
|
||||||
theme: ocean
|
theme: ocean
|
||||||
day_night: false
|
day_night: false
|
||||||
font: ''
|
font: ''
|
||||||
font_size: L
|
font_size: M
|
||||||
|
|
||||||
# SEO
|
# SEO
|
||||||
|
|
||||||
@ -109,8 +104,6 @@ map:
|
|||||||
provider: 'mapnik'
|
provider: 'mapnik'
|
||||||
api_key: ''
|
api_key: ''
|
||||||
zoom: 8
|
zoom: 8
|
||||||
marketing:
|
|
||||||
google_analytics: 'UA-125054774-1'
|
|
||||||
icon:
|
icon:
|
||||||
pack:
|
pack:
|
||||||
ai: true
|
ai: true
|
BIN
content/project/lednotifier/featured.jpg
Normal file
BIN
content/project/lednotifier/featured.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 31 KiB |
51
content/project/lednotifier/index.md
Normal file
51
content/project/lednotifier/index.md
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
---
|
||||||
|
title: "LED Notifier"
|
||||||
|
summary: "Commandline app to change the color of a USB LED notifier."
|
||||||
|
date: 2022-01-04T20:56:05+02:00
|
||||||
|
categories: ["C#"]
|
||||||
|
|
||||||
|
image:
|
||||||
|
preview_only: false
|
||||||
|
|
||||||
|
url_code: "https://github.com/furyfire/LEDNotifier"
|
||||||
|
---
|
||||||
|
# LED Notifier
|
||||||
|
Setting the color of a simple USB LED Notifier. Implemented in C# and .NET 6.0
|
||||||
|
|
||||||
|
# Device
|
||||||
|
The device itself was purchased years ago from a chinese site.
|
||||||
|
|
||||||
|
|
||||||
|
| Field | Value |
|
||||||
|
|----------------|------------------|
|
||||||
|
| Vendor ID | 0x1294 |
|
||||||
|
| Product ID | 0x1320 |
|
||||||
|
| Product Name | EMAIL |
|
||||||
|
| Device Name | Webmail Notifier |
|
||||||
|
| Vendor | RISO KAGAKU CORP.|
|
||||||
|
|
||||||
|
It enumerates as a USB HID device and supports a limited set of colors.
|
||||||
|
|
||||||
|
- Off
|
||||||
|
- Blue
|
||||||
|
- Red
|
||||||
|
- Green
|
||||||
|
- Aqua
|
||||||
|
- Purple
|
||||||
|
- Yellow
|
||||||
|
- White
|
||||||
|
|
||||||
|
# Implementation
|
||||||
|
I opted to use C# for a basic Windows implementation.
|
||||||
|
|
||||||
|
- Using VS2022
|
||||||
|
- To interface with the HID device I used the HIDSharp library. (https://www.zer7.com/software/hidsharp)
|
||||||
|
|
||||||
|
Colors are not bit mapped and only values between 0x0 and 0x7 are supported. The first byte sent to the device does not appear to have any effect as is left as 0xFF. Drivers are not needed as this is a basic HID device.
|
||||||
|
|
||||||
|
# TODO
|
||||||
|
- Basic pattern support (built from colors and durations)
|
||||||
|
- Decode the HID device description
|
||||||
|
- Better error handling
|
||||||
|
- Service/Daemon for background operation
|
||||||
|
- PWM (Low resolution considering the 1ms USB update frequency)
|
Reference in New Issue
Block a user