Been away for a while...I am working on a project for my work to display safety videos on a TV by pressing buttons using a 3x4 keypad to communicate to a Picaxe. I know I can pull this off by using many push buttons and input pins but was hoping to interface via this keypad. The MP4 player is setup to loop a file (000.mp4) until an selection is made. I am using an MP4 player (Sprite) that I have used for my Halloween props which is interfaced with a Picaxe, inputs are triggered using PIRs to trigger a selection via serial data. My question is, can a Picaxe interface with a 3x4 keypad to make a selection within the player? i.e. by pressing "2 buttons" 01, the file 001 would play, by pressing 21, video file 021 would play and so on. The max the player can have up to 200 files but I am only looking at and 30 total. I have attached the very simple code that I use for my props to show how the serial interface works with the Sprite player. The LED in my code is just for reference indicator.
Code:
'this circuit is on perf board
#picaxe 14m2
setfreq m8
symbol baud = T9600_8
symbol pb1 = pinc.3
symbol pb2 = pinc.4
symbol mp4_tx = b.1
symbol mp4_rx = b.2
symbol LED_1 = C.0
main:
if pb1 = 1 then goto vid1
if pb2 = 1 then goto vid2
goto main
vid1:
serout mp4_tx, baud, ($01)
serin mp4_rx, baud, ($EE) ; Wait until ended from the sprite
high LED_1 'LED comes on after the video has stopped
pause 5000
low LED_1
goto main
vid2:
serout mp4_tx, baud, ($02)
serin mp4_rx, baud, ($EE) ; Wait until ended from the sprite
high LED_1 'LED comes on after the video has stopped
pause 10000
low LED_1
goto main