Artwork

Contenuto fornito da CCC media team. Tutti i contenuti dei podcast, inclusi episodi, grafica e descrizioni dei podcast, vengono caricati e forniti direttamente da CCC media team o dal partner della piattaforma podcast. Se ritieni che qualcuno stia utilizzando la tua opera protetta da copyright senza la tua autorizzazione, puoi seguire la procedura descritta qui https://it.player.fm/legal.
Player FM - App Podcast
Vai offline con l'app Player FM !

Pointless Blinking With Python, asyncio, and libgpiod (and a Raspberry Pi of Course) (glt23)

45:32
 
Condividi
 

Manage episode 412755675 series 1601174
Contenuto fornito da CCC media team. Tutti i contenuti dei podcast, inclusi episodi, grafica e descrizioni dei podcast, vengono caricati e forniti direttamente da CCC media team o dal partner della piattaforma podcast. Se ritieni che qualcuno stia utilizzando la tua opera protetta da copyright senza la tua autorizzazione, puoi seguire la procedura descritta qui https://it.player.fm/legal.
One of my more pointless projects is to blink a configurable set of programmable patterns on a number of LEDs. This might sound like "hey, you are reinventing the wheel". I admit I do - I am a notorious reinventer, and it is fun. * [Livehacking screenplay](https://www.faschingbauer.me/about/site/work-in-progress/blink/screenplay.html) * [Proposal text](https://www.faschingbauer.me/about/site/work-in-progress/blink/glt.html) * [Installation notes](https://www.faschingbauer.me/about/site/work-in-progress/blink/installation.html) Lets reinvent LED blinking in a live-hacking session, and look into a number of topics as we go: * Python is a programming language that most of you know. It is simple and expressive, thus *fun*. * Python's ``asyncio`` is a parallel programming technique, similar to multithreading in its usage, but fundamentally different in every other respect. At its core, it maps multiple parallel control flows onto one *single-threaded* event loop. Given that timers are events, this gives us the possiblity to run multiple LED blinking programs in one single thread - saving all the context switching and scheduling overhead that multithreaded programs usually exhibit. Blinking with less glitches caused by context switch hiccups! * Ah, blinking patterns. Know what Python decorators are? Closures? We'll twist our brains and create a ``@program`` decorator, implemented as a double-closure, and use that to write a number of amazingly simple blinking programs. Almost like functional programming. * Last not least, ``libgpiod``. The way to go for GPIO on Linux. about this event: https://pretalx.linuxtage.at//glt23/talk/LKZYPX/
  continue reading

11465 episodi

Artwork
iconCondividi
 
Manage episode 412755675 series 1601174
Contenuto fornito da CCC media team. Tutti i contenuti dei podcast, inclusi episodi, grafica e descrizioni dei podcast, vengono caricati e forniti direttamente da CCC media team o dal partner della piattaforma podcast. Se ritieni che qualcuno stia utilizzando la tua opera protetta da copyright senza la tua autorizzazione, puoi seguire la procedura descritta qui https://it.player.fm/legal.
One of my more pointless projects is to blink a configurable set of programmable patterns on a number of LEDs. This might sound like "hey, you are reinventing the wheel". I admit I do - I am a notorious reinventer, and it is fun. * [Livehacking screenplay](https://www.faschingbauer.me/about/site/work-in-progress/blink/screenplay.html) * [Proposal text](https://www.faschingbauer.me/about/site/work-in-progress/blink/glt.html) * [Installation notes](https://www.faschingbauer.me/about/site/work-in-progress/blink/installation.html) Lets reinvent LED blinking in a live-hacking session, and look into a number of topics as we go: * Python is a programming language that most of you know. It is simple and expressive, thus *fun*. * Python's ``asyncio`` is a parallel programming technique, similar to multithreading in its usage, but fundamentally different in every other respect. At its core, it maps multiple parallel control flows onto one *single-threaded* event loop. Given that timers are events, this gives us the possiblity to run multiple LED blinking programs in one single thread - saving all the context switching and scheduling overhead that multithreaded programs usually exhibit. Blinking with less glitches caused by context switch hiccups! * Ah, blinking patterns. Know what Python decorators are? Closures? We'll twist our brains and create a ``@program`` decorator, implemented as a double-closure, and use that to write a number of amazingly simple blinking programs. Almost like functional programming. * Last not least, ``libgpiod``. The way to go for GPIO on Linux. about this event: https://pretalx.linuxtage.at//glt23/talk/LKZYPX/
  continue reading

11465 episodi

Tutti gli episodi

×
 
Loading …

Benvenuto su Player FM!

Player FM ricerca sul web podcast di alta qualità che tu possa goderti adesso. È la migliore app di podcast e funziona su Android, iPhone e web. Registrati per sincronizzare le iscrizioni su tutti i tuoi dispositivi.

 

Guida rapida