If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Enjoy an ad free experience by logging in. Not a member yet? Register.

C# MF need help with a program please

I have a program that works fine, its in C# MF

My problem is with Method_6() and 7
This line
while (anyinputfor6.Read() == true && method_state_6 == true)
I need to reverse the logic, I tried everything it sounds simple but I don't know how to do it.
Tried stuff like
while (anyinputfor6.Read() == false && method_state_6 == true)
But no, that wont work, so I need help as I'm just a newb to programing.
Thanks

but I am shooting in the dark here- can you make it clearer what your attempting?

Edit: It looks like you're trying to snake a value off that pin being tripped.... I haven't worked with that PIC so idk the API or the pinouts, but what about tying it high and then invoking the .Read()? You need something to hold that status true until you .Read() it and then flip it off; I imagine the PIC has that functionality. But are you trying to read it on the .Read() being true or false? Also what does the circuit look like on the tail end of that input? If you have nothing filtering the VS and it is rippling it could be flicking true-false-true-false-true-false etc. There are a lot more pieces here than just the code in play.

Edit Edit: Also from my xp here there are little to no EE's so without knowing about this from EE background (self) the amount of ppl looking at this that would know what it is you're even attempting is minimal if not null (in short need a lot more detail maybe post a pic of circuit as well)

but I am shooting in the dark here- can you make it clearer what your attempting?

This is why no one replied.

Your code is incredibly obtuse and hard to follow. "Method_1"? Seriously, that gives no indication what the function is supposed to do. For someone to look at your code and understand what it is supposed to be doing is nearly impossible. I'm impressed that you are able to keep it straight. Easier to follow code is much easier for people to help you with it.

Originally Posted by alykins

Edit Edit: Also from my xp here there are little to no EE's so without knowing about this from EE background (self) the amount of ppl looking at this that would know what it is you're even attempting is minimal if not null (in short need a lot more detail maybe post a pic of circuit as well)

Yeah, not a lot (read: hardly none) developers with embedded experience hang out on here. I'm one of them and alykins is the only other person I can remember off the top of my head.