siafu said:Hi AZ, actually 6 worked, not sure why, but it did send one email when I shorted (touched input 3 wire with 5+V wire of the WC board.
I didn't actually hook it up to the doorbell, because I don't know how properly. In fact I tried hooking one of the inputs of a different WC board some time ago, and I fried the inputs, because later I found out that when someone presses my apartment door (not to be confused with door buzzer discuses earlier) the way I had it hooked up, the AC voltage fluctuated, from low to very high, as high as 50VAC according to my multimeter. and that's how I fried all the inputs to one of my WC board. That board is still in use, but can only use it with the analog inputs, and that's fine for what it does, it controls the outside light that is hooked up to a photo-resistor, and it works very well, thanks to folks on this board that helped me with that project. Now I just need to figure out how to get low signal from my doorbell to trigger IP3, without frying the inputs. Any suggestions welcomed.
I will give your code a try as well tomorrow and report back.
Thank you BraveSirRobbin, But that's an expensive add on. Any other way to do it with resistors or similar?BraveSirRobbin said:
AZ, your code works as intended as well.siafu said:Hi AZ, actually 6 worked, not sure why, but it did send one email when I shorted (touched input 3 wire with 5+V wire of the WC board.
I didn't actually hook it up to the doorbell, because I don't know how properly. In fact I tried hooking one of the inputs of a different WC board some time ago, and I fried the inputs, because later I found out that when someone presses my apartment door (not to be confused with door buzzer discuses earlier) the way I had it hooked up, the AC voltage fluctuated, from low to very high, as high as 50VAC according to my multimeter. and that's how I fried all the inputs to one of my WC board. That board is still in use, but can only use it with the analog inputs, and that's fine for what it does, it controls the outside light that is hooked up to a photo-resistor, and it works very well, thanks to folks on this board that helped me with that project. Now I just need to figure out how to get low signal from my doorbell to trigger IP3, without frying the inputs. Any suggestions welcomed.
I will give your code a try as well tomorrow and report back.
How can I test this for you, to see if 32nd bit is 1 or 0?Lou Apo said:I think that using andb along with the hexidecimal of 32 1's may have solved my absolute value issue. I had a program where I needed the absolute value of a number and couldn't figure a short way to do it. I believe that I need to andb it with a 0 followed by 31 1's. Either that or I need to orb it with a 1 followed by 31 0's. I don't have a cai board up right now to test whether the 32nd bit is 1 or 0 when the number is positive.
siafu said:AZ, your code works as intended as well.
Hi Lou,Lou Apo said:If my logic is correct, andb to 7FFFFFFF (01111111111111111111111111111111) should give you the absolute value.
START
SET VAR1 -1
DELAY 1000
ANDB VAR1 7xFFFFFFF VAR1
DELAY 2000
END
So, the above code should show -1 for var1 for 1 second, then 1 for two seconds, then repeat.
hmm, this of course is all garble to me, but I removed the x, but still get an errorFrederick C. Wilt said:You have a typo: There is an X after the 7.