fun with raspberry pi (and perl)
TRANSCRIPT
![Page 1: Fun with Raspberry PI (and Perl)](https://reader036.vdocuments.us/reader036/viewer/2022062311/58ec885c1a28ab65658b4663/html5/thumbnails/1.jpg)
Fun withRaspberry PI
![Page 2: Fun with Raspberry PI (and Perl)](https://reader036.vdocuments.us/reader036/viewer/2022062311/58ec885c1a28ab65658b4663/html5/thumbnails/2.jpg)
![Page 3: Fun with Raspberry PI (and Perl)](https://reader036.vdocuments.us/reader036/viewer/2022062311/58ec885c1a28ab65658b4663/html5/thumbnails/3.jpg)
![Page 4: Fun with Raspberry PI (and Perl)](https://reader036.vdocuments.us/reader036/viewer/2022062311/58ec885c1a28ab65658b4663/html5/thumbnails/4.jpg)
![Page 5: Fun with Raspberry PI (and Perl)](https://reader036.vdocuments.us/reader036/viewer/2022062311/58ec885c1a28ab65658b4663/html5/thumbnails/5.jpg)
GPIO
![Page 6: Fun with Raspberry PI (and Perl)](https://reader036.vdocuments.us/reader036/viewer/2022062311/58ec885c1a28ab65658b4663/html5/thumbnails/6.jpg)
GPIOGeneral-purpose input/output
![Page 7: Fun with Raspberry PI (and Perl)](https://reader036.vdocuments.us/reader036/viewer/2022062311/58ec885c1a28ab65658b4663/html5/thumbnails/7.jpg)
1/0
![Page 9: Fun with Raspberry PI (and Perl)](https://reader036.vdocuments.us/reader036/viewer/2022062311/58ec885c1a28ab65658b4663/html5/thumbnails/9.jpg)
Linux
![Page 10: Fun with Raspberry PI (and Perl)](https://reader036.vdocuments.us/reader036/viewer/2022062311/58ec885c1a28ab65658b4663/html5/thumbnails/10.jpg)
Perl 5.20+
![Page 11: Fun with Raspberry PI (and Perl)](https://reader036.vdocuments.us/reader036/viewer/2022062311/58ec885c1a28ab65658b4663/html5/thumbnails/11.jpg)
libbcm2835
![Page 12: Fun with Raspberry PI (and Perl)](https://reader036.vdocuments.us/reader036/viewer/2022062311/58ec885c1a28ab65658b4663/html5/thumbnails/12.jpg)
![Page 13: Fun with Raspberry PI (and Perl)](https://reader036.vdocuments.us/reader036/viewer/2022062311/58ec885c1a28ab65658b4663/html5/thumbnails/13.jpg)
Device::BCM2835::gpio_write($gpio, 1);
Device::BCM2835::gpio_write($gpio, 0);
![Page 14: Fun with Raspberry PI (and Perl)](https://reader036.vdocuments.us/reader036/viewer/2022062311/58ec885c1a28ab65658b4663/html5/thumbnails/14.jpg)
Device::BCM2835::gpio_set($gpio);
Device::BCM2835::gpio_clr($gpio);
![Page 15: Fun with Raspberry PI (and Perl)](https://reader036.vdocuments.us/reader036/viewer/2022062311/58ec885c1a28ab65658b4663/html5/thumbnails/15.jpg)
say Device::BCM2835::gpio_lev($gpio);
![Page 16: Fun with Raspberry PI (and Perl)](https://reader036.vdocuments.us/reader036/viewer/2022062311/58ec885c1a28ab65658b4663/html5/thumbnails/16.jpg)
5V vs 3.3V
![Page 17: Fun with Raspberry PI (and Perl)](https://reader036.vdocuments.us/reader036/viewer/2022062311/58ec885c1a28ab65658b4663/html5/thumbnails/17.jpg)
5V vs 3.3V
![Page 18: Fun with Raspberry PI (and Perl)](https://reader036.vdocuments.us/reader036/viewer/2022062311/58ec885c1a28ab65658b4663/html5/thumbnails/18.jpg)
Dimmer
![Page 19: Fun with Raspberry PI (and Perl)](https://reader036.vdocuments.us/reader036/viewer/2022062311/58ec885c1a28ab65658b4663/html5/thumbnails/19.jpg)
![Page 20: Fun with Raspberry PI (and Perl)](https://reader036.vdocuments.us/reader036/viewer/2022062311/58ec885c1a28ab65658b4663/html5/thumbnails/20.jpg)
![Page 21: Fun with Raspberry PI (and Perl)](https://reader036.vdocuments.us/reader036/viewer/2022062311/58ec885c1a28ab65658b4663/html5/thumbnails/21.jpg)
![Page 22: Fun with Raspberry PI (and Perl)](https://reader036.vdocuments.us/reader036/viewer/2022062311/58ec885c1a28ab65658b4663/html5/thumbnails/22.jpg)
Blinks!
![Page 23: Fun with Raspberry PI (and Perl)](https://reader036.vdocuments.us/reader036/viewer/2022062311/58ec885c1a28ab65658b4663/html5/thumbnails/23.jpg)
Is Perl slow?
![Page 24: Fun with Raspberry PI (and Perl)](https://reader036.vdocuments.us/reader036/viewer/2022062311/58ec885c1a28ab65658b4663/html5/thumbnails/24.jpg)
Trying C
![Page 25: Fun with Raspberry PI (and Perl)](https://reader036.vdocuments.us/reader036/viewer/2022062311/58ec885c1a28ab65658b4663/html5/thumbnails/25.jpg)
100x faster
![Page 26: Fun with Raspberry PI (and Perl)](https://reader036.vdocuments.us/reader036/viewer/2022062311/58ec885c1a28ab65658b4663/html5/thumbnails/26.jpg)
Blinks!
![Page 27: Fun with Raspberry PI (and Perl)](https://reader036.vdocuments.us/reader036/viewer/2022062311/58ec885c1a28ab65658b4663/html5/thumbnails/27.jpg)
???
![Page 28: Fun with Raspberry PI (and Perl)](https://reader036.vdocuments.us/reader036/viewer/2022062311/58ec885c1a28ab65658b4663/html5/thumbnails/28.jpg)
![Page 29: Fun with Raspberry PI (and Perl)](https://reader036.vdocuments.us/reader036/viewer/2022062311/58ec885c1a28ab65658b4663/html5/thumbnails/29.jpg)
![Page 30: Fun with Raspberry PI (and Perl)](https://reader036.vdocuments.us/reader036/viewer/2022062311/58ec885c1a28ab65658b4663/html5/thumbnails/30.jpg)
!!!
![Page 31: Fun with Raspberry PI (and Perl)](https://reader036.vdocuments.us/reader036/viewer/2022062311/58ec885c1a28ab65658b4663/html5/thumbnails/31.jpg)
Interrupts!
![Page 32: Fun with Raspberry PI (and Perl)](https://reader036.vdocuments.us/reader036/viewer/2022062311/58ec885c1a28ab65658b4663/html5/thumbnails/32.jpg)
![Page 33: Fun with Raspberry PI (and Perl)](https://reader036.vdocuments.us/reader036/viewer/2022062311/58ec885c1a28ab65658b4663/html5/thumbnails/33.jpg)
![Page 34: Fun with Raspberry PI (and Perl)](https://reader036.vdocuments.us/reader036/viewer/2022062311/58ec885c1a28ab65658b4663/html5/thumbnails/34.jpg)
![Page 35: Fun with Raspberry PI (and Perl)](https://reader036.vdocuments.us/reader036/viewer/2022062311/58ec885c1a28ab65658b4663/html5/thumbnails/35.jpg)
printf("Disabling interrupts\n");
disable_interrupts();
pidelay(3000000);
printf("Enabling interrupts\n");
enable_interrupts();
![Page 36: Fun with Raspberry PI (and Perl)](https://reader036.vdocuments.us/reader036/viewer/2022062311/58ec885c1a28ab65658b4663/html5/thumbnails/36.jpg)
printf("Disabling interrupts\n");
disable_interrupts();
pidelay(3000000);
printf("Enabling interrupts\n");
enable_interrupts();
![Page 37: Fun with Raspberry PI (and Perl)](https://reader036.vdocuments.us/reader036/viewer/2022062311/58ec885c1a28ab65658b4663/html5/thumbnails/37.jpg)
printf("Disabling interrupts\n");
disable_interrupts();
pidelay(3000000);
printf("Enabling interrupts\n");
enable_interrupts();
![Page 38: Fun with Raspberry PI (and Perl)](https://reader036.vdocuments.us/reader036/viewer/2022062311/58ec885c1a28ab65658b4663/html5/thumbnails/38.jpg)
Works!
![Page 39: Fun with Raspberry PI (and Perl)](https://reader036.vdocuments.us/reader036/viewer/2022062311/58ec885c1a28ab65658b4663/html5/thumbnails/39.jpg)
![Page 40: Fun with Raspberry PI (and Perl)](https://reader036.vdocuments.us/reader036/viewer/2022062311/58ec885c1a28ab65658b4663/html5/thumbnails/40.jpg)
![Page 41: Fun with Raspberry PI (and Perl)](https://reader036.vdocuments.us/reader036/viewer/2022062311/58ec885c1a28ab65658b4663/html5/thumbnails/41.jpg)
But no network
![Page 42: Fun with Raspberry PI (and Perl)](https://reader036.vdocuments.us/reader036/viewer/2022062311/58ec885c1a28ab65658b4663/html5/thumbnails/42.jpg)
![Page 43: Fun with Raspberry PI (and Perl)](https://reader036.vdocuments.us/reader036/viewer/2022062311/58ec885c1a28ab65658b4663/html5/thumbnails/43.jpg)
![Page 44: Fun with Raspberry PI (and Perl)](https://reader036.vdocuments.us/reader036/viewer/2022062311/58ec885c1a28ab65658b4663/html5/thumbnails/44.jpg)
LED
![Page 45: Fun with Raspberry PI (and Perl)](https://reader036.vdocuments.us/reader036/viewer/2022062311/58ec885c1a28ab65658b4663/html5/thumbnails/45.jpg)
![Page 46: Fun with Raspberry PI (and Perl)](https://reader036.vdocuments.us/reader036/viewer/2022062311/58ec885c1a28ab65658b4663/html5/thumbnails/46.jpg)
![Page 47: Fun with Raspberry PI (and Perl)](https://reader036.vdocuments.us/reader036/viewer/2022062311/58ec885c1a28ab65658b4663/html5/thumbnails/47.jpg)
![Page 48: Fun with Raspberry PI (and Perl)](https://reader036.vdocuments.us/reader036/viewer/2022062311/58ec885c1a28ab65658b4663/html5/thumbnails/48.jpg)
![Page 49: Fun with Raspberry PI (and Perl)](https://reader036.vdocuments.us/reader036/viewer/2022062311/58ec885c1a28ab65658b4663/html5/thumbnails/49.jpg)
![Page 50: Fun with Raspberry PI (and Perl)](https://reader036.vdocuments.us/reader036/viewer/2022062311/58ec885c1a28ab65658b4663/html5/thumbnails/50.jpg)
Cheap,use many
![Page 51: Fun with Raspberry PI (and Perl)](https://reader036.vdocuments.us/reader036/viewer/2022062311/58ec885c1a28ab65658b4663/html5/thumbnails/51.jpg)
![Page 52: Fun with Raspberry PI (and Perl)](https://reader036.vdocuments.us/reader036/viewer/2022062311/58ec885c1a28ab65658b4663/html5/thumbnails/52.jpg)
![Page 53: Fun with Raspberry PI (and Perl)](https://reader036.vdocuments.us/reader036/viewer/2022062311/58ec885c1a28ab65658b4663/html5/thumbnails/53.jpg)
Linux + Perl,easy to use!
![Page 54: Fun with Raspberry PI (and Perl)](https://reader036.vdocuments.us/reader036/viewer/2022062311/58ec885c1a28ab65658b4663/html5/thumbnails/54.jpg)
![Page 55: Fun with Raspberry PI (and Perl)](https://reader036.vdocuments.us/reader036/viewer/2022062311/58ec885c1a28ab65658b4663/html5/thumbnails/55.jpg)
![Page 56: Fun with Raspberry PI (and Perl)](https://reader036.vdocuments.us/reader036/viewer/2022062311/58ec885c1a28ab65658b4663/html5/thumbnails/56.jpg)
use Perl or die;