|
The right way is to add the parameters once and set the values each time through the loop.
Create Command
Create and add parameters
Loop
{
Set parameter values
Execute Command
}
|
|
|
|
|
Hi,
I want to display the output of LM35 temperature sesnor on PC in C# but i cannot find the source code for that in C#. Can any one help me?? I am not using any kind of microcontroller.
|
|
|
|
|
Hmm,
From the datasheet you already know that the LM35's output is a voltage increasing by 10mv/degree and it will need connecting to an ADC, as a direct PC connection is not possible. The PC interface, both hardware and software, will be to the ADC.
Alan.
|
|
|
|
|
Yes i have connected it with ADC0804 and did interfacing via parallel port. But i dont know how to display the values on pc.
|
|
|
|
|
1. Read the data from the device
2. Format it into the form that you (or your users) want
3. Write it to the screen
Which of these methods are you having trouble with?
The best things in life are not things.
|
|
|
|
|
I am trying to read the data in C and is giving zero ouput. What does this mean?? Is the power suply not properly given??
|
|
|
|
|
aeman wrote: I am trying to read the data in C and is giving zero ouput. What does this mean?? Is the power suply not properly given??
How can I guess? I have no idea how you have connected this device, whether it is powered on, whether it is working correctly, what sort of commands you send to it, or what responses you receive back. You will have to do some debugging for yourself in order to give us some more information.
The best things in life are not things.
|
|
|
|
|
What's an "LM35 temperature sesnor"?
|
|
|
|
|
|
Quite. Perhaps you could try that for C# code to interface with the parallel port.
|
|
|
|
|
ya well said. After doing that i came here.
|
|
|
|
|
|
yes i did that and i can access the parallel port also but i donot know how to display the values of sensor on pc??
|
|
|
|
|
Then you need to look up the documentation for the device you are interfacing with to find out what it will send you over the parallel port and how you want to represent that.
|
|
|
|
|
Cha, as if.
A while back I got around to buying one of these[^] in hopes that I could use it to sample and store outdoor temperatures. But it doesn't seem accurate and it only provides the temperature of the board, which warms up while it has power.
So I need to devise a way to only give it power when I want to gather a sample.
|
|
|
|
|
Hello Everybody,
I am creating a class in which i want to create a property of Name (Readable and Writable).
Which Will be Unique every time if i will be create this class.
and it will be checking for previous existing Object of Class.
if i create a class like :
Classname clsname = new Classname();
Classname clsname1 = new Classname();
then Output is
clsname.Name = Class1
clsname.Name = Class2
Then pls help me to do this work.
Thanks
If you can think then I Can.
|
|
|
|
|
Should be quite simple
public class Classname
{
public Classname()
{
this.Name = Guid.NewGuid().ToString();
}
}
Will this do?
|
|
|
|
|
What about...
public static class ClassNames{
private static int _count = 0;
public static string GetNextName(){
return "Class" + (_count++);
}
}
public abstract NamedClass{
public string Name {get;set;}
public NamedClass(){
this.Name = ClassNames.GetNextName();
}
}
public class Classname : NamedClass{
public Classname(){
}
}
...or something along those lines
If my jokes make me laugh, then I have already succeeded with 100% of my target audience
|
|
|
|
|
I use something similar to this to assign IDs to clients in my socket library, and in some other projects. Do note though that this isn't thread safe and it's better to use Interlocked.Increment if you want to call the ID generator from different threads.
|
|
|
|
|
Ah yes, a good point
If my jokes make me laugh, then I have already succeeded with 100% of my target audience
|
|
|
|
|
Hi all,
this error comes when i am using win32 dll in c# application.
An unhandled exception of type 'System.BadImageFormatException' occurred in Test.exe
Additional information: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
please help me for this.
thanks in advance.
|
|
|
|
|
32/64 bit mismatch!
you have to set the target cpu to x86, then it will work.
I cannot remember: What did I before google?
|
|
|
|
|
but both are build on same machine and platform.
|
|
|
|
|
if you are running a .net application, build for target "any cpu", the program will start as a 64 bit application - if the machine is running a 64 bit windows.
and if your win32.dll (doesn´t sound like an .net dll) is build for 32 bit (why do i think it is? maybe the 32 in win32.dll?, then it is not possible.
you have to build the .net app explicitly for x86 target. dot.
I cannot remember: What did I before google?
|
|
|
|
|
Hi
I am trying to set the BackColor of a specific cell (C2010 Enterprise), but have failed so far - can you help!
I have tried this:
DataGridView1[2, 3].Style.BackColor = Color.Red;
but that didnt work (doesnt appear to do anything)
Have you any other suggestions?
Cheers
|
|
|
|