|
i would like to connect the LEDs by USB.
thanx
|
|
|
|
|
Is the USB going to be recognized as Serial Port on your computer?
|
|
|
|
|
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.
|
|
|
|
|
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[^].
|
|
|
|
|
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.
|
|
|
|
|
Don't "bump" your question by re-posting it.
|
|
|
|
|
ooops...i kinda lost the connection so accidentally re-posted.
Apologies
|
|
|
|
|
What have you tried? Need me to link a random tutorial from Google?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
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
|
|
|
|
|
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
If you can't read my code, try converting it here[^]
|
|
|
|
|
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[^].
|
|
|
|
|
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.
|
|
|
|
|
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
║ ║ ╔═╗ ╔═╗ ╔═╗ | | | | | | |
-║-║-║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
|
|
|
|
|
hi, I would like directions on how to control LEDs through any ports in C#
|
|
|
|
|
Request you to not do resposts.
|
|
|
|
|
He can't. Once a question has an answer, it can't be deleted.
|
|
|
|
|
|
Is it still possible for a program to return a value to a command line BAT file ?
I'm thinking, a real simple square with two buttons, which return a 1 or a 0 value back to the command line that called it.
Can this be done ?
Is it simple ?
How is it done ?
Assuming I can do it, can I post the source code here on CodeProject ? Can I post the EXE ?
|
|
|
|
|
Only if it's an integer (32-bit). Yes. Yes. Look it up. Yes. No.
|
|
|
|
|
Look into "exit codes"
example[^]
Don't follow just one thread, read up on it a little, before jumping in.
|
|
|
|
|
I am beginner.
and I am going to make my own audio player without using "windows media player"
Please help me to finding me complete tutorial for making own audio player.
|
|
|
|
|
Chaman Saini wrote: and I am going to make my own audio player without using "windows media player"
Please help me to finding me complete tutorial for making own audio player.
I suggest you try the built-in class called "soundplayer[^]".
There's little chance that you'll find a "complete" tutorial on writing your own audio player. If you really want to use something else, try looking for an open-source library.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Request you not to repost.
|
|
|
|
|
|
Hello
I wanna ask that what is the reason that I am not able to play the mp3 file.
my whole code for the "class" for simple audio player is as below:-
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
namespace myplayer
{
class Player
{
[DllImport("winmm.dll")]
private static extern long mciSendString(string lpstrCommand, StringBuilder lpstrReturnString, int uReturnLength, int hwndCallback);
public void open(string file)
{
string command = "open\"" + file + "\" type mpegvideo alias MediaFile";
mciSendString(command, null, 0, 0);
}
public void play()
{
string command = "play MediaFile";
mciSendString(command, null, 0,0);
}
public void stop()
{
string command = "stop MediaFile";
mciSendString(command, null, 0, 0);
command = "close MediaFile";
mciSendString(command, null, 0, 0);
}
}
}
|
|
|
|