A noob needs some guidance

I don't know if you could save this on the console, or if that work on your phone browser:

http://192.168.1.15/...utput=1&state=1 to turn on

There is a new iPhone app developed by a user on this forum, but we don't know if there is Android app yet. Maybe we could develop one, if we know what would be most useful for people.

I would vote for one that gave me the ability to set buttons to change the TTL states and to show what that state was. Having the ability to see the state of the analog inputs would be nice for me. I am thinking about using it to monitor some alarm systems.
 
The example fwd03 provided is for a single ttl1 output isn't it? I want to control two relays with two inputs. I tried using a bookmark on my phone and entering the URL to change the state of ttl1 and that worked fine. So, the code example will take an input for ttl1 and then set it to 1 for a second and then back to 0. Can this be added to to make two ttl actions the same?

It would be trivial to write a small program that just watches the outputs - when it sees one go "on", it would wait a second and then force it back off again.

This way, you'd only send one request - no chance the "off" would get lost or dropped, and a single step process.
 
I would vote for one that gave me the ability to set buttons to change the TTL states and to show what that state was. Having the ability to see the state of the analog inputs would be nice for me. I am thinking about using it to monitor some alarm systems.

If you have certain looking you like this alarm system look like, we can start thinking about it. I think MobileMe has a good idea to have sensor to detect the garage door open status. You only need one sensor to detect garage door is not closed. Other TTL inputs and analog inputs can be used for door and window sensors.
 
Somewhere I went wrong. I can get OP1 to change from 0 to 1 for 1 second-- works great, with this code
START
TSTEQ RAM1 0
CALLSUB SET_OP1
CALLSUB CHK4LOW
TSTEQ OP1[1000] 1
SET OP1 0
END

CHK4LOW:
TSTEQ IP1 0
SET RAM1 0
RET

SET_OP1:
TSTEQ IP1 1 RAM1
SET OP1 1
RET


this doesn't work at all
START
TSTEQ RAM1 0
TSTEQ RAM2 0
CALLSUB SET_OP1
CALLSUB CHK4LOW
CALLSUB SET_OP2
CALLSUB CHK4LOW2
TSTEQ OP1[1000] 1
TSTEQ OP2[1000] 1
SET OP1 0
SET OP2 0
END

CHK4LOW:
TSTEQ IP1 0
SET RAM1 0
RET

SET_OP1:
TSTEQ IP1 1 RAM1
SET OP1 1
RET

CHK4LOW2:
TSTEQ IP2 0
SET RAM2 0
RET

SET_OP2:
TSTEQ IP2 1 RAM2
SET OP2 1
RET

Where did I go wrong?

Thanks
 
Somewhere I went wrong. I can get OP1 to change from 0 to 1 for 1 second-- works great, with this code

Where did I go wrong?

You want to turn the output on on demand using your phone, and have it turn itself off again 1 second later?
When I said "trivial code", I meant this:

Code:
START    
	    tsteq op1[1000] 1
	    set op1 0
END

From your computer/phone/whatever, browse this URL to turn the output on:

http://192.168.1.15/api/setttloutput.cgi?output=1&state=1

The code above will turn it back off again 1 second later!
 
Boy that is trivial! Works like a dream. I added this
Code:
tsteq op2[1000] 1
			    set op2 0
and it does the trick for the 2nd ttl output.

As I watch the System Status page to test I notice the Analog inputs kinda randomly change from 1 -5 Are they just picking up noise? I am not using them so that isn't an issue yet.

thanks a bunch for your help!
 
Boy that is trivial! Works like a dream. I added this
Code:
tsteq op2[1000] 1
			 set op2 0
and it does the trick for the 2nd ttl output.

As I watch the System Status page to test I notice the Analog inputs kinda randomly change from 1 -5 Are they just picking up noise? I am not using them so that isn't an issue yet.

thanks a bunch for your help!

That is a lot of noise. I have quite a few cai units and none bounce more than 1 unit (~.01v).

Since you are using the inputs, I assume you have a connector plugged into the input with wires. You probably have some cross talk between the wires. Did you make the connector yourself or is it pre-made?
 
Hi Lou,

Actually the board is powered up, in an old 1u 8 port switch case (metal). No connectors at all yet. Nothing connected except power. Since I am not using them, should I pull them down with something?

One thing I got working this morning is an APP for my android to do the changes for OP1 & OP2. I used Appdesigner from MIT to make it. It works through my firewall and operated the TTL pretty well. Now to hook up the relays and the doors and I can put this project to bed.
 
I have heard people complain of this before. I haven't seen it on any of my boards. There really isn't any point in pulling down an unused aip to 0 since. .. you aren't using it.

But why are you having this? I don't know. Will it still have noise when connected to something real? Do you foresee yourself ever needing the analog inputs? I guess those are the important question. Consider hooking it up to a known and stable voltage (like a 9v battery). If you still have unacceptable bounce, talk to cai support about it.
 
One thing I got working this morning is an APP for my android to do the changes for OP1 & OP2. I used Appdesigner from MIT to make it. It works through my firewall and operated the TTL pretty well. Now to hook up the relays and the doors and I can put this project to bed.

Are you developing an Android app?
 
Am I developing an Android APP? What I have is a crude app that has two buttons on it. one for each door. The button goes to the web page on the WebControl and changes the OP state. When I press on one of them it activates the relay and opens the garage door. The buttons are set to open the WebControl page and change the state of the OP. At some point I want to explore some way to see the status of the different controls. What I have now is a first effort. Just tonight my wife asked when we were going to have the ability to unlock the door from our phones. So I guess I am off to make that work :) I am by no means a programmer.
 
edlentz, I added a 470uF capacitor crossing my board temperature terminal 1 and 3, the A/D noise dropped to only 0 and 1.
 
Back
Top