Teedoubleudee
Member
Following on from my (hopefully) successful build of the mp3 player, I want to choose a track (from 16 available) to play by responding to a logical input across 4 input pins ie 0-F Hex. My idea is to use one of these to select the inputs then a separate input (push button) as a "trigger" to read the other 4 inputs and re-act accordingly via something like a CASE instruction. I can work out most of this myself except how to transpose the 4 inputs from a hex to a decimal output that I can use in the CASE code. I'm thinking it's going to be a logical string of 'ands' and 'nots' eg if p1 = 1 and p2 = 0 and p3 = 1 and p4 = 0 then "variable dec" = 10.
I hope that makes sense. If it helps to understand my request: I am building a model railway with a station. The station will have a speaker that makes various announcements such as "The train now standing at platform........." etc.
I hope that makes sense. If it helps to understand my request: I am building a model railway with a station. The station will have a speaker that makes various announcements such as "The train now standing at platform........." etc.