Difference between revisions of "Fit-statUSB"

From fit-PC wiki
Jump to: navigation, search
(Using fit-statUSB in Windows)   (change visibility)
(Set color)   (change visibility)
Line 12: Line 12:
 
* RR | GG | BB - HEX value of red, green, blue respectively
 
* RR | GG | BB - HEX value of red, green, blue respectively
 
fit-statUSB will set the intensity of each of the colors.
 
fit-statUSB will set the intensity of each of the colors.
'''Examples:''' to set dim green  
+
 
 +
'''Examples:'''<br>
 +
To set dim green  
 
  #001200
 
  #001200
to set bright yellow combine red and green
+
To set bright yellow combine red and green
 
  #FFFF00
 
  #FFFF00
 +
 +
=== Set color sequence ===
 +
Set a sequence of alternating colors. The sequence will cycle endlessly until a new color command is entered.
 +
B#RRGGBB-tttt#RRGGBB....
 +
* RR | GG | BB - HEX value of red, green, blue respectively
 +
* tttt - time until next color is displayed
 +
 +
'''Examples:'''<br>
 +
Pulsing red color
 +
B#FF0000-0200#000000-0600
 +
Alternating red-blue
 +
B#FF0000-1000#0000FF-1000
 +
Cycle of red 0.1 sec - yellow 0.1 sec -white 1 sec - off 0.3 sec
 +
B#FF0000-0100#FFFF00-0100#FFFFFF-1000#000000-0300
 +
 +
=== Set color transition period ===
 +
Set how quickly current color fades to the next color.
 +
Fnnnn
 +
* nnnn - transition time in mS. Permitted values: 0001 (immediate) to 9999 (slowest transition, 10 seconds)
 +
Transition period is persistent until a new F command is entered. <br>
 +
For B command the F value will determine transition period between colors.
 +
  
  
Line 22: Line 46:
 
F - Set Fade transition Time in ms 'F1000'
 
F - Set Fade transition Time in ms 'F1000'
 
G - Return current color, (rr,gg,bb)
 
G - Return current color, (rr,gg,bb)
B - Set Fade transition Colors B#RRGGBB-tttt#RRGGBB....
 
 
Fade transition after each color
 
Fade transition after each color
 
  
 
== Using fit-statUSB in Windows ==
 
== Using fit-statUSB in Windows ==

Revision as of 09:36, 6 June 2018

  • fit-statUSB is a programmable fingernail-size color LED that plugs into a USB port.
  • fit-statUSB provides status indication by changing the LED color, brightness and color cycle.
  • fit-statUSB identifies to the PC as a serial device and changes the LED color by text commands received over the serial port.

Commands

General

Commands to fit-statUSB are sent over serial port. No need to configure the baudrate, fit-statUSB adjusts automatically. Each command ends with a LF and executed immediately.

Set color

#RRGGBB
  • RR | GG | BB - HEX value of red, green, blue respectively

fit-statUSB will set the intensity of each of the colors.

Examples:
To set dim green

#001200

To set bright yellow combine red and green

#FFFF00

Set color sequence

Set a sequence of alternating colors. The sequence will cycle endlessly until a new color command is entered.

B#RRGGBB-tttt#RRGGBB....
  • RR | GG | BB - HEX value of red, green, blue respectively
  • tttt - time until next color is displayed

Examples:
Pulsing red color

B#FF0000-0200#000000-0600

Alternating red-blue

B#FF0000-1000#0000FF-1000

Cycle of red 0.1 sec - yellow 0.1 sec -white 1 sec - off 0.3 sec

B#FF0000-0100#FFFF00-0100#FFFFFF-1000#000000-0300

Set color transition period

Set how quickly current color fades to the next color.

Fnnnn
  • nnnn - transition time in mS. Permitted values: 0001 (immediate) to 9999 (slowest transition, 10 seconds)

Transition period is persistent until a new F command is entered.
For B command the F value will determine transition period between colors.


P - Enter Device firmware update mode ? - Return device UUID # F - Set Fade transition Time in ms 'F1000' G - Return current color, (rr,gg,bb) Fade transition after each color

Using fit-statUSB in Windows

From command line

echo [command] > \\.\[com port]
  • [command] - the command sent to fit-statUSB over serial
  • [com port] - the COM port assigned to fit-statUSB

Example: Assuming fit-statUSB is on COM10 the following command will set fit-statUSB color to red:

echo #FF0000 > \\.\COM10

Detect COM port of fit-statUSB

To identify which COM port is assigned to fit-statUSB use mode command

mode

You will receive a list of COM ports. fit-statUSB listing on COM10 looks like that:

Status for device COM10:
------------------------
   Baud:            9600
   Parity:          None
   Data Bits:       8
   Stop Bits:       1
   Timeout:         ON
   XON/XOFF:        OFF
   CTS handshaking: OFF
   DSR handshaking: OFF
   DSR sensitivity: OFF
   DTR circuit:     OFF
   RTS circuit:     OFF

PowerShell

powershell "$fitstatUSB= new-Object System.IO.Ports.SerialPort [com port]; $fitstatUSB.open(); $fitstatUSB.WriteLine('[command]'); $fitstatUSB.Close()"
  • [command] - the command sent to fit-statUSB over serial
  • [com port] - the COM port assigned to fit-statUSB

Example: Assuming fit-statUSB is on COM10 the following command will set fit-statUSB color to red:

powershell "$fitstatUSB= new-Object System.IO.Ports.SerialPort COM10; $fitstatUSB.open(); $fitstatUSB.WriteLine('#FF0000'); $fitstatUSB.Close()"