Show Posts
Pages: [1]
1  Using Arduino / Microcontrollers / Re: Standalone ATMega328P-Pu w/ Bootloader UNO not working!! on: November 19, 2012, 08:43:29 pm
Yhep!
All seems to work just fine when loading the code with the atmega on UNO.

Does Arduino IDE needs specific preferences for this procedure?

BTW...
I saw a few days ago, an hardware "library" called "Atmega328 breadboard" but when I try to configure pin 13 (ledpin) as an output it gives me a library error...
2  Using Arduino / Microcontrollers / Re: Standalone ATMega328P-Pu w/ Bootloader UNO not working!! on: November 19, 2012, 07:21:09 pm
Still the same output from the IDE when uploading, even using the 16MHz crystal.

i followed this tutorial:
http://revoltlab.com/projects/perfduino/
3  Using Arduino / Microcontrollers / Standalone ATMega328P-Pu w/ Bootloader UNO not working!! on: November 19, 2012, 04:36:08 pm
Hey!

I'm trying programming an Atmega328  w/ Uno Bootloader in a breadboard.
I'm using an Arduino UNO to program it

reset - pin1,
RX - pin2,
TX - pin3,
5V - pins 20 & 7,
GND - pins 22 & 8,


I tried the blink() sketch when uploading it gives me an error:

Binary sketch size: 1.084 bytes (of a 32.256 byte maximum)
avrdude: stk500_recv(): programmer is not responding


What's wrong?
4  Using Arduino / Programming Questions / Re: 12 keys keypad, library error when uploading!! on: November 07, 2012, 02:00:02 pm
I've figured it out!!!  smiley smiley smiley smiley-grin

I didn't understand at the beginning what you meant with columns swapped with rows, but now I do.

My keypad it's configured slightly different.

3 6 9 #
2 5 8 0
1 4 7 *

4 x 3 and I was trying 3 x 4.

After re-map everything went just fine!! =)
Thanks a lot!!
5  Using Arduino / Programming Questions / Re: 12 keys keypad, library error when uploading!! on: November 07, 2012, 01:44:34 pm


you might want to do as suggested and use a multimeter to map out the pins (shows how in the tutorial)
i mapped mine out and this was the combination i got although the keypad is. Not all keypads that seem to be the same wiring are the same wiring

123
456
789
C0E
 
Code:
const byte rows = 4; //four rows
const byte cols = 3; //three columns
char keys[rows][cols] = {
  {'1','4','7'},
  {'2','5','8'},
  {'3','6','9'},
  {'C','0','E'}
};

Yhap, but the mapping it's not the problem...
It seems that when I pressed keys 2, 4, 6, 8 and 0 the Arduino just doesn't recognized them.

I'm not sure how the keypad works internally but I think it's based on the Voltage Divider Principle, with voltage drops between the keys that can tell wich of the key is being pressed.
Is it possible that the resistors drop less voltage than the library it's configured for?
6  Using Arduino / Programming Questions / Re: 12 keys keypad, library error when uploading!! on: November 07, 2012, 01:15:24 pm
I discover that I can get the numbers missing by combining two or more keys (one that works, one that's not).
For example:

Output - Key pressed
1 - 1
2 - (2 + 5) or (6 + 3)
3 - 3
4 - (4 + 5) or (0 + *) or (8 + 7)
5 - 5
6 - (6 + 8 ) or (0 + #) or (8 + 9)
7 - 7
8 - (6 + 9)
9 - 9
* - *
0 - (some combination I can't find out...)
# - #


This was the keypad I bought.
http://www.ptrobotics.com/product.php?id_product=426
7  Using Arduino / Programming Questions / Re: 12 keys keypad, library error when uploading!! on: November 07, 2012, 12:56:19 pm
I wired up the keypad again, according to the sparkfun tutorial, but I had to made a few changes in the code for put the keys in the right place.

Buttons 1, 3, 5, 7, 9, * and # are operational, yet the same 2, 4, 6, 8 and 0 not working!

Is it possible the keypad it's damaged?
I bought it yesterday!
8  Using Arduino / Programming Questions / Re: 12 keys keypad, library error when uploading!! on: November 07, 2012, 08:39:32 am
I follow the Adafruit Keypad Tutorial, and they had put resistors from keypad pin 3, 5, 6 and 7 to +5V.

I already take them off but the results remain! smiley-cry
9  Using Arduino / Programming Questions / Re: 12 keys keypad, library error when uploading!! on: November 07, 2012, 07:57:37 am
3 columns x 4 rows...
I re-checked all connections and change the code but the same 5 buttons aren't working.

This this a photo of the keypad.

10  Using Arduino / Programming Questions / Re: 12 keys keypad, library error when uploading!! on: November 06, 2012, 09:06:02 pm
I've already replaced the files and it uploads just fine!

I think rows and columns are well defined, 'cause every other key it's in the right place.
Rather than serial printing the wrong number, it just doesn't print anything...

Yet if I combine 0 + # it prints 6!

The keys that don't work are 2, 4, 6, 8 and 0 (in different columns and rows)
11  Using Arduino / Programming Questions / Re: 12 keys keypad, library error when uploading!! on: November 06, 2012, 08:54:02 pm
After uploading I noticed the keys weren't right so I change the code to match the keypad.
Yet several keys are not working... 2, 4, 6, 8 and 0 are not showing up on serial.write (they only show up when I press a few keys...)

 smiley-confuse
12  Using Arduino / Programming Questions / Re: 12 keys keypad, library error when uploading!! on: November 06, 2012, 08:26:59 pm
Thanks, works great now!  smiley

13  Using Arduino / Programming Questions / Re: 12 keys keypad, library error when uploading!! on: November 06, 2012, 07:48:58 pm
I'm using Mac! (BTW)



/Users/ruicostaesilva/Documents/Arduino/libraries/keypad

If the library wasn't in the right folder, would I be able to open the example sketches from examples menu?
Just asking, because that was what I did!
14  Using Arduino / Programming Questions / 12 keys keypad, library error when uploading!! on: November 06, 2012, 07:42:28 pm
Hey, I'm new to Arduino and I'm trying to use a 12 keys keypad to serial print the key pressed.

I used one of the examples that came in the keypad.zip (library), but it always gives me an error.
I'm using the HelloKeypad.pde example:

Code:
/* @file HelloKeypad.pde
|| @version 1.0
|| @author Alexander Brevig
|| @contact alexanderbrevig@gmail.com
||
|| @description
|| | Demonstrates the simplest use of the matrix Keypad library.
|| #
*/
#include <Keypad.h>

const byte ROWS = 4; //four rows
const byte COLS = 3; //three columns
char keys[ROWS][COLS] = {
  {'1','2','3'},
  {'4','5','6'},
  {'7','8','9'},
  {'*','0','#'}
};
byte rowPins[ROWS] = {5, 4, 3, 2}; //connect to the row pinouts of the keypad
byte colPins[COLS] = {8, 7, 6}; //connect to the column pinouts of the keypad

Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );

void setup(){
  Serial.begin(9600);
}
 
void loop(){
  char key = keypad.getKey();
 
  if (key){
    Serial.println(key);
  }
}

When I click upload or verify it always gives me this error:

HelloKeypad:22: error: 'Keypad' does not name a type
HelloKeypad.cpp: In function 'void loop()':
HelloKeypad:29: error: 'keypad' was not declared in this scope


Any ideas?!

(I'm using an Arduino Mega 2560, if it matters)
Thanks in advance!
Pages: [1]