You can't communicate with a LED using the serial port (a LED doesn't 'communicate'). You probably meant that you communicate with some kind of harware (like a microcontroler) that will switch your LED on or off.
Well, then just send some specific packet on the link that your microcontroller can recognize.
Where are you stuck exactly ? Because it is really vague...
Oooopzzzz. I just started to do some research regarding this to gather some knowledge about controlling LEDs using software. I understood by your answer that i should need some extra hardware(Microcontroller) to control LED.
Then I must go and find something about microcontroller and controlling LED first. Anyway thanx a lot for your information. Atleast i got some idea abt this.
Do you have any idea about this without microcontroller. ( that means jus with common electronic items such as breadboards, resistors, capacitors and transistors.)
Maybe what you could do is use one of the control line of the serial port (like CTS, but you need to check which one you could use) and then connect your LED with a resistor between this line and the ground.
But, I don't think this is the most appropriate forum to discuss about that because it is not in fact a programming question...
I believe that you can do it using the parallel port using 24 volts that you should make available from your code in one of the port pins.
We have here working something like that but in that case we make an alarm to sound and we have used a relay and some cables, but only the parallel port. If we are capable to make an alarm to sound, I'm sure that you'll be able to enlight a led.
You can connect LED's to some of the pins of the parallell printer port. You will need to use serial resistors, though. Else, chances are that you will break either the printer driver circuitry (in the computer), or the LEDs themself.
You can use inpout32 (search for it) to control the individual pins of the parallell port.
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
If you are willing to use the parallel port for driving of the LED, as Kahan has suggested, then here's a good article that might help: "Parallel port interfacing made easy: Simple circuits and programs to show how to use PC parallel port output capabilities" at http://www.epanorama.net/circuits/parallel_output.html[^]
Note that under current Windows OSs, the outportb() function is no longer usable, and indeed all functions that directly access the port are not usable. You will need a prot driver, as noted in the cited article.
you didn't get it.
his project certainly doesn't define UNICODE, so his CString is actually CStringA (ansi string - char*).
but he assigns a wide characters string into an ansi string; and wide string contain \0 bytes into some characters, that's why he sees only the first one...
BTW, see my other reply to have a working solution for this pb
Is there some way how to correctly fire some event in WebBrowser?
I need to change selection index of <select> element but
changing selectedIndex of the IHTMLSelectElement does not fire "onchanged" event.
How can I fire this event?
Thank you, I haven't even noticed this function (I was not checking those new interfaces ).
Unfortunately it requires IE 5.5+
I'd like my app to support at least IE 5 (I think it is shipped with Win98).
Any idea how to do this in older IE?
Hello, i have a problem to set new font for that list control!
I use SetFont(newfont); and the execution go to
OnSetFont(WPARAM, wParam, LPARAM lParam)
SendMessage(WM_WINDOWPOSCHANGED, 0, reinterpret_cast (&wp));
after this execution should call
but program newer go to MeasureItem!
i am trying to develop a table which contain the following:
No Name I/C number Experiment Group
Week1 Week2 Week3
1 Tan Chin Chee 1234456666 Exp 1 Exp 2 Exp 3 A
2 AKKKKKKKKKKKK 3847384737 A
6 Adrian 565565656 Exp 2 Exp 3 Exp 1 B
Well the problem here is a have to read the name from a name list of 66 person. And i cannot cout their name. Since in the name list all the name will be written in such way (Tan Chin Chee). After the space it, the next char will be store as some other thing else(not name). And how do i make a space after the group A. Where you can see after number 5, there is a space before going to number 6.
i have a name list of the following
And the source code i have written cannot produce the required form of table.
Well, in the code i have sent i am trying to show the following :
1 12312312312 Group A
2 12155132415 Group A
8 4325141235 Group B
In my initial post i am requesting for help to show the names. Since i can't do that so i am trying to at least show the identification number(I/C) and the group. Also with the spacing after number 7(in my code, after number 13. I have 66 i/c in my name list) The problem i have encountered is that after the spacing the i/c for group B cant't be shown. Why is that?
1 860816465127 ABD HADI BIN ABD HALIM
2 860506295919 BAHAMAN BIN AB HAMID
3 860514436275 BEH FENG JIE
4 840130085033 DANESH A/L LETCHUMANAN
5 860618355859 DHANESH A/L PURUSHOTHAMAN
6 860613145027 HAFIEZ BIN MOHD NOH
7 840324105258 HAYATI BINTI ABDUL KARIM
8 860130295979 HENDRA LUTHFI B HASSAN
9 861112355610 IRENE CHANG YUH FANG
10 861120565327 JAZIZ AMIRUDDIN B JAMALUDDIN
11 851114017085 KALI MUTHU A/L SUNDRARAJU
12 860309235829 KESVIN PILLAI A/L VEGADHARAN PILLAI
13 860110045059 KHAIROL ARIFIN BIN JAMIL
14 840429095025 KHAIRUL AZRI B TAJUDDIN
15 871110085097 KHAIRUL SHAHRI BIN ABDUL ROKIB
16 860313595317 KRISHENTIRA A/L SINNATHAMBY
17 861118436569 KUBERARAAJ A/L NAMBARAJA
18 861002045101 LIM CHING HWA
19 861104386425 LOKE CHOON YIN
20 860711566159 MAHENDRAN A/L DHARMARATNAM
21 861228565804 MASLIZATUL SHAFIRA BINTI MANSOR
22 840822105525 MD NURAZLAN BIN MD GHAZALI
23 850125025625 MOHAMAD BIN MOHAMAD YUSOFF
24 840911105885 MOHAMMAD FAUZAN BIN RAIS
25 860416025413 MOHD AFIQ BIN MOHAMMAD SAMIAN
26 860429388109 MOHD AMIR FIKRI B BASRI
27 840608015537 MOHD AMRI BIN MOKHTAR
28 861220235309 MOHD AZMIR SHAH BIN AIRODDIN
29 860402566139 MOHD FIRUZ AZLAN BIN AYOB
30 840131075435 MOHD FUZAIMIE BIN ABD RAHIM
31 840827035669 MOHD HAFIDZAN BIN CHE KAMARLUDIN
32 861223236665 MOHD HAFIZ BIN BURHAN
33 840404016677 MOHD HATTA BIN BAKRI
34 841216085389 MOHD HAZWAN BIN MOHD HANID
35 861015465017 MOHD JOHANN BIN HAMZAH
36 860918235509 MOHD KAMAL BIN TUKIMIN
37 861127235355 MOHD MUIZZUDDIN B MUNAJAT
38 861008305023 MOHD NIZAM B NOORDIN
39 850115115889 MOHD TARMIZI BIN MAMAT
40 860520236675 MOHD ZAIRUL BIN SUNGAP
41 861112435311 MUHAMAD ABDUL MUHAIMIN B AMAT JUPRI
42 850814115239 MUHAMAD SALLEHUDDIN HAFIZ BIN KHALIL
43 840906145831 MUHAMMAD IDZHAR BIN ISHAK
44 861030566019 MUHAMMAD MURAD BIN NAGOOR PITCHAY
45 860117525581 NEE SIONG CHEE
46 860830145058 NOR ADELINA BINTI RAZALI
47 861016145330 NOR FERINA BT SAMION
48 841027095027 NORFARHAN BIN SUKRI
49 860426235908 NUR RAZMAH BINTI RAZALI
50 860717296102 NURUL UMIL MUKMINI BT MAT RUSOK
51 860626335671 PRAKASH RAO A/L SANNASY
52 861005595221 REMNESH KUMAR A/L RAJASEKARAN
53 850326146458 ROZA ERMA BINTI CHANGZE
54 860219296089 SAIFUL IFSHAM BIN ZAHARIMAN
55 860114065196 SAZNI FARLINA BINTI AZIZ
56 860812565171 SHAHMIR HAYYAN BIN SANUSI
57 851110015410 SHARIFAH NUR AI SHIKIN BT SYED NOH
58 860117115128 SITI HAWA BINTI MOHAMAD
59 860409296098 SITI NURIHAN BT MAJID
60 860507145103 SUBRAMANIAM A/L NITAMAKWUAVAN
61 840331016384 SUHASYIMA BINTI MOHAMED HASSAN
62 860325565131 THINESH A/L SINNIAN
63 860117335913 VIGNESWARAN A/L GANASEN
64 860102135177 WONG YU BOON
65 860415265431 ZAHIDAN BIN ABD HALIM
66 860322295762 ZAWANI BINTI YUSOFF