Difference between revisions of "Fit-statUSB"

From fit-PC wiki
Jump to: navigation, search
(Detect COM port of fit-statUSB)   (change visibility)
Line 34: Line 34:
  
 
=== PowerShell ===
 
=== PowerShell ===
To set fit-statUSB color to red using 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()"
 
  powershell "$fitstatUSB= new-Object System.IO.Ports.SerialPort COM10; $fitstatUSB.open(); $fitstatUSB.WriteLine('#FF0000'); $fitstatUSB.Close()"

Revision as of 07:44, 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.

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()"