This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| et:projects:myndisortija [2011/05/23 09:16] – raivo.sell | et:projects:myndisortija [2020/07/20 09:00] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Euromüntide sorteerija ====== | ====== Euromüntide sorteerija ====== | ||
| - | Tallinna Tehnikaülikool korraldab üldharidus ja kutsekoolidele intelligentse seadme konkursi, milleks on EUROmüntide sorteerija. Tegemist on kodukasutajale mõeldud seadmega, mis võimaldab sorteerida ja arvutada kokku seadmesse sisestatud EURO müntide summa. Seadme võtmetunnusteks on tema soodne hind, efektne väljanägemine ja töökindlus. | + | Tallinna Tehnikaülikool korraldab üldharidus ja kutsekoolidele intelligentse seadme konkursi, milleks on sel korral |
| Konkursile on registreerunud: | Konkursile on registreerunud: | ||
| Line 67: | Line 67: | ||
| | | ||
| - | Võistkond demonstreerib oma lahendust | + | Võistkond demonstreerib oma lahendust 10-15 min jooksul. |
| ==== Tulemused ==== | ==== Tulemused ==== | ||
| + | |||
| + | Võitjaks osutus järjekordselt Kuressaare Gümnaasium I meeskond. | ||
| ==== Galerii ==== | ==== Galerii ==== | ||
| - | ==== Videod ==== | + | * [[https://picasaweb.google.com/ollearak/IntelligentseSeadmeKonkurss2011? |
| - | + | * [[https://picasaweb.google.com/raivosell/MehhatroonikaKonkurss2011#|Fotod: Raivo Sell]] | |
| - | === Töötuba näidiskood === | + | |
| - | + | ||
| - | {{:et: | + | |
| - | + | ||
| - | <code c> | + | |
| - | // | + | |
| - | + | ||
| - | // Roboti näidisprogramm | + | |
| - | + | ||
| - | // | + | |
| - | + | ||
| - | #include < | + | |
| - | #include <homelab/pin.h> | + | |
| - | #include <util/delay.h> | + | |
| - | #include < | + | |
| - | #include <homelab/module/lcd_gfx.h> | + | |
| - | #include < | + | |
| - | + | ||
| - | + | ||
| - | // | + | |
| - | // Ultraheli anduri ja multiplekseri viigud | + | |
| - | + | ||
| - | // | + | |
| - | + | ||
| - | pin multiplekser = PIN(G,0); | + | |
| - | + | ||
| - | pin pin_trigger = PIN(F, 0); | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | // Nuppude viigud | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | pin buttons[3] = { PIN(C, 2), PIN(C, 1), PIN(C, 0) }; | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | // | + | |
| - | + | ||
| - | // Põhiprogramm | + | |
| - | + | ||
| - | // | + | |
| - | + | ||
| - | int main(void) | + | |
| - | + | ||
| - | { | + | |
| - | + | ||
| - | unsigned short distance; | + | |
| - | + | ||
| - | char text[16]; | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | // Multiplekseri seadistamine | + | |
| - | + | ||
| - | pin_setup_output(multiplekser); | + | |
| - | + | ||
| - | pin_set(multiplekser); | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | // Nuppude seadistamine sisendiks | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | for (int i = 0; i < 3; i++) pin_setup_input(buttons[i]); | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | // Mootorite seadistamine | + | |
| - | + | ||
| - | dcmotor_init(0); | + | |
| - | + | ||
| - | dcmotor_init(1); | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | // Servo seadistamine | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | servomotor_init(0); | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | // LCD ekraani algseadistamine | + | |
| - | + | ||
| - | lcd_gfx_init(); | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | // Ekraani puhastamine | + | |
| - | + | ||
| - | lcd_gfx_clear(); | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | // Taustavalgustuse tööle lülitamine | + | |
| - | + | ||
| - | lcd_gfx_backlight(true); | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | // Programmi nime kuvamine | + | |
| - | + | ||
| - | lcd_gfx_goto_char_xy(1, | + | |
| - | + | ||
| - | lcd_gfx_write_string(" | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | // Väike paus | + | |
| - | + | ||
| - | _delay_ms(100); | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | // Lõputu tsükkel | + | |
| - | + | ||
| - | while (true) | + | |
| - | + | ||
| - | { | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | // Algoritm tuleb siia! | + | |
| - | + | ||
| - | + | ||
| - | } | + | ==== Meedia ==== |
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| - | } | ||
| - | </ | ||
| ==== Kontakt ==== | ==== Kontakt ==== | ||