Show Posts
|
|
Pages: [1]
|
|
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?
|
|
|
|
|
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 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?
|
|
|
|
|
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!
|
|
|
|
|
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)
|
|
|
|
|
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: /* @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!
|
|
|
|
|