Your SlideShare is downloading. ×
0
YAPC2011-Perlでちょいモテ電子工作
YAPC2011-Perlでちょいモテ電子工作
YAPC2011-Perlでちょいモテ電子工作
YAPC2011-Perlでちょいモテ電子工作
YAPC2011-Perlでちょいモテ電子工作
YAPC2011-Perlでちょいモテ電子工作
YAPC2011-Perlでちょいモテ電子工作
YAPC2011-Perlでちょいモテ電子工作
YAPC2011-Perlでちょいモテ電子工作
YAPC2011-Perlでちょいモテ電子工作
YAPC2011-Perlでちょいモテ電子工作
YAPC2011-Perlでちょいモテ電子工作
YAPC2011-Perlでちょいモテ電子工作
YAPC2011-Perlでちょいモテ電子工作
YAPC2011-Perlでちょいモテ電子工作
YAPC2011-Perlでちょいモテ電子工作
YAPC2011-Perlでちょいモテ電子工作
YAPC2011-Perlでちょいモテ電子工作
YAPC2011-Perlでちょいモテ電子工作
YAPC2011-Perlでちょいモテ電子工作
YAPC2011-Perlでちょいモテ電子工作
YAPC2011-Perlでちょいモテ電子工作
YAPC2011-Perlでちょいモテ電子工作
YAPC2011-Perlでちょいモテ電子工作
YAPC2011-Perlでちょいモテ電子工作
YAPC2011-Perlでちょいモテ電子工作
YAPC2011-Perlでちょいモテ電子工作
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

YAPC2011-Perlでちょいモテ電子工作

2,187

Published on

Slides for YAPC::Asia2011 by mandy_44

Slides for YAPC::Asia2011 by mandy_44

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
2,187
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. YAPC::ASIA Tokyo ● 2011<br />Pretty Electronic Engineering in Perl <br />Yuki Manno (@mandy_44)<br />2011/10/14<br />
  • 2. ※ モテるかモテないかは自己責任でお願いします<br />
  • 3. Myself<br />
  • 4. Yuki Manno(@mandy_44)<br />1986/06/10<br />Aeronautics &amp; Astronautics<br />DeNA Co., Ltd.<br />
  • 5. Arduino<br />
  • 6. DIY (Do It Yourself)<br />Open Source Hardware<br />Micro Computer<br />+<br />IO Port<br />
  • 7. Arduino MEGA ADK<br />Arduino Bluetooth<br />ArduinoLilyPad<br />
  • 8. Digital In/Out<br />USB Port<br />AC In<br />Analog In<br />Power<br />
  • 9. Tools<br />
  • 10. Breadboard<br />Jump Wire<br />LED, LCD etc<br />
  • 11. Input<br />Output<br /><ul><li>USB
  • 12. Bluetooth
  • 13. Ethernet
  • 14. Various Sensors</li></ul>etc.<br /><ul><li>LED
  • 15. LCD
  • 16. Servo</li></ul>etc.<br />
  • 17. Hello World!!<br />
  • 18. Arduino IDE<br />C based language<br />Upload sketch to Arduino<br />http://www.arduino.cc/<br />
  • 19. Blink LED<br />voidsetup() { <br />pinMode(13, OUTPUT); <br />}<br />void loop() {<br />digitalWrite(13, HIGH); // set the LED on<br /> delay(1000); // wait for a second<br />digitalWrite(13, LOW); // set the LED off<br /> delay(1000); // wait for a second<br />}<br />
  • 20. <ul><li>PinMode
  • 21. OUTPUT
  • 22. INPUT
  • 23. Functions
  • 24. digitalWrite(pin_num, [HIGH|LOW])
  • 25. digitalRead(pin_num)
  • 26. analogWrite(pin_num, [0-255])
  • 27. analogRead(pin_num)</li></ul>http://arduino.cc/en/Reference/HomePage<br />
  • 28. Firmata<br />
  • 29. Firmata a generic protocol for communicating with microcontrollers like the Arduino from software on a host computer.<br />Host – Client Model<br />http://www.arduino.cc/playground/Interfacing/Firmata<br />
  • 30. Normal Arduino<br />Arduino<br />LED<br />LCD<br />Sensor<br />Sketch<br />Servo<br />Sensor<br />Anything<br />LED<br />Arduino<br />Host<br />Firmata<br />LCD<br />Firmata<br />Servo<br />
  • 31. Processing<br />JAVA based language<br />Arduino Libraries<br />
  • 32. Perl<br />
  • 33. Device::Firmata<br /><ul><li>Module to use Firmata
  • 34. https://github.com/amimoto/perl-firmata</li></ul>use Device::Firmata;<br />use Device::Firmata::Constants qw( :all );<br />my $led_pin=13;<br />my $arduino= Device::Firmata-&gt;open(‘/dev/ttyusb’);<br />$arduino-&gt;pin_mode($led_pin=&gt; PIN_OUTPUT);<br />while (1) {<br />$arduino-&gt;digital_write($led_pin =&gt; HIGH);<br />sleep(1);<br />$arduino-&gt;digital_write($led_pin =&gt; LOW);<br />sleep(1);<br />}<br />
  • 35. Demo<br />
  • 36. Alalarm<br /><ul><li>Beep on mail arrival
  • 37. Hard to stop
  • 38. Get me up in midnight
  • 39. Using Amon2</li></li></ul><li>Please mail to…<br />mandy.alert@gmail.com<br />
  • 40. Checker<br /><ul><li>Check unread mail
  • 41. Check flag
  • 42. Turn on beep</li></ul>WEB App<br /><ul><li>Make question
  • 43. Change flag</li></ul>+<br /><ul><li>Not simple
  • 44. Made Amon2 Plugin for Arduino-&gt; Can’t make persistent connection.
  • 45. Need improvement of Firmata</li></li></ul><li>Thank you so much for your attention.<br />
  • 46. Any Question?<br />

×