Show Posts
Pages: [1] 2 3 ... 78
1  Topics / Home Automation and Networked Objects / Re: Sending push notifications from an Arduino on: June 29, 2013, 11:30:54 am
How to on android?
Do the same, just use pushover...
2  Topics / Home Automation and Networked Objects / Re: Control Ethernet Shield with PHP? on: May 20, 2013, 06:23:08 am
I guess what you want is to not have direct access from outside (the internet) to the inside (your local network)?

To send a command through php you use curl to call the arduino instead, and the visitors on the page then calls that php page. Same way I do it for my home automation system.
3  Using Arduino / LEDs and Multiplexing / Re: Multiplexing and driver circuit common cathode eight digit 12" 7segment arduino on: May 05, 2013, 10:47:28 am
How much of it have you already made?
4  Using Arduino / Programming Questions / Re: Using AccelStepper library on: March 25, 2013, 02:17:34 pm
In your first code, you set a position, go to it, set a position, go to it, etc.

In your second code, you set a position, and head towards it. Once you get there, you never set a new position or move again. Shouldn't you? There are methods to see if you are at the commanded position, so you can tell when to define a new position.
The first code is only like that because I got it to work, at first the new position was in setup to just make it move once, when that worked I stepped it up to move to a new position over and over.

With the second code I am still at the stage where I just want it to move to one position before going to the next.
5  Using Arduino / Programming Questions / Using AccelStepper library on: March 25, 2013, 01:45:58 pm
I am trying to get this to work: http://www.airspayce.com/mikem/arduino/AccelStepper/

This version of it is moving to the position, setting a new position, moving to that position... and so on. This is what I expect it would do.
Code:
#define pinDir      2 //Pin for setting rotation direction
#define pinStep     4 //Pin for doing the steps

#include <AccelStepper.h>

AccelStepper ARM(1, pinStep, pinDir);

void setup()

  ARM.setMaxSpeed(5000);
  ARM.setAcceleration(65000);
}

void loop()

  ARM.moveTo(random(0,3000));
  ARM.runToPosition(); 
}


But as far as I can see in the code it is possible to use just .run() in the loop to make it non-blocking while the stepper is getting to its position.
The code for non-blocking would I expect would look like this, but it does not work as expected, instead it just makes a few steps and never gaining speed.
Code:
#define pinDir      2 //Pin for setting rotation direction
#define pinStep     4 //Pin for doing the steps

#include <AccelStepper.h>

AccelStepper ARM(1, pinStep, pinDir);

void setup()

  ARM.setMaxSpeed(5000);
  ARM.setAcceleration(65000);
  ARM.moveTo(random(0,3000));
}

void loop()
{
  ARM.run();
}
Am I trying to do something which is not possible? Not sure what I am doing wrong here.
6  Using Arduino / Project Guidance / Re: Best arduino, stepper motor, motor driver, ethernet shield to use on: August 26, 2012, 07:10:58 am
***In stepper motors(bi-polar and unipolar) when it comes to torque and accuracy what best motor to use or ur best choice.. Btw i prefer bipolar here..
Will need torque and speed needed to be able to answer.

***In the motor driver for the stepper motor what is the best to us that doesn't heat up fast.. ur best choice..
Will know what motor would be needed before being able to suggest a driver for it.
7  Using Arduino / Project Guidance / Re: controlling 13 stepper motors with one arduino mega on: August 26, 2012, 04:19:45 am
Would be using less pins if you went for something like this http://www.pololu.com/catalog/product/1182 and at the same time it would also be easier to control, since you only need a direction and step pin. If you want to control when the stepper should be enabled or not, it will take an additional pin, but it can be wires to be always enabled.

If the steppers only should run the same direction, you can go down to just the step pin, so only one wire will be needed for each motor.
8  Using Arduino / Project Guidance / Re: Snail-Mail box notifier on: August 25, 2012, 04:21:43 pm
Thank you, will try to contact them to see if I can get some from them...

I will still need an arduino for the receiver because it needs to be connected to my network, and call pushingbox if some other criteria are meet too.
9  Using Arduino / Project Guidance / Re: Snail-Mail box notifier on: August 25, 2012, 04:04:18 pm
Those SIM20 transceivers sounds interesting, but where can you get them? My electronics pushers seems to not have any of them, and google also failing to find me some that would actually show me any prices before buying...

The trigger in the mailbox will just be some simple micro switches with a long arm attached to them. The mail will then slide down of a little metal slide, run over the switches, then fall down to the bottom of the mailbox.
10  Using Arduino / Project Guidance / Snail-Mail box notifier on: August 25, 2012, 03:29:07 pm
I am working on a new version of my snailmail notifier.

Old version:


But the problem with the sensor I hacked into, is that it got very low range. Description says up to 50 meters, but if it reaches 25 meters without anything in between, it is a good day...

So instead I am now looking into what I can do instead. I have looked a bit at using xbee's to do the wireless communication needed between the mailbox and receiver, but the price of them is a bit higher than I would like to spend on that. What could I use instead? I have looked at some NRF24L01 modules too, but they are on 2.4 ghz so I am afraid they will mess up my wifi too, as the 2.4 ghz wireless cameras do...

I have done some experiments with the simple 433 mhz rf modules too, but they also seem to be limited a lot when put into the mailbox (made from 1.5mm steel).

Another problem I also got is how to power it. I have thought about some rechargeable batteries, and then an arduino going to sleep to save power, and then some switches mounted where the letters fall through to wake it up again. But not sure how long that still would last, and what batteries would be good for something like this.

From mailbox to receiver there is 25-30 meters in a straight line.

Anyone got some ideas?
11  Community / Exhibition / Gallery / Re: Tinkerdays 2012 | prototyping a wall plotter on: July 26, 2012, 04:09:51 am
The limits would really be the step size and the amount of weight of the "print head" plus suspension line.  Both can be made much more easy to take care of by using a gear reduction system.  The rest is just software...
You can also use another stepper driver.

Most use these on their 3D printers, http://www.pololu.com/catalog/product/1182 at 1/16th stepping the resolution is pretty good.
12  Community / Bar Sport / Re: Lead Free Solder - I hate you EU guys... on: July 12, 2012, 01:37:40 pm
Lead-free-solder, from the guys who brought you these rules too  smiley-cool
And that article is full of errors... Or, maybe not errors, but things left out.

The thing with "Waters does not hydrate you." is not something they actually said, they just didn't want company's who bottled the water to claim that their water was more hydrating than normal water, and that is what some had done, even when it was absolutely normal water in the bottles.

And "Diabetics are banned from driving" no they are not, they are if they got 2 dangerous attacks from it within a year, then yes. And why is that so bad? Or is it better when they can end up driving like in those youtube video's with people getting ill while driving, changing onto oncoming traffic, or are close to hitting pedestrians? There are many stupid rules made, but some of them are also made worse than they actually are, just because some need something to complain about. If someone get ill while driving and kills someone, people complain too, but that also cost a life.

SO - in Europe, if you get shot by a shotgun, will you die from steel poisoning?

If you were shot by a lead bullet, if it were not in a vital area you would still not die from lead poisoning. Elemental lead, in and of itself, is fairly benign, it is the various compounds of lead that make it dangerous. Paint used to contain various oxides of lead. Lead dust oxidizes and forms other compounds much more readily that does solid chunks, because of surface area.

I am not saying that lead is by any means harmless, but , as with many things in life, we can become so alarmed by the "possible" harm that we overlook the many more hazardous things we deal with in everyday life. Like Gasoline...
I am pretty sure that you are exposed to being shot way less than you are to being exposed to it other places... And we don't have gasoline with lead in either, that got removed many years ago.
13  Community / Exhibition / Gallery / Re: Cat food dispenser on: June 09, 2012, 05:00:16 pm
Could you post the components -electrical circuit when you get time . I see it is very recent but I could find nothing on the Utube site about that either. Thanks

I'll add this link to a chicken feeder that might be enhanced by the same process
http://chickenfeeder.blogspot.com/
It is pretty simple, but can try to see if I can get a diagram made over it.

Also a nice chicken feeder, let me know if you need something to put over that hole on the outside, I can print you a thing a bit like the one I got on mine where it falls out.
14  Community / Exhibition / Gallery / Cat food dispenser on: June 09, 2012, 12:15:12 pm
Finally finished my cat food dispenser.

It is controlled by an arduino ethernet, and can be started from my website.

Around the bottom of the bowl collecting the food, there is a printed white ring with 8 blue led's under. The led's are controlled by a 74HC595N shift register and makes a wipe animation while food is dispensed, and will circle around 30 seconds after the motors has stopped. After the 30 seconds all led's will be turned off.




See more pictures and video here: http://www.flickr.com/photos/blddk/sets/72157630020837757/

Code:
/*
  Motor stuff
*/

#define motorPin 2
unsigned long timeStart = 0;
unsigned long timeRun = 0;
unsigned long timeRunLast = 0;
/*
  Ethernet stuff
*/
#include <SPI.h>
#include <Ethernet.h>

// Enter a MAC address and IP address for your controller below.
// The IP address will be dependent on your local network:
byte mac[] = {
  0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
IPAddress ip(192, 168, 0, 177);

// Initialize the Ethernet server library
// with the IP address and port you want to use
// (port 80 is default for HTTP):
EthernetServer server(80);

boolean currentLineIsBlank;

/*
  Ring light stuff
*/
#define ringUpdateRate 100

int dataPin = 7;
int latchPin = 6;
int clockPin = 5;

int  ringMode = 0; //0 = idle, 1 = running, 2 = wipe
byte ringStep = 0;

byte running[8] = {
  B00000001,
  B00000010,
  B00000100,
  B00001000,
  B00010000,
  B00100000,
  B01000000,
  B10000000
};

byte wipe[8] = {
  B10000001,
  B11000011,
  B11100111,
  B11111111,
  B01111110,
  B00111100,
  B00011000,
  B00000000
};

void setup()
{
  pinMode(motorPin, OUTPUT);
  digitalWrite(motorPin, HIGH);
  
  pinMode(dataPin, OUTPUT);
  pinMode(latchPin, OUTPUT);
  pinMode(clockPin, OUTPUT);
  
  // start the Ethernet connection and the server:
  Ethernet.begin(mac, ip);
  server.begin();
}

void loop()
{
  if (timeRun > 0)
  {
    if (millis()-timeStart >= timeRun)
    {
      digitalWrite(motorPin, HIGH);
      timeRun = 0;
      ringMode = 0;
    }
    else
    {
      digitalWrite(motorPin, LOW);
      ringMode = 2;
    }
  }
  else
  {  
    if (timeStart != 0 && (millis()-timeStart) < (timeRunLast+30000))
    {
      ringMode = 1;
    }
    else
    {
      ringMode = 0;
    }
  }
  
  updateRing();
  
  // listen for incoming clients
  EthernetClient client = server.available();
  String inString = String(35); //Used to hold the string from the ethernet shield

  while (client.connected()) //We got a client online
  {
    if (client.available())
    {
      char c = client.read();        
      inString += c;

      if (c == '\n' && currentLineIsBlank)
      {
        // send a standard http response header
        client.println("HTTP/1.1 200 OK");
        client.println("Content-Type: text/html");
        client.println();

        break;
      }

      if (c == '\n')
      {
        // you're starting a new line
        currentLineIsBlank = true;
      }
      else if (c != '\r')
      {
        // you've gotten a character on the current line
        currentLineIsBlank = false;
      }
    }
  }
  // give the web browser time to receive the data
  delay(1);

  int startCommand = inString.indexOf('_'); // Find the start of the command to send
  int stopCommand = inString.indexOf('_', startCommand + 1); // Find the stop of the command to send

  if (startCommand > 0 && stopCommand > 0) // If we got a valid command...
  {    
    client.print("Running for "); // Show on the reply what message we send, just for debugging
    client.println(inString.substring(startCommand+1, stopCommand)); // Cut away the stuff that are not a part of the command
    client.println(" milliseconds");
    
    timeRun = string2int(inString.substring(startCommand+1, stopCommand));
    timeRunLast = timeRun;
    timeStart = millis();
  }
  // close the connection:
  client.stop();

  inString = "";
}

int string2int(String func)
{
  char* output;

  String temp = String(35);

  String getPinDel = func;
  char tempNum[10];
  tempNum[getPinDel.length() + 1]; // Temp save pin value
  getPinDel.toCharArray(tempNum, 10);

  return atoi(tempNum);
}


unsigned long lastRingUpdate = 0;
void updateRing()
{
  if (millis()-lastRingUpdate < ringUpdateRate) return;
  if (ringMode == 1)
  {
    if (ringStep == sizeof(running)) ringStep = 0;

    digitalWrite(latchPin, LOW);                           //Pull latch LOW to start sending data
    shiftOut(dataPin, clockPin, MSBFIRST, running[ringStep]);  //Send the data
    digitalWrite(latchPin, HIGH);                          //Pull latch HIGH to stop sending data
  }
  else if (ringMode == 2)
  {
    if (ringStep == sizeof(wipe)) ringStep = 0;

    digitalWrite(latchPin, LOW);                           //Pull latch LOW to start sending data
    shiftOut(dataPin, clockPin, MSBFIRST, wipe[ringStep]);  //Send the data
    digitalWrite(latchPin, HIGH);                          //Pull latch HIGH to stop sending data
  }
  else
  {
    digitalWrite(latchPin, LOW);                           //Pull latch LOW to start sending data
    shiftOut(dataPin, clockPin, MSBFIRST, B00000000);  //Send the data
    digitalWrite(latchPin, HIGH);                          //Pull latch HIGH to stop sending data
    ringStep = 0;
  }

  lastRingUpdate = millis();
  ringStep++;
}
15  Using Arduino / LEDs and Multiplexing / Re: Shift register led patterns on: June 09, 2012, 06:21:04 am
you just make an array with the patterns as bits

byte seq = {B00011000,B00100100,B01000010}
And I actually ended up using this way instead, fits my application a bit better smiley
Pages: [1] 2 3 ... 78