Part 6: Welcome TI-Innovator – Coffee Cup Speaker

  • Instructions - How you can connect external speaker?
  • Insert the TTL Power MOSFET, Battery etc. as shown in the pic.

    TI-Basic Code
    Send "CONNECT SPEAKER 1 TO BB1"
    Send "SET SPEAKER 1 400 TIME 3"
    Wait 3

    Write the code and test that it is works right.

    Näyttökuva 2017-03-19 kello 19.56.59

  • Exercise - Playing music

    Your work

    Play the Happy Birthday song. Copy-paste notes and then write the code

    notes:={261,0,261,294,261,349,330,0,261,0,261,294,261,392,349,0,261,0,261,523,440,348,349,330,294,0,465,466,440,349,392, 349,0}
    durations:={12,1,12,8,8,8,4,16,1,12,12,8,8,8,4,16,16,16,8,8,16,1,16,16,8,4,16,16,8,8,8,4,4}/42

    You may need

    • For statements
    • Selecting note from the list using notes[i] if i is the index (and durations[i])
    • Counting amount of elements using dim(notes)
  • Solutions

    TI-Basic Code

    Näyttökuva 2017-03-19 kello 21.49.58