Showing posts with label USB HID. Show all posts
Showing posts with label USB HID. Show all posts

Monday, April 28, 2025

Harmony or Kaos

 

                                                                                                                                                                                        Designed by Freepik

Short missive on the framework Microchip calls Harmony 3.  Not sure if this is Harmony or is it a cruel replay of KAOS from Get Smart.

While Harmony 2 for PIC32 was tolerable, this new version is lacking.  I have read several forum entries where "experts" are expressing concerns that it may or may not work. And if it works today, no guarantee it will work tomorrow.  The "code suppositories" are just that.  Anyway I need to move to the next version of XC32, but that would require completely replacing about half of the Harmony 2 libraries and that was a non starter.  So a few days ago I started to build a simple project, USB HID and a console port.  Two basic things I need.

Now I admit I rarely used the code configurator for PIC18 projects. So using this for Harmony was a different thing.  Harmony 2 was mostly a text based configurator, except  for the clock and pins.  The documentation of Harmony 3 is mostly for previous revisions and implementations.  Instructional videos from Microchip do not match with using MPLAB 6.25.  The content creator is needed to download what you need for the framework.  Well the latest content is incompatible with the PIC32MX270 and it's components, at least that is the message I kept getting.  That was a day just trying to figure out how that worked.  Then there is a Project Graph where you have to connect the components.  I was an avid user of Borland's Object Vision in 90s, so graphical construction is not new to me.  But this was not intuitive.  When I finally got all the wires drawn on the GUI configuration, it failed to generate all the .h files and thus would not compile.  The first thing I figured out was I did not need the FreeRTOS component.  One thread in the project, no need for an RTOS, but I have to keep deleting it, since the configurator thinks I need/want it. 

I finally stripped the project down to just a console and then all the .h files were generated.  It appears once you get them generated, then the configurator will continue to update them,.  The trick is to get them generated.  Then I added the USB back in, generated the files and it still compiled.  A few more tweaks and the USB HID registered with the laptop and the console port started displaying messages.  So I have a basic system running.

But there is more fun ahead.  They have changed all the names of the common .h and .c files to something else as well as restructured them.  A lot of the common calls/types/functions have changed names.  It appears that many components that used drivers, no longer use them.  So the SysObj model for projects has changed.  When they said there was no compatibility between v2 and v3,  they meant none.  

One final hurdle.  The debugger will not load with MPLAB 6.25 and XC32 v4.40.  The message was 

 [ BootFlash ] at 0x1fc00490, expected 0x409bf800, got 0x00000000.
Could not enter debug mode because programming the debug information failed. Invalid combinations of config bits may cause this problem

which looks like a failure to load the Boot Loader memory, which I believe is where the debug module resides.  The config bits were the ones I have been using for a long time with this PIC32.  I thought this had something to do with the linker or the compiler version.  So I told the configurator not to generate a linker file.  That worked once.  I admit I did not go through this methodically, but in the end it looks like MPLAB 6.25 is the problem.  MPLAB 6.10 works every time, regardless of XC32 version.  I am still not generating a linker file so it using the default linker configuration.  

Not sure what lies ahead, but I am sure it will be challenging and frustrating.

 

Wednesday, July 12, 2023

Windows 11 Upgrade

 

Well it was time to upgrade to Win11 on at least some machines.  Taking a big gamble, I did my file server first.  Surprisingly this went very smoothly.  All of the Win 10 machines still had access to files and printers.  Next was my main development laptop.  Again it went smoothly until I tried connecting to one of my HID devices.

In this post from September 2021 and the followup in October 2021, I talk about issues I had with the Jedi JVC Controller software for HID control in Delphi.  These issues only applied to my HP Elitebook 850 G5.  So tracing back into the JEDI HID controller source, I found where the error handler was being raised and then what HID device was failing.  As before it was "HID Sensor Collection V2".  Again it was not showing up in the standalone Microchip HID Test program.  The Jedi HID code indicated that once again it was failing the get attributes call to the Windows HID.dll.  Finally the JEDI HID code would raise the "Device cannot be identified" error.

But under HID devices in the Device Manager this was not listed.  Last time I had changed the HID driver to a generic HID controller and that fixed everything.  After searching around, I noticed a sensor category in the Device Manager and that is where it was.  Changed the driver to Generic HID and the error went away.  

What I did notice is that the error handler described in the second post above, was not present.  It looks like I did it on all the USB Power devices PC applications, but not for the Brick Controller.  So that is now implemented and all is as it was before the Windows 11 upgrade.

Is Windows 11 better, so far I don't think it is better or worse, just different😜



 

 

 

Wednesday, February 23, 2022

Latest PCBs

Here are the two latest PCBs.  The top board in white solder mask is the MiWi-Bluetooth Bridge.  This is used to control the Turnout & Signal PCB and the LED Controller PCB.  The bottom PCB in yellow solder mask (I know it looks orange, but I have two PCBs done at different times with the same color).  This is the LED Controller PCB.

The MiWi-BT Bridge uses two interfaces, USB HID and Bluetooth, to control the layout.  I had done a brief discussion of it in this post.

In this picture I have both the MiWi and RN4020 BT Click modules installed.  The modifications on the RN4020 Click module allow for RN4020 firmware upgrades.  I have had  good luck with this board and the MiWi side.  I have used it to control the existing Turnout & Signal control PCBs that are installed in the layout.  I built two of these.  One is installed on the layout so I can make progress on the layout itself.  The other I will use to continue the development of the MiWi interface with USB HID and to develop the BT side.  Once  that is done, I can update the Bridge PCB in the layout.

I have had limited success so far working on the BT side.  Integrating the BT code I have from other projects is consuming more time than I thought.  Mostly because I am updating the code to be more universal for future projects.  While this work is impeding progress now, I am sure it will pay dividends on future projects.


 

The LED controller is very similar to the Turnout & Signal PCB.  I had done a brief discussion of it in this post.  Basically this controls 12 LED channels.  Eight of the channels are connected to a PCA9624 from NXP.  (Here is a link for more information.)  The other 4 LED channels are controlled by the PIC18F27J53.  

The PCA9624 allows for individual PWM control and up to 100mA of sink current.  This should provide the capability for varying types of lighting effects on each channel, besides the normal ON/OFF.  This is controlled through an I2C bus, which I will need to get up and running.  I do have multiple examples of this from previous projects.  I do plan on updating this also to a more universal format.

The pin configuration allowed for each of the 4 PIC connections to be controlled by a separate PWM controller in the PIC.  Again this provides the flexibility for lighting effects.

Finally there is an I2C EEPROM for storing configuration.  I intend to have the capability to have a default lighting setup.  Otherwise when configuring the LED channels, one parameter will be whether or not this a power on configuration.  



 

Wednesday, February 2, 2022

Turnout & Signal Control Firmware/PC SW (Part 3)

Overview

This post is mostly about the PC software/PIC Firmware API and issues that needed to be resolved with the 10 year old software.  But first a look from a high level what the main issue is.  The combination of PC software and PIC firmware form a bridge between what the user sees and what the hardware does.  The user sees a turnout or a signal a with a number associated with it.  The hardware sees a PIC GPIO port that needs to be manipulated.  Somehow these two perspectives need to be bridged in the PC Software and PIC firmware.

Since I have (or will have) a U shaped layout, turnouts,signals, uncouplers, LED lighting, etc on one side of the helix are even numbered and on the other they odd numbered. Where there are multiple track levels, the top level has 100 added to the number.  The hardware interface to the train layout is 40 connection points that will energize a solenoid for a specified period of time.  To reduce confusion, I will only describe how the turnout works. The remaining layout devices have similar functionality.

As a refresher, each normal turnout has two states.  These two states are controlled by solenoids that are momentarily energized.  Thus a turnout has two control wires, each energizing a solenoid that moves the points to either straight or turn.  For those EEs out there is similar to a dual coil latching relay.  You momentarily energize the the solenoid to position the points (or the signal) to the position that you want.  Thus a single track needs two connection points from the hardware.  

Electrical Color Coding

As a quick aside, in the old Marklin world, electrical connections were color coded by the pin connectors.  These were

  • RED - track power(voltage varies in analog and is constant is digital)
  • BROWN - common
  • YELLOW = accessory power (power for turnout/signal and lights)
  • GREEN - turnouts straight, signals go
  • RED - turnouts turn, signals stop  ( not much chance of confusing this with track power)
  • ORANGE - third solenoid for special accessories
  • GRAY - not used
  • BLUE -I added this for 3 way turnouts, though blue pin connectors were a 3rd party item

I have used these colors in the interface to ease the understanding and implementation of the interface.  Also there are 3 types of turnouts, left/right for straight/curve, a slip turnout and a 3 way turnout (that uses 3 wires to control it) and two types of signals. Regardless they have similar functionality. 

User Interface

The task for the software is take the user number assigned to each turnout, which in turn has two wires connected to the hardware, determine the appropriate PIC GPIO pin and then transmit this data over the MiWi network.  Here is the basic user interface

When the turnout is connected to the hardware, the port number is noted along with the action of that connection, straight (green) or turn (red).  The information in this grid is kept in the EEPROM on the PCB in this format and in an INI file on the PC.  The first two columns are populated by the software depending on the the hardware connected. The Device Type is chosen from a list that is derived from the Port Type column.  The Action and Time(ms) column is chosen from a list that is derived from what is selected in the Device Type column.  The User # is entered as number (1-255) by the user.

How It Works

When the MiWi network initializes, the ports information is sent through the MiWi network to the Master MiWi device which is connected to the PC via a USB HID connection.  Once all of the port connection data is received by the PC software, the data is sorted into another temporary table that is organized and sorted by the layout device (User #).  This table describes which connection ports are connected to each layout device and what action each one of these connection ports does.  Note that there is no requirement to use successive connection ports, it just make it easier to keep track of the layout devices.  PC software and PIC firmware do not care if the green lead is connected to #1 and the red lead is connected #23 connection ports. 

With this temporary table I call the Device Data Table, the GUI can determine which port number will need to be energized to set the turnout points in the correct state.  If I chose to set turnout #35 to turn, the software scans the Device Data Table looking for turnout #35.  Once it finds the table row with turnout #35, it scans the row looking for which port has been assigned to the turn (RED) action.  Now it sends a MiWi message containing the board number, port number and the on time.  The other data in the table is not relevant to energizing the solenoid.  AS described above, it was used in the setup phase to help the user make the correct choices as to options for each layout device.

The PIC firmware then needs to translate this port number into a GPIO pin.  To make this easier, the 40 connection ports are sequentially arranged in 3 MCP23S18 16-bit IO expanders.  The last 8 pins are used for the track control.  It is a simple matter of bit manipulation at this point.  With a zero based port number, the lower 3 bits determine which bit in the 8 bit port needs to be set.  The next 3 bits will choose which of the five 8 bit ports to use.  The firmware then sets the bit, energizing the solenoid.  After the directed time has expired, the firmware clears the bit and the solenoid is de-energized.





Tuesday, February 1, 2022

Turnout & Signal Control Firmware/PC SW (Part 2)

 

I am going to modify this series to include the PC software, since the PIC18F firmware and the PC software are intertwined.  In the last post on this subject, I discussed some of the startup issues of getting the firmware working with the Microchip XC8 compiler, since the C18 compiler is no longer available and issues with the PIC18F47J53 itself..  Having worked through those issues, the "bringup time" on the real PCB was reduced.  There were still several "coding issues" that had be resolved.  I had put in quite a few compiler #ifdef directives.  These blocked sections of code for the Explorer 18 Development board and the real PCB.  Obviously I could not test the real PCB sections until the PCB was available.  Mostly it was coding errors of PIC18F pins and registers.

It took a little more than a day to get the PIC18F47J53 working with the EEPROM, the MCP23S18 IO Expanders and the MRF24J40 module.  So how do I test this.  

Initial Testing

The first testing I do is timer testing.  I have debug routines written for all the basic timers. In this processor those are, Timer1, Timer3 and Timer5.  I have predefined periods of 1ms, 10ms and 25ms.  Then I toggle a GPIO pin based on this and measure the output on a scope (Analog Discovery 2 in this case).  This serves multiple purposes.  First it verifies that all of the clock calculations that are defined are correct and that the timer periods are correct.  

    /*******************************************************************/
    /********************** CLOCK DEFINITIONS **************************/
    /* this is where the clock is set for calculations elsewhere       */
    /*******************************************************************/
    #define CLOCK_FREQ 48000000
    /*********************************************************************
    * Overview: These macro returns clock frequency used in Hertz.
    ********************************************************************/
    #define GetSystemClock()                    CLOCK_FREQ
    #define SYS_CLK_FrequencySystemGet()        CLOCK_FREQ
    #define SYS_CLK_FrequencyPeripheralGet()    (SYS_CLK_FrequencySystemGet()/4)
    #define SYS_CLK_FrequencyInstructionGet()   (SYS_CLK_FrequencySystemGet()/4)
    #define FCY                                 (SYS_CLK_FrequencyInstructionGet())
    #define Fosc                                SYS_CLK_FrequencySystemGet()

Next I will toggle all the GPIO pins to make sure there are no PCB manufacturing errors and no soldering errors.  Once this is done, I can move on to functionality testing.  As you can see from the code segment below, I use #ifdef to block out the debug test routines that are located in the board initialization function.  I have found this is much easier than commenting and uncommenting lines of code. The LED toggle is used a visual cue that something is happening and the code has not "crashed".

    /*******************************************************************/
    /********************** Debug Testing ONLY**************************/
    #define EarlyDebugTesting
    #ifdef EarlyDebugTesting
        while (1)
        {
            TimerOutputTesting();
            PICPortCycle();
            SPIBus_WRITE();
            SPIBus_READ();
            GetBrdSerialNumber();
            SaveBrdSerialNumber();
            mLED_G_Toggle();
        }
    #endif
    /*******************************************************************/

At this point in testing, the PC software communicating with the PIC18F firmware is how all remaining testing is done.  I have created several "Testing Functions" in the PIC18F firmeare that are callable from the PC software.  By changing what happens in these functions, allows me to exercise the entire PC software/PIC18F firmware USB HID interface and the device feature under test.

EEPROM Testing

First tests are can I write and read back the board serial number and EUI address.  Once this was good I moved on to a much more complex operation.  This involves storing the configuration data of the PCB.  More on the features of this below.  Once that worked and I could succesfully read back the configuration, the EEPROM testing was done.  The only other thing I could have done is do write-read of all location using 0x55,0xAA and waling bits.  Something you wold do in product manufacturing environment.  But at this point, if the tests I was doing worked, this full access test would have worked also.  

IO Expander (MCP23S18) Testing

Since the EEPROM was working, the SPI bus is working.  That allows me to move on to more complex testing without having to worry about underlying issues.  I chose to write to the GPIO output registers on each of the three devices.  I write the two different bytes to each of the three devices (16 bit devices), then read them back.  Then I did some simple checking that the output pins are moving.  This was a little difficult since these are open drain outputs.  But I turned on the weak pullups on the outputs to accomplish this testing.

Track Control Testing

As I explained in Part 3, there was some concern about not having pullups on these relay controls. But the MCP23S18 pullups worked just fine.  Since the spring clamp connector was not installed yet, I used a DVOM to measure resistance between the track power feed and the track siding power connection.  As I changed the siding power state in the PC software, the DVOM either shows a short or an open.

LED Control Testing

This was similar to the track control testing, except this is controlled by PIC18F GPIO pins that turn ON/OFF an N-Channel FET.  As in the IO Expander testing, when the FET is off, the output is open drain.  Since the spring clamp connector was already installed, I successively placed a 330 ohm resistor between the 5VDC point and the seven LED pins.  Then the LED control pin either measure 5VDC or ground.

Relay Control Testing

This will be done in two parts.  Once all the circuitry is installed, I will get a turnout and connect it to the PCB and then ground to the train transformer.  Since the spring clamp connectors are not installed, I can use an appropriate size wire in the component holes to control the turnout on each of the 40 positions.  Once this is done, I install the spring clamp connectors and run the test again.  The first test is looking for cold solder joints, firmware issues and PCB manufacturing issues.  The second test is looking only for soldering issues.  The connectors are relatively expensive and hard to remove, so the first test hopefully eliminates any failures that would make the PCB unusable.

MiWi Testing

In the previous incarnation of the turnout and signal control board, I had spent a lot of time getting the MiWi to work.  Also I had done a few consulting projects that used this MiWi Mesh Protocol.  In the Explorer 18 Development board version, I used the latest non-library version that would compile under an XC8 compiler, did not want to deal with libraries.  When I turned the development board on and the current train layout, the development board connected to that MiWi network and all was good.  As described in this Blog Post, I use a Zena Device for the master station.  The PC software connects to it over a USB HID interface and then sends/receives messages to/from the multiple turnout & signal control PCBs mounted under the layout.  Most of the testing above is done using this PC interface and sending/receiving MiWi messages across the network.  While this may not be a comprehensive test, bit error rate, messages dropped, etc, it is good enough for what I am trying to do.

In the next part I will describe the PC software in more detail and some of the issues that had to be resolved as well as others that may not be solved yet.




Sunday, January 30, 2022

Train Turnout & Signal Control Design (Part 3)

 

I have discussed the PCB development in these previous posts, Part 1 and Part 2. Here you can see the PCB with the power section installed and the PCB running from a train transformer.


The parts that I received from WinSource work just fine.  They were about 2X the Digikey price and $50 DHL charge, put I have parts.  This design uses the LMR14030, which has a 40V input maximum and a 3A output @5VDC.  The 5VDC has three uses

  • Power the digital section through the MCP1825ST 3.3VDC LDO
    • PIC18F47J53, MRF24J40MA, MCP23S18, 24LC160
    • The above use just under 75mA
  • Provide miscellaneous power,
    •  the bias control for the switch/signal relays and power the track control relays
    • This section uses < 10mA, on average
  • LED power for the 7 LED channels
    • This is where most of the 5VDC will be consumed.
    • Probably about 60mA per channel or <500mA

This leads to a total power consumption number of less than 600mA.   So the LMR14030 is a little over kill.  The other two designs, the MiWi to BT Bridge and the Train LED Controller, both use the LMR140100.  This DC-DC converter is from the same family as the LMR14030, but has a maximum current output of 1A, a small reduction in PCB real estate and smaller simpler package to install (no power pad).  If an LMR14010 had been used, the total LED power would have been limited to about 850-900mA.  At a max of 20mA per LED attached, this would provide power for about 40 to 50 LEDs.  With 4 to 5 of these installed and the Train LED Controller, that would have been sufficient. 

Not sure how noisy this DC-DC is, but the USB connected without issues.  I then reinstalled the MiWi code and the entire system connected to the MiWi network.  There are some obvious protocol issues that need to be resolved.  I need to get my TEK scope out to look at the noise factor.  The Analog Discovery 2 is nice, but it has limits when looking at power supply noise.

The MCP23S18 IO expanders have open drain outputs.  I turned this into an advantage with the switch/signal relay control.  Instead of 3.3VDC to turn on the controlling FETs, I designed a way for 5VDC to be used to turn the FETs on, driving them further into saturation and providing a little more current to drive the relays.  There are 3 of these MCP23S18 16 bit IO expanders.  Of the 48 ports, 40 are used for switch/signal relay control.  The remaining 8 are used to control 4 track/catenary control relays (Track ON/Track OFF).  These are used to control the track/catenary power to dead end track sidings.  This provides the ability to park engines and not worry about power being applied to them, especially in the non-digital mode of train operation.  

In my haste to get this board done before Chinese New Year holiday, I missed that the control lines to the FETs controlling these track/catenary relays did not have pullup resistors. Oops😒.  Well the MCP23S18 does have weak builtin pullups that are firmware controlled.  I was worried that they might be to weak to turn the FETs on.  Fortunately the FETs require very little current to turn on and the track/catenay control relays work just fine.

Next is to work on the protocol issues and install the 40 FETs/diodes/resistors that control the switch/signal relays. 


Friday, October 8, 2021

More USB HID Implementation

In this blog post, I discussed the issues I was having with the RAD Studio Delphi compiler and the JEDI VCL implementation of a Windows USB HID Device. Eventually tracing it down to a HID device on one laptop that was causing the issue.  At the conclusion of that debugging exercise, I postulated that there was some issue with the JEDI VCL implementation of the USB HID device that needed improvement.

I spent a few hours today in between other projects attempting to track it down further.   Mostly because it was beginning to bug me.  I dont believe there is an error in the code, it works as designed. What is missing in all of my implementations is the OnDeviceCreateError handler. I have never seen documentation that this is to be implemented, other than a short comment in the read me file that it was included. It is not in any of the examples either.  

After tracing through the code, the absence of this handler was causing the code to fail out completely, since the error is not handled. The code snippet below is what appears to be the minimum required. So far it is working on two projects. Depending on why the device is failing, your implementation may need more error processing than shown here.  

procedure TformXXX.JvHidCtrlDeviceCreateError(Controller:
          TJvHidDeviceController; PnPInfo: TJvHidPnPInfo; var Handled, RetryCreate:Boolean);
begin
     Handled:= TRUE;
     RetryCreate:= FALSE;
     FreeAndNil(PnPInfo);
end; 

My only issue is that in development you will continue to receive the error message that the device cannot be identified, which is what started this. The error message appears when you open the project and close the project. So maybe there is some improvement that can still be done. But for me right now, this has dropped far down on my list of things to do. 

 

 


 

 

 

Thursday, September 23, 2021

USB HID Fun for Windows

Almost all the electronics I build rely on a USB HID connection.  USB HID is built into all major operating systems and makes device connection much simpler.  The downside is small transfer size, but my designs rarely move large amounts of data.  While I could probably write an OS driver for other USB implementations, that is time I would rather dedicated to new ideas.  On the Windows side I use RAD Studio (Delphi) to build the Windows Apps.  ( I also use this for the Android Apps).  For the USB HID component I have been using the JEDI project VCL controls, which include a USB HID non-visual control.  Once I determined the correct configuration, this has performed quite well.  It did take a few months to "wring out" all the nuances of the control.

Several months ago I started noticing issues when connecting to the device.  Then apps with USB HID interfaces would not compile. This all began with a new version of the compiler (10.4.x).  I backed up to the previous version and all was great, kind of.  There were still issues on occasion.  (In retrospect, it was only one computer, my HP Elitebook 850 G5, giving me issues on previously compiled apps.)

After too many days of researching this USB issue, I finally found it.  The USB HID component is part of the JEDI VCL library, provided as source.   The source is kept up to date through the JEDI group and has an extensive "ifdef" structure, to ensure backwards compatibility for many versions of RAD Studio.  The USB HID component is compiled when it is installed into the RAD Studio IDE  component palette, this way it is compatible with multiple versions of the compiler.  Sometime after version 10.4.2 of the compiler was released, several patches were released.  Long story short, when the USB HID was installed (without patches), the compilation corrupted the registry access when enumerating the installed HID devices. When I installed the latest version of the compiler on a clean PC, updated all the patches and then installed the USB HID component, it worked just fine, kind of....................

It worked on all the computers, except my HP Elitebook 850 G5 laptop, that is my primary computer.  I kept putting off working on it because it looked like some kind of driver/registry corruption and reinstalling windows and then all the software looked like the only solution.  Well that was not something I wanted to do.  But today it got to be too much, so before trying to reinstall Windows and rebuild the entire computer, I started debugging again. 

What I noticed is that sometimes it would enumerate some HID devices before failing and other times it failed immediately.  So then I started tracking Vendor ID/Product ID data on each device.  After several runs a trend started to appear, it was always the same device failing, but at different points in the enumeration.  Something called "HID Sensor Collection V2".  I disabled the device and then all of the USB HID programs started working.  Looking at my other two computers, neither has this device.  Further digging showed that Windows would allow the generic HID compatible driver to be attached to the device and that also worked.

I have a USB HID exerciser that Microchip use to provide for PIC USB HID development.  It is a small Windows program that gives you all the data on your device in order to verify operation.  It never shows this HID device, unless I use the generic HID driver.  What is happening is that a call to the Windows HID.dll is returning a failure(HidD_GetAttributes), which is verified by the error message the HID exerciser is showing.  Looking into the open source code I am using for the HID interface and tracing to the failure, it is the same call to the HID.dll.  So now I am pretty sure I have found the problem.

So what does this device do?  Dont know for sure, but it looks like it controls several accessories like accelrometer, gyro, temp etc.  The list of devices implies it is for a tablet or tablet mode of a PC.  For now I will use the generic driver and see if anything fails.  The error checking at that point in the code is not robust enough to handle that error and let the program continue to run. On the JEDI forum this problem had been previously noted and I added my data.  A proposed solution is to  ignore the error.  Workable, but not elegant.  Once I get a few more things done, I plan to return to this and see if I cant come up with a solution that will work for more people.

 




Wednesday, April 21, 2021

Development - LED Control #3

Here is what the PC GUI end up as.  It is a little busy and I may change the theme to distinguish it from the current version.  I like that it will match the Android app.  Except the Android app has separate screens for motor and LED control.  I went with labeling brightness here, to make the Android APP more obvious.  You generally start with the PC first for development, then use the Phone to do actual control.


Still to do some cleanup and then move on to Motor Control.