Loading...
  Show Posts
Pages: 1 ... 3 4 [5] 6 7 ... 23
61  Using Arduino / General Electronics / Re: Buy a new soldering iron or repair my old Weller WTCPs ? on: May 02, 2013, 04:46:31 pm
Your link doesn't work, i don't know how to link to that amazon page.

I've never heard of the fixpoint brand, and the pics show an iron that is much like a lot of real cheap ones i've seen.
No doubt it's in a complete different league compared to any Weller product.

That said, you could very well be using this iron happily (ever after...) without any problem, who's to say.
It wouldn't be my choice if i needed it on a daily basis.
62  Using Arduino / LEDs and Multiplexing / Re: advice needed on: May 02, 2013, 03:36:03 pm
Hi JoranDavidson.

This is very basic stuff.
Go get the blink sketch and play around with that.
Also get yourself a breadboard and a set of jumperwires.
This is the stuff that is in a starterkit.
That has answered your questions already.

Arduino is about learning and fun (or the other way around).
Because of that, you'll have to figure out some stuff yourself and i'm out on a limb already by answering your question.
One final advice: Don't keep staring at your end goal.
Take it step by step, divide your "problem" in smaller problems to solve.
Blink is free.
Double blink is for you to figure out.
Once you've done that ten is easy and will be fun too.

Next assignment: make them fade instead of flash smiley-wink.
63  Topics / Robotics / Re: Controlling robot arm KSR10 on: May 02, 2013, 03:21:48 pm
You're almost good to test.
I've just loaded your Fritzing! sketch and the short in the above post is not shown in Fritzing! so never mind that.
There's no other strange connections either so that looks good to me.
But i do see another problem.
In your sketch, the 2nd L293D doesn't have a connection to VCC1 drawn.
So the upper middle motor won't run if that is indeed the case.

Succes with your robot arm.
64  Using Arduino / General Electronics / Re: How to connect this rotary encoder on: May 02, 2013, 02:52:47 pm
Those LEDs are paired, right ?

Then probably one LED lights up the disk.
A dark section will do poor reflection, a light section will do good reflection.
That reflection will then be picked up by the other "diode".
You'll need one wire for the LEDs and one wire per receiving "diode" for your Arduino to see which one is seeing the light at a moment.
And of course you need the common (maybe ground, but might as well be a VDD ("plus") wire).

In this case, both of your schematics would be incorrect.
65  General Category / General Discussion / Re: Question about posting a project photo to arduino forum on: May 02, 2013, 02:37:27 pm
There are 2 ways of doing that.
First one is to indeed upload your picture to the site.
You can do that by clicking the text Additional Options at the left below the edit box.
Now you'll see a box where you can fill in a loctaion where your photo (or whatever file) is.
You can also click the "Browse" button next to it.
After clicking "Browse" a box will open where you can browse your pc for the picture/file.
Now you can finish your text, and after posting it (will take a bit more time as the file will be uploaded).
Your picture will be added below your post as a thumbnail.
Forum members who click on that thumbnail will see teh full size picture.

You can also upload your picture to an image hosting site.
But all i've seen of those require you to register.
Once uploaded, you can link to those pictures.
The hosting site will probably help you by offering the corect link plus codetags.
If not, you can find the location of your pictures, and put them in [img]http://tags.
This would look like this: [img]http:/www.somepic.org/hgkogehrkekgiah423.jpg[/img].

You don't need to put the codetags in yourself.
You can just click the button above the text edit box (i just did that to paste the link to that same button picture.
The cursor will be at the correct position to type or paste your link to the picture.

Edit:
CrossRoads beat me to it, but i think i had all possibilities covered.
Hmm, i see some unexpected behavior in the forum software, nevermind that.
66  Using Arduino / Displays / Re: Please help with making display stable. on: April 30, 2013, 04:55:01 pm
I don't know why your display just flashes.
You told that you have to use "spidisplay.begin(SSD1306_SWITCHCAPVCC);" and " spidisplay.clearDisplay();" every time you write to your screen to get any result at all.
I've been told that the clearDisplay command is slow because it writes spaces one by one.
I've had a lot of trouble to get my 128*64 OLED screen with the SSD1306 (in I2C mode) to work, but never saw the screen erased for no reason.
Data stays as long as i don't overwrite it.

You have divided your sketch in different sections, but the way you did that doesn't make a lot of sense to me.
In void.getTemp, you are not only fetching the temperature, but are also processing it.
I would get the temperature and eventually convert it, but the processing would be done in void.loop
In void.loop, you are declaring currentMillis and currentMillis1 over and over again.
You could declare them in void.setup, and just renew them in void.loop, but i don't know if that will be any improvement for your sketch.

Also i see you made void.keypadEvent, but i don't see you call it.
As i've never played with keypads yet, i can't tell how well you did with that.
67  Topics / Robotics / Re: Controlling robot arm KSR10 on: April 30, 2013, 04:03:47 pm
I see a dot in the green line.
I attached a highlight of what i mean.
That means 2 wires are connected at that point.
If you do that on a breadboard, Fritzing! will connect the wire to the breadboard as well and make an invisible connection to the pin under your wire.
That pin happens to be in the GND rail of your breadboard.
If you're going to use the other modes (so not breadboard mode) of Fritzing!, then you'll see a connection of the green wires to the GND rails.
This is of course not what you want.
But if you're just going to use the sketch as a guide for your jumperwires, you're good.
Also if you already connected all and made your sketch afterwards, it will be good and you'll be ready to test.
Don't forget to connect the capacitors.
68  Topics / Robotics / Re: Controlling robot arm KSR10 on: April 30, 2013, 02:42:40 pm
Took a quick peek.
Looks a lot better this way.
Thanks to the colors and less crossings i can see what's going on.
It seems that you did have the capacitors correct, but the small black lines connected both pins.
Now they are connected to the motor with one pin, and with nothing for the other pin.
Place the capacitors at the same spot the were before and all is good there.
You accidentially connected all green wires of the upper motors with GND because you extended them exactly where the GND wires run on your breadboard.

Consider wiring all enable lines to an output that is PWM capable.
The datasheet isn't clear about it, but probably you can control motorspeed this way if you decide to try that.

I haven't checked with Fritzing! yet,  just took a peek at the picture.
69  Using Arduino / Displays / Re: Please help with making display stable. on: April 30, 2013, 04:02:49 am
This code is total different from the first we saw.
Now you're using a keypad approach to get the key, but you chose to have 1 column of 7 rows.
Easier to wire and to handle perhaps.
But you are using 7 or 8 pins now (depends on the way you wired it up).
You could have chosen 3 rows and 3 columns to have 7 to 9 keys to press and save a pin.

You're writing to the display in void.getTemp.
I guess the name should have been void.handleTemp.
Point is to get your value in void.getTemp, and handle it in your void.loop, if you're writing a longer sketch this will help you to keep track of what's going on.
But all this is not really a problem, the code will still work.

You should know why the display blinks as that has been explained.

70  Using Arduino / Displays / Re: LCD just blinks on: April 29, 2013, 06:11:07 pm
Did you check "lcd.backlight();" is correct ?
71  Topics / Robotics / Re: Controlling robot arm KSR10 on: April 29, 2013, 04:58:48 pm
There are some errors in your sketch.
For instance the capacitors do nothing as they are connected to ground with both pins.
This sketch is too complex to check just by looking at it.
One reason is that you used just 1 wirecolor for the connections between Arduino and breadboard.
Do you see the thin wires in the sketch ?
I beleive those are connections you made but that are not wired.
Some of those are incorrect.

If you want the sketch to be checked, attach the Fritzing skecth to a possting so anyone that wants to help can load it in Fritzing and use the programs functions (like highlighting a selected connection) to check.
72  Using Arduino / Displays / Re: Clear LCD but only once a loop on: April 29, 2013, 10:52:37 am
This is an AND, not an OR situation.
If you see a pressed button, AND  you haven't processed it before, process it now.
As you are ending that processing with the accolade } twice ,the ELSE belongs to the first IF statement, not to the second one.
You can easily keep track of that by using the indents, with which the IDE helps you by automaticly using those.
IDE also helps you with the () parentheses and {} accolades by showing you which pair belong together.
73  Using Arduino / Displays / Re: Clear LCD but only once a loop on: April 29, 2013, 10:24:23 am
No, it is inside the loop.
Declare the new variable in void.setup.
And before you write anyhting to the display, check if it's not already there.
This would result in something like this:

Code:
/*
A set of custom made large numbers for a 16x2 LCD using the
LiquidCrystal librabry. Works with displays compatible with the
Hitachi HD44780 driver.

The Cuicuit:
  LCD RS pin to D12
  LCD Enable pin to D11
  LCD D4 pin to D5
  LCD D5 pin to D4
  LCD D6 pin to D3
  LCD D7 pin to D2
  LCD Vee tied to a pot to control brightness
  LCD Vss and R/W tied to ground
  LCD Vcc to +5V
  LCD pin 15 tied to pushbutton for control of backlight
 
Made by Michael Pilcher
2/9/2010
*/

// include the library
#include <LiquidCrystal.h>
const int buttonPin = 7;
int buttonState = 0;
int oldState = 0;                                  //<- new line
// initialize the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

// the 8 arrays that form each segment of the custom numbers
byte LT[8] =
{
  B00111,
  B01111,
  B11111,
  B11111,
  B11111,
  B11111,
  B11111,
  B11111
};
byte UB[8] =
{
  B11111,
  B11111,
  B11111,
  B00000,
  B00000,
  B00000,
  B00000,
  B00000
};
byte RT[8] =
{
  B11100,
  B11110,
  B11111,
  B11111,
  B11111,
  B11111,
  B11111,
  B11111
};
byte LL[8] =
{
  B11111,
  B11111,
  B11111,
  B11111,
  B11111,
  B11111,
  B01111,
  B00111
};
byte LB[8] =
{
  B00000,
  B00000,
  B00000,
  B00000,
  B00000,
  B11111,
  B11111,
  B11111
};
byte LR[8] =
{
  B11111,
  B11111,
  B11111,
  B11111,
  B11111,
  B11111,
  B11110,
  B11100
};
byte UMB[8] =
{
  B11111,
  B11111,
  B11111,
  B00000,
  B00000,
  B00000,
  B11111,
  B11111
};
byte LMB[8] =
{
  B11111,
  B00000,
  B00000,
  B00000,
  B00000,
  B11111,
  B11111,
  B11111
};

// loop counter
int x = 0;

 
void setup()
{
  // assignes each segment a write number
  lcd.createChar(0,LT);
  lcd.createChar(1,UB);
  lcd.createChar(2,RT);
  lcd.createChar(3,LL);
  lcd.createChar(4,LB);
  lcd.createChar(5,LR);
  lcd.createChar(6,UMB);
  lcd.createChar(7,LMB);
 
 pinMode(buttonPin, INPUT);
 
  // sets the LCD's rows and colums:
  lcd.begin(16, 2);
       
}

void custom0()
{ // uses segments to build the number 0
  lcd.setCursor(x, 0); // set cursor to column 0, line 0 (first row)
  lcd.write((byte)0);  // call each segment to create
  lcd.write(1);  // top half of the number
  lcd.write(2);
  lcd.setCursor(x, 1); // set cursor to colum 0, line 1 (second row)
  lcd.write(3);  // call each segment to create
  lcd.write(4);  // bottom half of the number
  lcd.write(5);
}

void custom1()
{
  lcd.setCursor(x,0);
  lcd.write(1);
  lcd.write(2);
  lcd.setCursor(x+1,1);
  lcd.write(5);
}

void custom2()
{
  lcd.setCursor(x,0);
  lcd.write(6);
  lcd.write(6);
  lcd.write(2);
  lcd.setCursor(x, 1);
  lcd.write(3);
  lcd.write(7);
  lcd.write(7);
}

void custom3()
{
  lcd.setCursor(x,0);
  lcd.write(6);
  lcd.write(6);
  lcd.write(2);
  lcd.setCursor(x, 1);
  lcd.write(7);
  lcd.write(7);
  lcd.write(5);
}

void custom4()
{
  lcd.setCursor(x,0);
  lcd.write(3);
  lcd.write(4);
  lcd.write(2);
  lcd.setCursor(x+2, 1);
  lcd.write(5);
}

void custom5()
{
  lcd.setCursor(x,0);
  lcd.write((byte)0);
  lcd.write(6);
  lcd.write(6);
  lcd.setCursor(x, 1);
  lcd.write(7);
  lcd.write(7);
  lcd.write(5);
}

void custom6()
{
  lcd.setCursor(x,0);
  lcd.write((byte)0);
  lcd.write(6);
  lcd.write(6);
  lcd.setCursor(x, 1);
  lcd.write(3);
  lcd.write(7);
  lcd.write(5);
}

void custom7()
{
  lcd.setCursor(x,0);
  lcd.write(1);
  lcd.write(1);
  lcd.write(2);
  lcd.setCursor(x+1, 1);
  lcd.write((byte)0);
}

void custom8()
{
  lcd.setCursor(x,0);
  lcd.write((byte)0);
  lcd.write(6);
  lcd.write(2);
  lcd.setCursor(x, 1);
  lcd.write(3);
  lcd.write(7);
  lcd.write(5);
}

void custom9()
{
  lcd.setCursor(x,0);
  lcd.write((byte)0);
  lcd.write(6);
  lcd.write(2);
  lcd.setCursor(x+2, 1);
  lcd.write(5);
}

 void loop(){
   
  buttonState = digitalRead(buttonPin);
  if (buttonState==HIGH){
    if (buttonState!=oldState){             //<-
    oldState=buttonState;                   //   New or
    lcd.clear();                            //   altered lines
    custom1();}                             //<-
     
     }
  else {
    if (buttonState!=oldState){             //<-
    oldState=buttonState;                   //   New or
    lcd.clear();                            //   altered lines
    custom0();}                             //<-
      }
}


74  Using Arduino / Displays / Re: Please help with making display stable. on: April 29, 2013, 08:47:51 am
Did you try what happens if you comment out the display part in your powerOff section ?
So skipping the erasing of your screen.
If that helps, try using other values than 0 and 1 for powerOn and powerOff.
75  Using Arduino / Displays / Re: Clear LCD but only once a loop on: April 29, 2013, 07:01:45 am
Not that hard.
Remember to always keep track of where you are.
So create an extra variable.
Call it oldState or something you like better.
Compare buttonState with oldState.
If they are the same, do nothing.
If they aren't the same, clear the LCD and update oldState.

That's all.
Pages: 1 ... 3 4 [5] 6 7 ... 23