Show Posts
Pages: 1 ... 24 25 [26] 27 28 ... 73
376  Using Arduino / Project Guidance / Re: Set up of Arduino Uno + Adafruit Motor Shield + USB Host Shield + PS3 Controller on: December 19, 2013, 08:22:12 pm
Hi there,

for a project based engineering course I would like to control in total 7 actuators (Servo, Stepper, DC Motor).
How many of each?
Quote
I would like to control this with a PS3-Controller use a LiPo-battery as a power source.

I attached my theoretical Project Set Up.  My biggest concern is to choose the right hardware. My proposal is the following. Maybe you can give me feedback on that:

- Arduino Uno
- Ardafruit Motor Shield http://www.adafruit.com/products/1438
- USB Host Shield for PS3 Controller

My Questions are:

1) Can you recommend an USB Host Shield that works fine with Arduino Uno & the Adafruit Motor Shield?
Go to the Adafruit forum and see the post which lists pins the motor shield uses.
Quote

2) If I want to stack a second Adafruit motor Shield, will it be possible, Are there enough pins?
Nope
Quote


What I basically want to do is simple: I want to use a Controller to steer 7 actuators (Servos, Stepper, DC Motors)

Thank you for your help
Daniel


377  Using Arduino / Project Guidance / Re: Model Railway Layout with Mega 2560R2 on: December 19, 2013, 08:00:57 pm
You haven't stated this, but I presume you want to control the speed and direction of your loco from the Arduino. If you use a motor shield for this you won't need relays to switch direction/track polarity, it can all be done in the programming. I suggest you start with just your Mega and a motor shield to get the loco running on a straight piece of track first and then add the servo controls for the points, leaving the lighting and sounds to last.
378  Using Arduino / Project Guidance / Re: Paranormal Investigation Equipment on: December 16, 2013, 08:34:55 pm
Good Afternoon,

I have just started investigating into the paranormal with my team in the UK.

You do realise that Ghostbusters is fiction, don't you?
379  Using Arduino / Project Guidance / Re: Move only while button is pressed on: December 12, 2013, 08:43:51 pm
Without your code we can't be of much help. I suggest you look at the while function.
380  Using Arduino / Programming Questions / Re: Unable to compile: noob/stepper motor project on: December 10, 2013, 08:47:39 pm
Folks,

I'm getting the following error messages:

-----
sketch_dec10a.ino: In function 'void loop()':
sketch_dec10a:20: error: 'motor' was not declared in this scope
-----

Using the following script:
/*
This code controls a stepper motor with the
EasyDriver board. It spins forwards and backwards
***************************/
int dirpin = 2;
int steppin = 3;

void setup()
{
pinMode(dirpin, OUTPUT);
pinMode(steppin, OUTPUT);
}
void loop()
{

  int i;

  digitalWrite(dirpin, LOW);     // Set the direction. LOW = CW, HIGH = CCW, DELAY = Run Time
  delay(100);
motor.setSpeed(10);       // Set the speed
motor has not been declared in setup().
381  Using Arduino / Programming Questions / Re: A strange Case on: October 29, 2013, 07:19:49 pm
I am trying to iron out some bugs in my code. Its a small menu but what is happening after 10 seconds the LCD displays "top line" and "bottom line". When the "BUTTON" is pressed the LCD displays  "Turn a knob to select an option".

When I turn the encoder and select "Change units" by pressing "BUTTONR" the LCD then prints "select unit", I then press "BUTTONR" again but nothing happens, it just hangs till I reset the board.

If I select "Backlight on off" it hangs without giving the options in the switch cases.
Start by writing a list of all the possible states your program can be in.
Use switch case to move between states if the required conditions are met.
382  Using Arduino / Project Guidance / Re: Switch case and motor control on: October 28, 2013, 08:41:34 pm
Try to avoid using pins 0 & 1 for your motor, as they're used by the serial interface.

Where in your case statements are you telling the motor to turn?

pinMode(motorPin, OUTPUT); is not needed in loop() as you already have it in setup().
383  Using Arduino / Project Guidance / Re: Need Help for Halloween, two inputs and two outputs not working together on: October 25, 2013, 07:22:12 pm
Now I know, there is a problem with delays, but I don't know the work around.
As suggested upthread, look at the 'blink without delay' example for a work-round.
Why are you reading output pins?
384  Using Arduino / Project Guidance / Re: Arduimu v3 on: October 21, 2013, 08:19:53 pm
Sorry, but my crystal ball and my telepathic powers aren't working this week, so I can't see your schematic, I can't see your code, and I have no idea what your problem is. Maybe you'd like to try again?
385  Using Arduino / Project Guidance / Re: how to make my own circuits work without help? on: October 20, 2013, 06:41:31 pm
Hi, I was wondering how I could be able to make things like 7 segmented displays or other parts work with my code and my own circuit designs without going to tutorials? I would like to be able to design my own code and electronics?
It's called 'trial and error'.
After you've destroyed several expensive components, you might reconsider looking at some tutorials.
386  Using Arduino / Project Guidance / Re: Don't let go. How to approach? on: October 18, 2013, 07:52:38 pm
Thanks.
That makes a little more sense now.

First time I learned to code was BBC basic and GOTO was just the easiest way for me to go. smiley
I first learnt Sinclair Basic but soon graduated to Assembler on the Spectrum.
387  Using Arduino / Project Guidance / Re: Don't let go. How to approach? on: October 17, 2013, 07:48:52 pm
**UPDATE**
i persevered and tried it this way. It's not exactly elegant but seems to do what I need it to do

Gotos  (AKA spaghetti code) make your code hard to follow.
You have 4 states:
1)  standby
2) calm
3) panic
4) detonation
Define a variable (say state) and, in setup(), initialise it to 1.
Now your loop() will be:
switch(state){
   case 1: //do all your standby stuff here. If the correct sequence of switches is pressed
      state =2;
      break;
   case 2: //do all your calm stuff here. If the correct sequence of switches is pressed
       state =3;
       break;
   case 3: //etc., etc.
388  Using Arduino / Project Guidance / Re: Flow Control on: October 14, 2013, 07:49:43 pm
Try looking for a 'motorized valve'.
389  Using Arduino / Project Guidance / Re: Possible to have Arduino time-itself & carry out an action? on: October 10, 2013, 08:32:46 pm
See the 'blink without delay' example.
390  Using Arduino / Project Guidance / Re: UnoR3 Timeout Timer on: October 09, 2013, 09:41:16 pm
Look at the 'blink without delay' example.
Pages: 1 ... 24 25 [26] 27 28 ... 73