Vzdelanie ešte nikomu neodtrhlo hlavu.


Test dosky EduPic

Skúšobný program na na testovaciu dosku EduPic

 

drive.google.com/file/d/0B5nxoNEwabjQVGd4SUNvd0VQajA/view?usp=sharing

 

; *******************************
; ***** Sample Header File  *****
; *******************************
;    Filename: TestEduPic        
;    Date: 15.12.2015            
;    File Version: 1.0    
;    Written by: Jozef Klus
;    Function: Otestovanie školskej dosky EduPic        
;    Last Revision:
;    Target PICAXE:    
; *******************************
;
;Nastavenie portu B na vystup a portu C na vstup
let dirsB=%00000000
let dirsC=%11111111
 
;Priradenie mien jednotlivých pinov
symbol LED_C0 = C.0
symbol LED_C1 = C.1
symbol LED_C2 = C.2
symbol Reprak = C.3
symbol Melodia1 = pinB.2
symbol Melodia2 = pinB.3
 
'Nastavenie pinov s LED a reproduktor na OFF (false)
low LED_C0
low LED_C1
low LED_C2
low Reprak
 
;Hlavný programový cyklus
main:
 
;Blikanie LED na 1s
pause 1000
high LED_C0
high LED_C1
high LED_C2
 
pause 1000
 
low LED_C0
low LED_C1
low LED_C2
 
;Prehratie stupnice ak je stacene tlacitko Melodia1
if Melodia1 = 1 then
pause 100
tune Reprak, 8, %00000111,($C0,$C2,$C4,$C5,$C7,$C9,$CB,$D0) ;stupnica Cdur
endif
 
;Prehratie melodie ak je stacene tlacitko Melodia2
if Melodia2 = 1 then
pause 10
play Reprak, 1, %00000111
endif
 
goto main