ei tea millisesse alamfoorumisse see teema peaks käima, loodan et väga mööda ei pannud.
asja juurde:
minu kätte sattus selline seade:
peal on kivi nimega AT90USB162 millele installitud CDC (Arduino/AVRDUDE) bootloader
plaanis on teha programmeeritav MACRO klaviatuur, kuid iseseisvalt ei saa asjaga hakkama.
netis on palju õpetusi, kuidas sarnast asja teha TEENSY arendusplaadiga, näiteks see siin:
http://www.ilcicali.com/2012/12/21/teensy-post-nerd-e-scacciafiga/
kuid minu plaadil teine kivi, ja teine layout.
probleem nr1: programm, mis ülaltoodud lehel asub, ei sobi niisama lihtsalt sellele plaadile.. arduino tarkvara annab mitmed errorid selle kohta.
probleem nr2: kuidas ühendada klaviatuur? ehk täpsemalt: programmis on kirjas:
#include < Keypad.h>
int led = 11;
const byte ROWS = 6;
const byte COLS = 8;
char keys[ROWS][COLS] = {
{38, 37, 36, 35, 14, 13, 12, 11},
{28, 27, 26, 25, 24, 23, 22, 21},
{18, 17, 16, 15, 34, 33, 32, 31},
{48, 47, 46, 45, 64, 63, 62, 61},
{58, 57, 56, 55, 54, 53, 52, 51},
{68, 67, 66, 65, 44, 43, 42, 41},
};
byte rowPins[ROWS] = {10, 12, 13, 14, 15, 16}; //connect to the row pinouts of the keypad
byte colPins[COLS] = {1, 2, 3, 4, 5, 6, 7, 8}; //connect to the column pinouts of the keypad
ühesõnaga matrix klaviatuuri read tuleb ühendada kontaktidega: 10, 12, 13, 14, 15 ja 16
ning tulbad 1, 2, 3, 4, 5, 6, 7, 8
plaadi pinout on siin, kuid milliseid kontakte programmis viidatud numbrid tähistavad? kas digitaalseid?
asja eesmärk on teha klaviatuur, kus 1 nupuvajutus trükib terve sõna või lause, avab mõne programmi, või teostab selles mingi toimingu.
kui pasten alumises lingis toodud koodi arduino tarkvarasse, ning vajutan "verify", siis lööb ette järgnevad errorid:
sketch_mar09a:20: error: 'Keypad' does not name a type
sketch_mar09a.ino: In function 'void setup()':
sketch_mar09a:25: error: 'Keyboard' was not declared in this scope
sketch_mar09a.ino: In function 'void loop()':
sketch_mar09a:36: error: 'kpd' was not declared in this scope
sketch_mar09a:42: error: 'Keyboard' was not declared in this scope
sketch_mar09a:42: error: 'KEY_F5' was not declared in this scope
sketch_mar09a:43: error: 'KEY_F6' was not declared in this scope
sketch_mar09a:44: error: 'KEY_F7' was not declared in this scope
sketch_mar09a:45: error: 'KEY_F8' was not declared in this scope
sketch_mar09a:46: error: 'MODIFIERKEY_CTRL' was not declared in this scope
sketch_mar09a:47: error: 'KEY_7' was not declared in this scope
sketch_mar09a:50: error: 'KEY_8' was not declared in this scope
sketch_mar09a:53: error: 'KEY_9' was not declared in this scope
sketch_mar09a:55: error: 'MODIFIERKEY_ALT' was not declared in this scope
sketch_mar09a:56: error: 'KEY_0' was not declared in this scope
sketch_mar09a:58: error: 'KEY_F12' was not declared in this scope
sketch_mar09a:59: error: 'KEY_F11' was not declared in this scope
sketch_mar09a:60: error: 'KEY_F10' was not declared in this scope
sketch_mar09a:61: error: 'KEY_F9' was not declared in this scope
sketch_mar09a:63: error: 'KEY_H' was not declared in this scope
sketch_mar09a:66: error: 'KEY_R' was not declared in this scope
sketch_mar09a:69: error: 'KEY_S' was not declared in this scope
sketch_mar09a:72: error: 'KEY_TAB' was not declared in this scope
sketch_mar09a:73: error: 'KEY_LEFT' was not declared in this scope
sketch_mar09a:77: error: 'KEY_SPACE' was not declared in this scope
sketch_mar09a:82: error: 'KEY_O' was not declared in this scope
sketch_mar09a:85: error: 'KEY_G' was not declared in this scope
sketch_mar09a:88: error: 'KEY_F' was not declared in this scope
sketch_mar09a:91: error: 'KEY_P' was not declared in this scope
sketch_mar09a:94: error: 'KEY_D' was not declared in this scope
sketch_mar09a:97: error: 'KEY_Y' was not declared in this scope
sketch_mar09a:100: error: 'KEY_T' was not declared in this scope
sketch_mar09a:103: error: 'KEYPAD_0' was not declared in this scope
sketch_mar09a:104: error: 'KEYPAD_2' was not declared in this scope
sketch_mar09a:116: error: 'KEY_B' was not declared in this scope
sketch_mar09a:119: error: 'KEY_N' was not declared in this scope
sketch_mar09a:122: error: 'KEY_RIGHT' was not declared in this scope
sketch_mar09a:132: error: 'KEY_M' was not declared in this scope
sketch_mar09a:138: error: 'KEY_L' was not declared in this scope
sketch_mar09a:144: error: 'KEY_K' was not declared in this scope
sketch_mar09a:153: error: 'KEY_ENTER' was not declared in this scope
sketch_mar09a:155: error: 'KEY_UP' was not declared in this scope
sketch_mar09a:158: error: 'KEY_Z' was not declared in this scope
sketch_mar09a:161: error: 'KEY_I' was not declared in this scope
sketch_mar09a:164: error: 'KEY_W' was not declared in this scope
mikrokontrollerid on mulle uus asi, ning programmist saan ka vaid niipalju aru, et töötaval asjal teatud muudatusi teha.
saan aru, et kuigi TEENSY on programmeeritav ARDUINO tarkvaraga, on TEENSY kood siiski erinev sellest mida tunnistab ARDUINO.
kas keegi oskab mind siit edasi aidata?
asja juurde:
minu kätte sattus selline seade:
peal on kivi nimega AT90USB162 millele installitud CDC (Arduino/AVRDUDE) bootloader
plaanis on teha programmeeritav MACRO klaviatuur, kuid iseseisvalt ei saa asjaga hakkama.
netis on palju õpetusi, kuidas sarnast asja teha TEENSY arendusplaadiga, näiteks see siin:
http://www.ilcicali.com/2012/12/21/teensy-post-nerd-e-scacciafiga/
kuid minu plaadil teine kivi, ja teine layout.
probleem nr1: programm, mis ülaltoodud lehel asub, ei sobi niisama lihtsalt sellele plaadile.. arduino tarkvara annab mitmed errorid selle kohta.
probleem nr2: kuidas ühendada klaviatuur? ehk täpsemalt: programmis on kirjas:
#include < Keypad.h>
int led = 11;
const byte ROWS = 6;
const byte COLS = 8;
char keys[ROWS][COLS] = {
{38, 37, 36, 35, 14, 13, 12, 11},
{28, 27, 26, 25, 24, 23, 22, 21},
{18, 17, 16, 15, 34, 33, 32, 31},
{48, 47, 46, 45, 64, 63, 62, 61},
{58, 57, 56, 55, 54, 53, 52, 51},
{68, 67, 66, 65, 44, 43, 42, 41},
};
byte rowPins[ROWS] = {10, 12, 13, 14, 15, 16}; //connect to the row pinouts of the keypad
byte colPins[COLS] = {1, 2, 3, 4, 5, 6, 7, 8}; //connect to the column pinouts of the keypad
ühesõnaga matrix klaviatuuri read tuleb ühendada kontaktidega: 10, 12, 13, 14, 15 ja 16
ning tulbad 1, 2, 3, 4, 5, 6, 7, 8
plaadi pinout on siin, kuid milliseid kontakte programmis viidatud numbrid tähistavad? kas digitaalseid?
asja eesmärk on teha klaviatuur, kus 1 nupuvajutus trükib terve sõna või lause, avab mõne programmi, või teostab selles mingi toimingu.
kui pasten alumises lingis toodud koodi arduino tarkvarasse, ning vajutan "verify", siis lööb ette järgnevad errorid:
sketch_mar09a:20: error: 'Keypad' does not name a type
sketch_mar09a.ino: In function 'void setup()':
sketch_mar09a:25: error: 'Keyboard' was not declared in this scope
sketch_mar09a.ino: In function 'void loop()':
sketch_mar09a:36: error: 'kpd' was not declared in this scope
sketch_mar09a:42: error: 'Keyboard' was not declared in this scope
sketch_mar09a:42: error: 'KEY_F5' was not declared in this scope
sketch_mar09a:43: error: 'KEY_F6' was not declared in this scope
sketch_mar09a:44: error: 'KEY_F7' was not declared in this scope
sketch_mar09a:45: error: 'KEY_F8' was not declared in this scope
sketch_mar09a:46: error: 'MODIFIERKEY_CTRL' was not declared in this scope
sketch_mar09a:47: error: 'KEY_7' was not declared in this scope
sketch_mar09a:50: error: 'KEY_8' was not declared in this scope
sketch_mar09a:53: error: 'KEY_9' was not declared in this scope
sketch_mar09a:55: error: 'MODIFIERKEY_ALT' was not declared in this scope
sketch_mar09a:56: error: 'KEY_0' was not declared in this scope
sketch_mar09a:58: error: 'KEY_F12' was not declared in this scope
sketch_mar09a:59: error: 'KEY_F11' was not declared in this scope
sketch_mar09a:60: error: 'KEY_F10' was not declared in this scope
sketch_mar09a:61: error: 'KEY_F9' was not declared in this scope
sketch_mar09a:63: error: 'KEY_H' was not declared in this scope
sketch_mar09a:66: error: 'KEY_R' was not declared in this scope
sketch_mar09a:69: error: 'KEY_S' was not declared in this scope
sketch_mar09a:72: error: 'KEY_TAB' was not declared in this scope
sketch_mar09a:73: error: 'KEY_LEFT' was not declared in this scope
sketch_mar09a:77: error: 'KEY_SPACE' was not declared in this scope
sketch_mar09a:82: error: 'KEY_O' was not declared in this scope
sketch_mar09a:85: error: 'KEY_G' was not declared in this scope
sketch_mar09a:88: error: 'KEY_F' was not declared in this scope
sketch_mar09a:91: error: 'KEY_P' was not declared in this scope
sketch_mar09a:94: error: 'KEY_D' was not declared in this scope
sketch_mar09a:97: error: 'KEY_Y' was not declared in this scope
sketch_mar09a:100: error: 'KEY_T' was not declared in this scope
sketch_mar09a:103: error: 'KEYPAD_0' was not declared in this scope
sketch_mar09a:104: error: 'KEYPAD_2' was not declared in this scope
sketch_mar09a:116: error: 'KEY_B' was not declared in this scope
sketch_mar09a:119: error: 'KEY_N' was not declared in this scope
sketch_mar09a:122: error: 'KEY_RIGHT' was not declared in this scope
sketch_mar09a:132: error: 'KEY_M' was not declared in this scope
sketch_mar09a:138: error: 'KEY_L' was not declared in this scope
sketch_mar09a:144: error: 'KEY_K' was not declared in this scope
sketch_mar09a:153: error: 'KEY_ENTER' was not declared in this scope
sketch_mar09a:155: error: 'KEY_UP' was not declared in this scope
sketch_mar09a:158: error: 'KEY_Z' was not declared in this scope
sketch_mar09a:161: error: 'KEY_I' was not declared in this scope
sketch_mar09a:164: error: 'KEY_W' was not declared in this scope
mikrokontrollerid on mulle uus asi, ning programmist saan ka vaid niipalju aru, et töötaval asjal teatud muudatusi teha.
saan aru, et kuigi TEENSY on programmeeritav ARDUINO tarkvaraga, on TEENSY kood siiski erinev sellest mida tunnistab ARDUINO.
kas keegi oskab mind siit edasi aidata?
Comment