Baby Grand Piano

Thymio is transformed into a baby grand piano! Piano has custom sounds sung by Courtney, do, ri, me, fa, so , la, ti, do! This project was inspired by the Musical Thymio project, with Courtney’s own unique twist included.

Download Courtney’s original sound files here.

Code:

onevent prox

  if acc[1]>0 then
    if prox.horizontal[0]>4000 then
      call sound.play(101)
      call leds.top(32, 32, 32)
    end
    if prox.horizontal[1]>4000 then
      call sound.play(102)
      call leds.top(32, 0, 0)
    end
    if prox.horizontal[2]>4000 then
      call sound.play(103)
      call leds.top(0, 32, 0)
    end
    if prox.horizontal[3]>4000 then
      call sound.play(104)
      call leds.top(0, 0, 32)
    end
    if prox.horizontal[4]>4000 then
      call sound.play(105)
      call leds.top(0, 0, 32)
    end
    if prox.horizontal[0] >4000 and prox.horizontal[1] >4000 then
      call sound.play(106)
      call leds.top(15, 15, 32)
    end
     if prox.horizontal[1] >4000 and prox.horizontal[2] >4000 then
      call sound.play(107)
      call leds.top(32, 15, 15)
    end
     if prox.horizontal[2] >4000 and prox.horizontal[3] >4000 then
       call sound.play(108)
       call leds.top(7, 15, 7)
    end
  end

Tags: , , , , ,

Video