Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Tochigi RubyKaigi 07 LT

Tochigi RubyKaigi 07 LT

seki at druby.org

August 26, 2017
Tweet

More Decks by seki at druby.org

Other Decks in Programming

Transcript

  1. None
  2. slide sponsors ְאַせ〢㾊3VCZ⠓陽ח⿫⸇׃׋ְ㖑⯋孖זךד!JXBEPO E3VCZח״׷ⴓ侔٥8FCفؚٗٓىؚٝ ؔ٦ي爡F#PPL4UPSF  IUUQFTUPSFPINTIBDPKQUJUMFT1!IJTBTIJN 窫额寸皾⚥!BXB[FLJ ࢲͷ3VCZ,BJHJࢀՃඅ༻ͷεϥΠυεϙϯαʔΛืू͍ͯ͠·͢ɻ

  3. chibi:bit ✖ ಄จࣈD seki@ruby-lang.org

  4. micro:bitޓ׵ 傈劤ד⢪ִ׷NJDSPCJU✼䳔堣 Yך-&%ծ⸇鸞䏝إٝ؟٦ծ#5 ـٓؐؠדفؚٗٓىؚٝ〳腉

  5. ͜Μͳ΍ͭʂ R

  6. ಄จࣈD E3VCZ EJTGPS%JTUSJCVUFE דכזְ

  7. Ϛω໊͍ͨ͠৔໘ װ׶׋ְ

  8. ໰୊఺ 宏ָֿר׸׷

  9. ͦ͜Ͱ ֿר׸זְ箺统خ٦ٕ

  10. micro:bitޓ׵ ⸇鸞䏝׾-&%ח邌爙 幾鸞٥偑㔐٥⸇鸞ך崧׸ ֻֻ׿٥ּּ׏٥ּ׻׏

  11. micro:bitޓ׵ ⸇鸞䏝׾-&%ח邌爙 幾鸞ׅ׷ה♳ח

  12. micro:bitޓ׵ ֻֻ׿٥ּּ׏٥ּ׻׏

  13. micro:bitޓ׵ 麊鯄⚥כ鋅׷⡭酔ז׃

  14. micro:bitޓ׵ 鮦鯹׬ֹ 64#ד窌ꨵ ٓؤػ؎״׶饯⹛ָ鸞ְ ꧟חꨵ彁PGGדֹ׷ 鮦鯹ぢֽ

  15. ϒϥ΢βͰ։ൃ ءىُٖ٦ة٦➰ֹ

  16. ϓϩάϥϜ͸͜Ε

  17. JavaScript൛ let py = 0 let px = 0 let

    y = 0 let oz = 0 let x = 0 let oy = 0 let xz = 0 let ox = 0 input.onButtonPressed(Button.B, () => { ox = input.acceleration(Dimension.X) oy = input.acceleration(Dimension.Y) oz = input.acceleration(Dimension.Z) px = 0 py = 0 xz = 0 }) basic.forever(() => { if (xz == 1) { x = input.acceleration(Dimension.X) - ox y = input.acceleration(Dimension.Z) - oz } else { x = input.acceleration(Dimension.X) - ox y = input.acceleration(Dimension.Y) - oy } basic.clearScreen() led.plot(2 + Math.clamp(-2, 2, (px + x) / 256), 2 - Math.clamp(-2, 2, (py + y) / 128)) px = x py = y }) input.onButtonPressed(Button.A, () => { ox = input.acceleration(Dimension.X) oy = input.acceleration(Dimension.Y) oz = input.acceleration(Dimension.Z) px = 0 py = 0 xz = 1 }) xz = 1 oy = input.acceleration(Dimension.Y) ox = input.acceleration(Dimension.X) oz = input.acceleration(Dimension.Z) px = 0 py = 0 input.setAccelerometerRange(AcceleratorRange.TwoG) 侧⦼כ侭侧ך׫
  18. micro:bitޓ׵ 麊鯄⚥ח鋅׷ךכꨇ׃ְ ٔفٖ؎堣腉ק׃ְ 宏ֿר׸׷ 鮦鯹׬ֹ

  19. micro:bitޓ׵ DIJCJCJU꟦鸐⥋ה穈׫さ׻ׇג׫׋ְ

  20. slide sponsors ְאַせ〢㾊3VCZ⠓陽ח⿫⸇׃׋ְ㖑⯋孖זךד!JXBEPO E3VCZח״׷ⴓ侔٥8FCفؚٗٓىؚٝ ؔ٦ي爡F#PPL4UPSF  IUUQFTUPSFPINTIBDPKQUJUMFT1!IJTBTIJN 窫额寸皾⚥!BXB[FLJ ࢲͷ3VCZ,BJHJࢀՃඅ༻ͷεϥΠυεϙϯαʔΛืू͍ͯ͠·͢ɻ