Status pin clarification

General support questions and discussions.

Re: Status pin clarification

Postby FACE » Mon Jan 20, 2014 10:12 am

Now we're getting somewhere…

I did as advised. Once I apply power, the standard lights come on. In about 30 seconds the relay goes closed and the LED comes on.
It stays closed for about a second then goes open again and the LED goes off. In about 30 seconds it repeats this process.
Side by side I understand the differences in the code now.

I'll patiently wait on the next step. In the mean time, I will contact DFRobot anyway. We all do need to know what the jumpers do exactly,
and what their different configurations might be. This will solve some issues down the road I'm sure.

Thank You
Attachments
Picture.jpg
Picture.jpg (54.52 KiB) Viewed 5567 times
FACE
 
Posts: 24
Joined: Thu Jan 02, 2014 9:14 pm

Re: Status pin clarification

Postby support » Mon Jan 20, 2014 12:59 pm

Great! Glad we could assist. Now, your next step is to get those jumpers figured out. Once done, simply take
the original MyDoorOpener.INO file off our web site and change the relay pin # to the one you've configured
your rig with.

Make the iPhone app and our whole stack work with all of this before moving on to the status feedback portion.

Let us know of your findings with DFRobot.

Thanks,
support
Site Admin
 
Posts: 384
Joined: Thu Aug 22, 2013 7:30 pm

Re: Status pin clarification

Postby FACE » Wed Jan 22, 2014 8:48 pm

After doing some more research and reading various other forums on the DFRobot v2.1, I came up with the following attachment
as an explanation of exactly what the jumpers are for. I also got a reply from DFRobot tech support. I sort of understand what he is saying, but he didn't
completely answer my question. I believe the language barrier makes it a little difficult to interpret properly. I think with what I found, and what he says, we now have an understanding of what the jumpers do. It also looks like you can't share relay functions if you run an Xbee and an Arduino at the same time.
Let me know what you think…

Here's what he said:

Thank you for contacting DFRobot Technical Support.
These 4 jumper caps is connected Digital pins to four relay port.
If you want to change the the different Digital pin or some pin is occupied, you could connect other one to IO0~3 via a wire cable.
It will be very convenient.

Hope it will be helpful. Let us know if you have any problem.

Best Regards,
Grey
--DFRobot Tech Support
Attachments
Picture 1.jpg
Picture 1.jpg (98.02 KiB) Viewed 5567 times
FACE
 
Posts: 24
Joined: Thu Jan 02, 2014 9:14 pm

Re: Status pin clarification

Postby support » Thu Jan 23, 2014 8:18 am

Our understanding is that indeed, with the jumpers in place, the digital pins to control
the 4 relays would be 2, 7, 8, 10. But since 10 is conflicting, you'd run a wire between
the middle pole of that jumper block to the D2 pin. What remains unclear is, with that
setup, under what pin would the 4th relay operate?

I believe there's another thread on our forums that already explains the pin #10
issue and how it works when you link it to the D2 pin, etc ...

Typically, you probably don't have 4 devices to control anyways, so just remove the jumper
completely on that jumper block and you'll have 3 working relays at pins 2, 7 & 8.

That's it!
support
Site Admin
 
Posts: 384
Joined: Thu Aug 22, 2013 7:30 pm

Re: Status pin clarification

Postby FACE » Thu Jan 23, 2014 11:04 am

There is in fact a section here that covered the #10 conflict. Now that we have an understanding about the jumpers,
I don't see any "tweaking" that could be done with them to further my troubleshooting.

From what we've done, I know that by relay board is functioning properly. With the sample code that you gave me,
I was able to run the code in a loop and watch the relay open/close about every 30 seconds.

Correct me if I'm wrong, but I believe my next step is to use your INO file and put the #2 value in like this:

//static const uint8_t relayPins[] = { 9 }; // single device at pin #9
static uint8_t relayPins[] = { 2 }; // select if using DFRobot RelayShield
//static uint8_t relayPins[] = { 2, 3 }; // two devices at pins #2 and #3
//static uint8_t relayPins[] = { 2, 3, 4, ... }; // even more devices at pins #2, #3, #4, etc ...

// status contact should be connected to these analog input pins (anologRead).
// Adjust to match the number of devices you have hooked up (examples provided below in comment) ...

//static const uint8_t statusPins[] = { 3 }; // single device at pin #3
static uint8_t statusPins[] = { 2 }; // select if using DFRobot RelayShield
//static uint8_t statusPins[] = { 2, 3 }; // two devices at pins #2 and #3
//static uint8_t statusPins[] = { 2, 3, 4, ... }; // even more devices at pins #2, #3, #4, etc ...


I would then compile it and upload it to the Arduino.
Would you agree that this is my next step or should I be checking or looking at something else before hand?
I don't want to jump the gun again and cause a bunch of problems like last time.
FACE
 
Posts: 24
Joined: Thu Jan 02, 2014 9:14 pm

Re: Status pin clarification

Postby support » Thu Jan 23, 2014 9:37 pm

That is correct. You should take the INO file from our GitHub account and have that
line modified (relayPins). You will obviously need to also change some other lines in that
file to have it reflect your specific network settings, etc but all of that is documented
in our PDF step-by-step instructions.
support
Site Admin
 
Posts: 384
Joined: Thu Aug 22, 2013 7:30 pm

Re: Status pin clarification

Postby FACE » Thu Jan 23, 2014 11:37 pm

The other mods i need to do, I'm familiar with. But, what/where
exactly is a GitHub account? Do you mean I need to download the INO
file that I originally downloaded or is this something up to date that I should use instead?
FACE
 
Posts: 24
Joined: Thu Jan 02, 2014 9:14 pm

Re: Status pin clarification

Postby support » Fri Jan 24, 2014 10:26 am

We simply want to make sure you're starting fresh, from the original .INO file and not
a copy of the file you've had laying around, in which you've changed things already and
potentially broke while carrying out some of those earlier tests you did.
support
Site Admin
 
Posts: 384
Joined: Thu Aug 22, 2013 7:30 pm

Re: Status pin clarification

Postby FACE » Sat Jan 25, 2014 8:35 pm

I've downloaded a fresh copy of your INO file. Made the changes and uploaded it to the Arduino. Applied power and everything seems to be functioning properly.(no visible error lights or relays clicking for no reason)

The next step that I have been working on is the port forwarding. On my router, an ARRIS, I already have port 80 in use by my video surveillance system. What I need to do is change the Arduino default port 80 to another port.

I looked at a wiki that tells me what ports, in general, are available for forwarding. http://en.wikipedia.org/wiki/List_of_TC ... rt_numbers
Port 81 is a TCP port and from what I see, I should be able to use it instead of 80. Would you agree with this?

In the INO file, there are several references to port 80. Which line number(s) do I need to change in order for the Arduino to start listening on port 81?

This is all assuming I can use port 81. If not, please let me know which port I should use.
FACE
 
Posts: 24
Joined: Thu Jan 02, 2014 9:14 pm

Re: Status pin clarification

Postby support » Mon Jan 27, 2014 12:27 pm

The one near line #174, where it says:

Code: Select all
WebServer webserver("", 80);
support
Site Admin
 
Posts: 384
Joined: Thu Aug 22, 2013 7:30 pm

PreviousNext

Return to Support



cron