|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Digital Inputs?
Hello!
I am using C++ and I have a question about implementing Digital Inputs in the code... Is Get() the function that means "true" or no? I basically want an if statement saying if DigitalInput1 is true, then this, but I am unsure which function to use to set the condition... =( Thank you!!! ![]() |
|
#2
|
||||
|
||||
|
Re: Digital Inputs?
DigitalInput DigtalInput1(1);//port1
if (DigialInput.Get()) { do this } else { do that } |
|
#3
|
||||
|
||||
|
Re: Digital Inputs?
Thank you!!!!!!
![]() |
|
#4
|
|||
|
|||
|
Re: Digital Inputs?
how would you do this in C without adding the C++ digitalinput objects? could you cast the UINT32 GetDigitalInput() function results to boolean?
|
|
#5
|
||||
|
||||
|
Re: Digital Inputs?
Quote:
Code:
if(GetDigitalInput()){
// something
}
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Using Interrupts on Digital Inputs | Analog | C/C++ | 6 | 03-02-2009 23:05 |
| Digital Inputs | KRibordy | C/C++ | 5 | 25-01-2009 00:35 |
| reading multiple digital inputs | angelkat | Programming | 2 | 25-01-2009 00:22 |
| Digital inputs, bandwith, errors? | Micah Brodsky | Programming | 7 | 20-01-2003 16:08 |
| Analog vs Digital inputs? | f22flyboy | Programming | 8 | 08-11-2002 22:18 |