Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: USB Button LED Control  (Read 87 times)

0 Members and 1 Guest are viewing this topic.

rr22520

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 1
  • Last login:Today at 12:43:40 pm
  • Software dev is my thing
USB Button LED Control
« on: Yesterday at 11:18:47 pm »
Hi,

 This is all related to the USBButton use only.

 In PacDriveDemo Visual Studio solution, can anyone explain what

 Set Temporary and Set Permanent do?

Also, I want to set the LED after I poll the switch state, I would like to use fade and flashing if possible?

 Pseudocode example,

          top_of_loop:
              Check button state

               if not pressed go to outer_loop

                 if pressed, set LEDs to active COLOR (r,g,b)
                   inner_loop to recheck while button is pressed
                   while in inner_loop if not pressed now
                      Set LEDs to inactive COLOR (r,g,b)
                       and fade slowly to very dim.
                       while button has not been pressed again
                        it would be great to pulse like heartbeat the LED brightness and fade
                    when button is pressed
                           exit inner loop after set LEDs to a inactive COLOR (r,g,b)

             outer_loop:
                  goto top_of_loop   


thx in advance,
Rob