Show Posts
Pages: 1 [2] 3
16  Using Arduino / General Electronics / w5100 ethernet shield & Arduino Duemilanove 2009 not used pins on: January 02, 2012, 05:00:34 pm
Hello all,

I can not seem to find a post that will give me what pins are free to be used when i use a w5100 ethernet shield & Arduino Duemilanove 2009 shield together

any one have a spreadsheet or a direction to point me.



17  Using Arduino / Programming Questions / Re: invalid suffix "D" on integer constant on: December 06, 2011, 04:37:02 am
I would think it is something to to with this line...

Code:
byte mac[] = { 1A-2B-3C-4D-5E-6F };

The reference page for the ethernet begin() call shows this...

Code:
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
 

   Thank you, as well al know the problem can be looking you right in the face sometimes. that you for your assistance.
18  Using Arduino / Programming Questions / invalid suffix "D" on integer constant on: December 05, 2011, 06:34:07 am
Hello All , have this problem, sw compiles then at the end shows this error ?

Any Had this before ?

This was written for ver 0022 , just upgrade client to ethernet client same with server.

tried running this in ver 0022 still same "D" Problem ?

Help still learning.

Code:
Quote
#include <SPI.h>
#include <Ethernet.h>
 

byte mac[] = { 1A-2B-3C-4D-5E-6F };
byte ip[] = { 10 ,1 ,1 ,9 };
byte gateway[] = { 198 ,168 ,1 ,1 };
byte subnet[] = { 255 ,255 ,255 ,0 };
EthernetServer server(80);

String readString = String(30);
 

void setup(){
Ethernet.begin(mac, ip, gateway, subnet);
delay(1000);
pinMode(5, OUTPUT);
digitalWrite(5, LOW);
Serial.begin(9600);


void loop(){
EthernetClient client = server.available();
if (client) {
while (client.connected()) {
if (client.available()) {
char c = client.read();
if (readString.length() < 30)
{
readString = readString + c;
}
if (c == '\n') {
Serial.print(readString);
client.println("HTTP/1.1 200 OK");
client.println("Content-Type: text/html");
client.println();


if(readString.startsWith("GET /?out=5&status=1"))
{Serial.print("\n 5 HIGH LOW \n");
digitalWrite(5, HIGH);
delay(100);
digitalWrite(5, LOW);
client.print("{\"status\" : \"1\" , \"out\" : \"");
client.print(5);
client.print("\"}");
}


if(readString.startsWith("GET /?out=all"))
{
Serial.print("\n OUT ALL\n");
client.print("{\"ip\" : \"10.1.1.9\", ");
client.print("\"devices\" : ");
client.print("[{ \"type\" : \"door\", \"name\" : \"OPENING ROOF\", \"out\" : \"");
client.print("5");
client.print("\"}");
client.print("]}");
}
readString="";
client.stop();
}
}
}
}
}



19  Using Arduino / Programming Questions / Re: using TABS in IDE on: September 07, 2011, 06:41:58 am
thanks for the info, now i understand, thanks again
20  Using Arduino / Programming Questions / Re: using TABS in IDE on: September 07, 2011, 06:16:26 am
Ok then if  for example i have a basic sketch, on main tab that when i press a button moves a motor.

Then could i make the sketch for my next step in the program that counts how long the motor ran for in another tab.  so i could break the whole sketch into peices ?

21  Using Arduino / Project Guidance / Re: Linear Stepper motor slider mechanism or ?? on: September 06, 2011, 03:38:29 am
Hello Jim, I sell linear actuators as part of my job , that speed you require is very fast, and you will have a hard time finding anything , you would have to go to a big linear actuator. even then they have a 10% duty cycle, this means you can run it for 10 minutes and then needs a 1 minute rest to cool down.
22  Using Arduino / Programming Questions / using TABS in IDE on: September 06, 2011, 03:16:03 am
Sorry all, but still learning,

Has any one have an example sketch that show how to use tabs to make programming easy ?

The arduino Reference is a bit confusing, so if any one has a basic sketch that shows this it would be great or a link to one.

THX for any suguestions.
23  Using Arduino / Programming Questions / Re: disable a button input unitll another pressed on: August 23, 2011, 07:45:12 am
1) using eeprom, i have not used before, it is the start of my calibration program, which the plan is to
 .
a) mover motor in reverse till no pulse detected.
b) reset couneter
c) move forward till no pulses detected.
d) store max pulses in memory.
e) then return to start position (where counter was reset)

 i will add a pot so if pot was at 50% the motor would only move 50%.
24  Using Arduino / Programming Questions / disable a button input unitll another pressed on: August 23, 2011, 06:00:59 am
Hello every one, any suguestions, smiley

As you may see by my sketch, this has three buttons, foward, stop reverse, when press forward run till count is reached then stops, same when press reverse, one question if moves forward and stops when count reached , how can i prevent from moving forward again, and  the only direction allowed to move is reverse.


#include <Button.h>
#include <EEPROM.h>                  // 23/8/11


Button in = Button(4,PULLUP);        // keeps pin 4 high waitng for low to trip
Button halt = Button(5,PULLUP);      // keeps pin 5 high waiting for low o trip
Button out = Button(6,PULLUP);       // keeps pin 6 high waiting for low to trip

int pulsePin = 3;                  // hall effetc input pin 3
unsigned long counter = 0; 
unsigned long duration = 0; 
unsigned long timeout = 1000000; // in microseconds
unsigned long howfar = 400;       // how far to travel till stops motor
int value;

 

 void setup(){
EEPROM.write(1,howfar);    // 23/8/11 write value of howfar to eeprom loaction 1

value = EEPROM.read(1);   // read eeprom address 1 and call it value


   
pinMode (13,OUTPUT);                                                //  new 17/08/11  use led on pcb to warn that calibration about to start
pinMode(11,OUTPUT);                                                // changes direction of motor
pinMode(10,OUTPUT);                                                // turns main relay power on
pinMode(pulsePin, INPUT);       
digitalWrite(pulsePin, HIGH);                                       // enable the 20K pull-up resistor to steer the input pin to a HIGH reading.
Serial.begin(9600);                                                // open serial port
}

void loop(){

if(in.isPressed()){digitalWrite(10,HIGH);                          //   forward switch
digitalWrite(11,LOW) ;} 

if(halt.isPressed()){digitalWrite(10,LOW);}                          // stop switch

if(out.isPressed()){digitalWrite(10,HIGH);                         // reverse switch
digitalWrite(11,HIGH);}
                                             
                                               // calabration start here, eg move motor back till end stop reached, reset counter 2 , move motor till other end
                                                // stop reached, memorise total count, return motor back to start position,
                                               
duration = pulseIn(pulsePin, HIGH, timeout);
if (duration == 0) {   

Serial.println(""); 
} else {   

counter++;
Serial.print(counter);                                                         // so i can monitor count pulses etc in serial monitor
Serial.println("");


if (digitalRead(11) == HIGH  && (counter>=value)){                            // if count reached, checks where relays are
digitalWrite(11,LOW);                                                         // reverse polarty for 10ms then turns pwr relay off.
delay(10);                                                                   // need this to stop 1 pulse ove count to prevet run on
digitalWrite(10,LOW);
}
else 
{
if(digitalRead(11) == LOW  && (counter>=value)){                            // if count reached checks relays for polarity and switches
digitalWrite(11,HIGH);                                                       // them in reverse for 10ms, then turns pwr relay off.
delay(10);                                                                  // need this to stop over run from count that stops on
digitalWrite(10,LOW);};

if(counter>=value){                           //reset counter when distance reached
counter = 0;                                           

}}} }



 
25  Using Arduino / Project Guidance / Re: TABS on: July 20, 2011, 04:09:32 am
would this work ?if  i had a switch control sketch that work great, i would make a tab and call it switch.h , than add Include switch.h into main sketch, would this work?

i would like to keep the main sketch clean.
26  Using Arduino / Project Guidance / TABS on: July 20, 2011, 03:31:49 am
i am new, can any one point me in the right direction.

Can you place a different sketch into a different TABs,so they will compile together?

What do you do about the 2 VOID SETUP in both sketches.
27  Using Arduino / Project Guidance / Re: "YOUR BOAT IS SINKING" SMS FROM IPHONE CONTROLLED BY ARDUINO on: June 22, 2011, 06:41:39 am
look at this

http://techome.com.au/process/shop/productView.html?itemId=11128
28  Using Arduino / Project Guidance / Re: watching pin state change and if stops change turns motor off on: June 19, 2011, 04:31:58 am
thanks fast reply.

my pulse is 6 pulses per mm of travel ( an linerar actuator), about 9 mm travel  per sec
29  Topics / Home Automation and Networked Objects / Re: Iphone control program over network: someone interested? on: June 19, 2011, 04:28:44 am
hello, it good to have great idear that keep the brain ticking over, good on you.

I have had a few people ask how they can  open  or close  windows or blinds, turn on/off lights, turn of a heater or air conditioner etc,

But i am not a apple person.
30  Using Arduino / Motors, Mechanics, and Power / Re: Linear Actuator Control on: June 19, 2011, 04:07:30 am
i have 6 pulses per mm of travel.

using internal limits switches for safety

current limit very easy just using a voltage divider on a analogue input.
Pages: 1 [2] 3