Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Fun with Raspberry PI (and Perl)

1,099 views

Published on

Short stories about playing with Raspberry Pi for couple of years

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Fun with Raspberry PI (and Perl)

  1. 1. Fun with Raspberry PI
  2. 2. GPIO
  3. 3. GPIO General-purpose input/output
  4. 4. 1/0
  5. 5. saveamsterdam.com
  6. 6. Linux
  7. 7. Perl 5.20+
  8. 8. libbcm2835
  9. 9. Device::BCM2835::gpio_write($gpio, 1); Device::BCM2835::gpio_write($gpio, 0);
  10. 10. Device::BCM2835::gpio_set($gpio); Device::BCM2835::gpio_clr($gpio);
  11. 11. say Device::BCM2835::gpio_lev($gpio);
  12. 12. 5V vs 3.3V
  13. 13. 5V vs 3.3V
  14. 14. Dimmer
  15. 15. Blinks!
  16. 16. Is Perl slow?
  17. 17. Trying C
  18. 18. 100x faster
  19. 19. Blinks!
  20. 20. ???
  21. 21. !!!
  22. 22. Interrupts!
  23. 23. printf("Disabling interruptsn"); disable_interrupts(); pidelay(3000000); printf("Enabling interruptsn"); enable_interrupts();
  24. 24. printf("Disabling interruptsn"); disable_interrupts(); pidelay(3000000); printf("Enabling interruptsn"); enable_interrupts();
  25. 25. printf("Disabling interruptsn"); disable_interrupts(); pidelay(3000000); printf("Enabling interruptsn"); enable_interrupts();
  26. 26. Works!
  27. 27. But no network
  28. 28. LED
  29. 29. Cheap, use many
  30. 30. Linux + Perl, easy to use!
  31. 31. use Perl or die;

×