Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. how to control LEDS

how to control LEDS

Scheduled Pinned Locked Moved C#
csharptutorial
15 Posts 6 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Keith Barrow

    Don't "bump" your question by re-posting it.

    Sort of a cross between Lawrence of Arabia and Dilbert.[^]
    -Or-
    A Dead ringer for Kate Winslett[^]

    L Offline
    L Offline
    Lost User
    wrote on last edited by
    #6

    ooops...i kinda lost the connection so accidentally re-posted. Apologies

    1 Reply Last reply
    0
    • L Lost User

      i would like to connect the LEDs by USB. thanx

      M Offline
      M Offline
      Marco Bertschi
      wrote on last edited by
      #7

      Is the USB going to be recognized as Serial Port on your computer?

      cheers Marco Bertschi


      Software Developer & Founder SMGT Web-Portal CP Profile | My Articles | Twitter | Facebook | SMGT Web-Portal

      L 1 Reply Last reply
      0
      • L Lost User

        What have you tried? Need me to link a random tutorial from Google?

        Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #8

        not tried anything yet, been researching on the use of USB and DB25 serial port interfaces and the necessary hardware between the PC and LEDs

        L 1 Reply Last reply
        0
        • L Lost User

          how do you control LEDs in C#

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #9

          samweps wrote:

          how do you control LEDs in C#

          By writing appropriate code for what you want to do. What did you think the answer was going to be with a question like that?? In all seriousness, if you want to use C#, get a Netduino[^] or a FEZ Panda[^] microcontroller and learn how it's really done, without risking your computers expensive hardware. You'll also learn alot about digital electronics if you really want to teach yourself. Try getting this book[^] or this one[^].

          A guide to posting questions on CodeProject[^]
          Dave Kreskowiak

          1 Reply Last reply
          0
          • L Lost User

            not tried anything yet, been researching on the use of USB and DB25 serial port interfaces and the necessary hardware between the PC and LEDs

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #10

            how do you control LEDs in C#

            That already implied that you imagined that one can hook 'em up easily to an existing port. You'd either dive into Windows 7 "sensor api", or look at an external board. Go for a Raspberry Pi if you're unsure, it has a GPIO-port and there are some samples to get you started on your own project.

            Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]

            1 Reply Last reply
            0
            • M Marco Bertschi

              Is the USB going to be recognized as Serial Port on your computer?

              cheers Marco Bertschi


              Software Developer & Founder SMGT Web-Portal CP Profile | My Articles | Twitter | Facebook | SMGT Web-Portal

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #11

              yes...it will...though I have been doing some research and I think a DB25 serial connector will be easier to work with if I use an IC with Darlington pair arrays to interface the PC port and the LEDs. I now need references. any help will be highly appreciated. Regards.

              M D 2 Replies Last reply
              0
              • L Lost User

                yes...it will...though I have been doing some research and I think a DB25 serial connector will be easier to work with if I use an IC with Darlington pair arrays to interface the PC port and the LEDs. I now need references. any help will be highly appreciated. Regards.

                M Offline
                M Offline
                Marco Bertschi
                wrote on last edited by
                #12

                For how to send commands though a serial inteface I only can refer to one of my article[^]s becausee I have not much expeience with hardware programming. Maybe the manual of the DB25 connector gives you some information. If you want other opinions you may should ask about experiences with the DB25 connector and the IC you want to use in the Hardware & Device forum[^].

                cheers Marco Bertschi


                Software Developer & Founder SMGT Web-Portal CP Profile | My Articles | Twitter | Facebook | SMGT Web-Portal

                1 Reply Last reply
                0
                • L Lost User

                  yes...it will...though I have been doing some research and I think a DB25 serial connector will be easier to work with if I use an IC with Darlington pair arrays to interface the PC port and the LEDs. I now need references. any help will be highly appreciated. Regards.

                  D Offline
                  D Offline
                  Dave Kreskowiak
                  wrote on last edited by
                  #13

                  Considering todays machines are not even coming with serial and parallel ports, you're entire premise of using them is already dead in the water and limited in scope to the lifttime of the hardware that you are currently using. Since you already know a bit of eletronics, just go with a microcontroller that can run the .NET Micro Framework and be done with it! Oh! and those can already be programmed over USB using Visual Studio 2008 and up, if not VS2010 and up.

                  A guide to posting questions on CodeProject[^]
                  Dave Kreskowiak

                  1 Reply Last reply
                  0
                  • L Lost User

                    how do you control LEDs in C#

                    S Offline
                    S Offline
                    Samer AlRawi
                    wrote on last edited by
                    #14

                    it depends on what you need , if you have a Com ports you can use it easily with some hardware buffer and amplifier , or you can use any controllers, if you are not familiar with Arduino or PI , try to find a CanaKit board, its very easy and with LED's and Relayed output.

                    1 Reply Last reply
                    0
                    • L Lost User

                      how do you control LEDs in C#

                      G Offline
                      G Offline
                      garaber
                      wrote on last edited by
                      #15

                      parallel port(DB25) breadboard optoisolator for each of the used lines(ie Protect the PC interface next a latch (something to hold the data) drivers (for lighting the lighty things) opto latch

                                              +Vcc
                                        -----------------
                                       r  r  r  r  r  r  r
                                       e  e  e  e  e  e  e
                                       s  s  s  s  s  s  s
                                       i  i  i  i  i  i  i
                      

                      db25 s s s s s s s
                      ╔═╗latch sig t t t t t t t
                      -║-║------| o o o o o o o
                      ║ ║ | r r r r r r r
                      ║ ║ ╔═╗ ╔═╗ ╔═╗ | | | | | | | //led
                      -║-║-║o║-║l║----║d║--------------------o----|>-----o
                      -║-║-║p║-║a║----║r║-----------------o-------|>-----o
                      -║-║-║t║-║t║----║i║--------------o----------|>-----o
                      -║-║-║o║-║c║----║v║-----------o-------------|>-----o Ground
                      -║-║-║ ║-║h║----║e║--------o----------------|>-----o
                      -║-║-║ ║-║ ║----║r║-----o-------------------|>-----o
                      -║-║-║ ║-║ ║----║s║--o----------------------|>-----o
                      ╚═╝ ╚═╝ ╚═╝ ╚═╝

                      each of the lines are attached to a pull up resistor

                      see C# parallel port programming on Code Project

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups