Raspberry Pi with Java

3,180 views

Published on

Published in: Technology, News & Politics
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
3,180
On SlideShare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
Downloads
87
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Raspberry Pi with Java

  1. 1. Raspberry Pi with Java koji lin@twjug 2013/6/29
  2. 2. About Raspberry Pi ● A credit-card-sized single-board computer developed in the UK by the Raspberry Pi Foundation ● Eben Upton – Co-founder of the Raspberry Pi – Chip architect at Broadcom ● For education purpose – Promoting the teaching of basic computer science in schools
  3. 3. Raspberry PI Model B ● SoC Broadcom BCM2835 ● CPU – ARM 11/700MHZ (ARMv6) ● GPU – Broadcom VideoCore IV, OpenGL ES 2.0, 1080p30 h.264/MPEG- 4 AVC high-profile decoder
  4. 4. Raspberry PI ● Memory – 512MB ● IO – HDMI – 2 x USB – Ethernet – Header pins for GPIO, UART, SPI and I2C ● Power Only 3.5 W
  5. 5. Just $35
  6. 6. Attention ● Power supply is important ● SD card – Class 10 and > 4G ● If you use Linux dd, please double check your command
  7. 7. For ? ● A small computer – A bit slower.. ● Media center – Raspbmc – OpenELEC – Xbian
  8. 8. For ? ● A small computer – A bit slower.. ● Media center – Raspbmc – OpenELEC
  9. 9. For ? ● A small computer – A bit slower.. ● Media center – Raspbmc – OpenELEC ● NAS ● Wireless Access Point ● Programming ● Game
  10. 10. Minecraft Pi Edition
  11. 11. Minecraft Pi Edition
  12. 12. Pi Camera Module
  13. 13. Pi Camera Module
  14. 14. And More
  15. 15. Operating System ● Raspbian(Debian) “wheezy” ● Soft-float Debian “wheezy” – Ex: for Oracle JVM ● Arch Linux ARM ● Pidora ● RISC OS ● FreeBSD ● Android ● Firefox OS
  16. 16. New Out of Box Software
  17. 17. New Out of Box Software ● It's easy ● Copy to SD Card ● Will partition for you ● Give you the choice of OS ● Includes recovery partition
  18. 18. Programming ● Python as the educational language – Python 2.7.3 ● Any language can compile for ARMv6 ● The most interesting part is controlling GPIO
  19. 19. GPIO
  20. 20. Attention ● GPIO IN/OUT is 3.3v – Do not use voltage levels greater than 3.3V – Arduino is 5V ● Do not connect power supply to any other pin ● Be careful of static electricity
  21. 21. Java on PI ● Java SE Embedded – 32~64MB/37~46MB RAM/ROM – Java SE Embedded 7 (Soft float) – Java SE Embedded 8 + JavaFX (Hard float) ● Java ME Embedded – 8MB/5MB RAM/ROM – Java ME Embedded 3.3
  22. 22. Pi4J ● Provide a bridge between the native libraries and Java for full access to the Raspberry Pi
  23. 23. Pi4J Example1
  24. 24. Resistor Calculator ● Download them on Google Play & App Store
  25. 25. Pi4J Example2
  26. 26. Stepper Motor GPIO3 GPIO4 GPIO5 GPIO6 1 OFF ON ON ON 2 ON OFF ON ON 3 ON ON OFF ON 4 ON ON ON OFF
  27. 27. Pi4J Example3
  28. 28. Pulse Width Modulation AlwaysON On/Off 週期

×