Show Posts
Pages: 1 ... 32 33 [34] 35 36 ... 225
496  Using Arduino / Networking, Protocols, and Devices / Re: The Ethernet shield's 4 connections.... on: January 17, 2014, 12:06:04 am
If anybody's interested, my two servers from one shield are available here and here.
497  Using Arduino / Networking, Protocols, and Devices / Re: The Ethernet shield's 4 connections.... on: January 16, 2014, 10:53:20 pm
So here's an idea for a useless machine (UM)....

1x E'net shield  running 2 servers and 2 clients, talking to each other completely "invisibly", with each client like in the playground example that queries google, talking to one of the servers and getting a 200 OK back.

This is an even more useless UM than I've seen before because with UMs you usually see something, like it switching itself off. This one would just be just sending stuff round the 'net and you wouldn't even know it was on in the first place.
498  Using Arduino / Project Guidance / Re: Reversing DC motor with Arduino Leonardo and L298N on: January 16, 2014, 10:24:53 pm
Diagram: (seriously big thank you for your continuous help, I'll try to keep adding "karma".

Pic looks ok to me.... that said, I have no personal knowledge of those resistors....
499  Using Arduino / Networking, Protocols, and Devices / Re: The Ethernet shield's 4 connections.... on: January 16, 2014, 10:10:13 pm
Thanks ST....

Glad you posted that code there, becasue my inclination would have been to make these:

Code:
// check port 80
EthernetClient client = server.available();
if(client) {
  // do port 80 page
}

// check port 8080
client = server2.available();
if(client) {
  // do port 8080 page
}

..... two different clients, client and client2 thus:

Code:
// check port 80
EthernetClient client = server.available();
if(client) {
  // do port 80 page
}

// check port 8080
client2 = server2.available();  // <<<<<<<<<<, client2
if(client) {                                     //<<<<<<<<<<< client2
  // do port 8080 page
}

Even if I could do that, it seems from your snippets that it's not necessary.

edit.... except I'd have gone EthernetClient client2 = server.available();

Further EDIT.... but Thanks, it works with the code you supplied. Now my problem is to try to find another port that I can forward. Right now I'm seeing the second page from the lan side. At your or zk's suggestion a while back I tried to forward ports up in the 808x range, when it wasn't letting me use 80, eventually finding that 8085 was permitted. Tried 8086 for second server and it doesn't work. I guess this is a matter of trial and error....
500  Using Arduino / Project Guidance / Re: Reversing DC motor with Arduino Leonardo and L298N on: January 16, 2014, 10:05:45 pm
Quote
I have added Serial.print statements to every block of code now.

and?.... what do they say? Is the code going to the right places?

EDIT: take the motors off and put your volt meter across the pins on the 298- check that you have +- in one direction and -+ with the sketch going into reverse, and measure that you have enough volts.

It has been said here somewhere, that some motors require a higher voltage in one direction compared to the other.

On a side note, you are aware that the 298 eats volts?- as a minimum you lose 2 volts through there even at no load; that loss rises to 3-4V (from memory- check the data sheet) at higher current, so you need to throw lots more volts in that you need at the motor.

501  Using Arduino / Project Guidance / Re: Thermostat with 3 position switch on: January 16, 2014, 02:59:04 pm
How about you pull 3 digital inputs high with their pullups, and have each connected to the switch. Ground the other side of the switch, so that in each position it grounds one or other of the pins.

Then have some ifs checking to see if pinx piny or pinz is low, and in each if's action you set the temp as A B or C....
502  Using Arduino / Networking, Protocols, and Devices / The Ethernet shield's 4 connections.... on: January 16, 2014, 01:49:01 pm
Does the fact that there may be 4 connections, mean I can run more than one server?

If so, do I simply double up these lines:

Code:
EthernetServer server(8085); //server port
server.begin();

.... like this?

Code:
EthernetServer server(8085); //server port
server.begin();
EthernetServer server2(8086); //server port
server2.begin();

Or do I have the stick by the wrong end again?

TIA,

Jim
503  Using Arduino / Programming Questions / Re: Very Basic Servo Help (w/ adafruit motor-shield) on: January 16, 2014, 10:09:55 am
Oh thanks!

So it seems that because mine is continuous rotation it cant do some of the iconic servo functions like rotate to a specific angle?

Zakly.... what you send as an "angle" to a continuous servo is interpreted as the speed. 90 is stop, lower is one direction with 0 as full steam, and higher is the other way with 180 as full steam. Also might not be exactly 90.... I've read that it could be say 88 or 92, depends on the individual servo.

There's also discussion here about whether or not a continuous servo should still be called a "servo"...
504  Using Arduino / Project Guidance / Re: Reversing DC motor with Arduino Leonardo and L298N on: January 16, 2014, 03:02:18 am
I don't know what you mean by "grounding the motors"... they only have two connections? One is + and one is -  (or vice versa) as you proved by direct conn to the power.

How does "expression" get changed. You should put some serial monitor debugs into the various legs of the if to see where it's actually going... Serial.println("I'm in the left turn part");

Easiest way to do a circuit is to draw it by hand, take a photo with phone. Go to Additional Options below the typing area and attach it.
505  Using Arduino / Project Guidance / Re: Reversing DC motor with Arduino Leonardo and L298N on: January 16, 2014, 01:24:51 am
Not sure from your description, which is why a diagram is better  smiley-cool, if the Arduino's ground and the 298 's ground are connected?
506  Using Arduino / Project Guidance / Re: Reversing DC motor with Arduino Leonardo and L298N on: January 16, 2014, 12:38:58 am
Best post your complete code then, and a circuit diagram
507  Using Arduino / Project Guidance / Re: Reversing DC motor with Arduino Leonardo and L298N on: January 16, 2014, 12:25:45 am
Test the motor by itself with power directly from your supply- take the Arduino and the 298 out of the equation.

Put the power on one way +/ - then reverse it -/+ and the motor should go both ways....
508  Using Arduino / Programming Questions / Re: hall effect tachometer problem on: January 15, 2014, 10:17:22 am
Well as I said, I didn't think what I said was necessarily germane. But that said, with a pullup- either internal or external- shouldn't one check for the FALLING edge?

EDIT- As suggested here by retrolefty
509  Using Arduino / Project Guidance / Re: 12v Relay Module on: January 15, 2014, 07:45:41 am
12V and GND common for both halves

Then they're not really halves then are they.....
510  Using Arduino / General Electronics / Re: finding what a wall switch does on: January 15, 2014, 07:21:10 am
Some years ago my parents lived in an apartment where when they took the cover plate off a switch, they could see ends of wire from the wall conduit in the screw terminals of the switch. When my Dad undid it further, and pulled the switch out of the enclosure, a short 100mm of wire came out too.

It wasn't connected to anything, yet the contractor had made it look connected and presumably charged for the switch's installation.

So..... pull it out and see if it's really hooked up....

Pages: 1 ... 32 33 [34] 35 36 ... 225