Other components

I have made a list of things we need now to make the Arduino mobile and start connecting it to the washing machine.

  • Wall plug 1 – 9-12v dc, 250ma (500ma-1a preferred), 2.1mm plug, centre pin positive. FOR THE ARDUINO
  • Wall plug 2- 12v dc, 750ma upwards with the wires exposed FOR THE MOTOR SHEILD.
  • Possible 12v relays
  • A solder kit
  • possible solenoids
  • A pressurised container for the milk/water
  • Extra wires for connections

Testing

So moving on to the testing of the prototype and everything seems to be working completely fine. The wifi board seems to run without error for an entire day, all the connections are stable and work on press.

One thing I didn’t realise or even think of is the serial com box dosent have to be open for the board to connect to the wifi.

Different speeds of stepper

As the slider idea for controlling the speed of the motor is becoming a challenge I have decided to create different variations of speed for the motor using http request buttons.

To do this i have taken the same theory of adding a end line character for a rotate faster function and the same for a slower function.

The code below shows the fast function:

if (currentLine6.endsWith(“GET /T”)) {
//rotate a specific number of degrees
// rotateDeg(360, 1);
rotate(1650, .8);
delay(1000);
} // end of /T

The prototype

After months of work and playing around with all the different components of Arduino I have finally completed my prototype with 3 LED’S and a Stepper motor all running wirelessly and using http requests to activate them individually.

So my set-up for the motor is exactly the same as in the previous post with pins 2 and 5 being used.

The LED’s have been setup around the new motor board and connected to pins 17,6,9,8, which allows the wireless board to have all the pins it needs open and i can still use pins 14,15,16,18,19.

EasyDriverboard

So today my easy driver motor board was delivered, one thing to note about the chip is that it did not come with it’s own header pins (lucky I had spare). So it needs 17 header pins which all need to be soldiered into place.

The setup of the circuit is pretty easy in comparison, it only requires two pins on the Arduino board  (one pmw pin one normal) so I went for pins 2 and 5~ and it works fine.

So my set up is a little different to others I have seen:

  • Pin 2 to the Dir slot
  • Pin 5 to the STEP slot
  • GRND to GRND
  • 9v battery to the bottom 5v and grd slots
  • the motor goes RGYB – A1A2B1B2
  • Arduido 5v to power in and grd to grd.

Arduino and Twitter 2

I did however manage to get the Arduino to Post a tweet on my twitter feed.  Done by using a post request to the twitter api and as long as you get a twitter token, the tweet is accepted.

 

#include <SPI.h> // needed in Arduino 0019 or later
#include <WiFi.h>
#include <Twitter.h>
char ssid[] = “username”;
char pass[] = “password”;

// Your Token to Tweet (get it from http://arduino-tweet.appspot.com/)
Twitter twitter(“token here”);

// Message to post
char msg[] = “Automatic tweet!”;

void setup()
{
delay(1000);
WiFi.begin(ssid, pass);
// or you can use DHCP for automatic IP address configuration.
// WiFi.begin(mac);
delay(10000);
Serial.begin(9600);

Serial.println(“connecting …”);
if (twitter.post(msg)) {
// Specify &Serial to output received response to Serial.
// If no output is required, you can just omit the argument, e.g.
// int status = twitter.wait();
int status = twitter.wait(&Serial);
if (status == 200) {
Serial.println(“OK.”);
} else {
Serial.print(“failed : code “);
Serial.println(status);
}
} else {
Serial.println(“connection failed.”);
}
}

void loop()
{
}