GPIOZERO-ENV(7)
π GPIOZERO-ENV π
okay bestie, listen up β this is the gpiozero-env page from the gpiozero manual, and it's literally just a lil cheat sheet of the environment variables that the whole GPIO Zero fam reads. β¨
πΈ NAME πΈ
gpiozero-env β GPIO Zero environment vars π
okay so here's the tea: every single utility that GPIO Zero ships with will happily accept the following environment variables. like, all of them. no cap. π
π¦ The Variables Themselves π¦
GPIOZERO_PIN_FACTORYβ this one's the main character, fr fr. it decides which library gets used to talk to the GPIO pins. if you don't set it, the default behaviour is a whole lil audition process: it tries to loadlgpiofirst, thenRPi.GPIO, thenpigpio, and finally it gives up and falls back to a native Python implementation. valid values include"lgpio","rpigpio","pigpio","native", and"mock". and the"mock"one? π iconic. it's most useful on non-Pi platforms because it emulates a Raspberry Pi model 3B (by default). so you can vibe on your laptop and pretend. we love a cosplay king.PIGPIO_ADDRβ the hostname of the Raspberry Pi that the pigpio library should attempt to connect to (this only matters if the pigpio pin factory is being used, just so we're clear π«Ά). defaults tolocalhost. very "i'll just stay home" of it.PIGPIO_PORTβ the port number the pigpio library should attempt to connect to (again, only if the pigpio pin factory is being used). defaults to8888. yes bestie,8888, the luckiest lil port. β¨
π SEE ALSO π
go read these next, they're the friend group:
π AUTHOR π
Ben Nuttall β the author. slay.
π COPYRIGHT π
2015-2024 Ben Nuttall β copyright, periodt.
reminder bestie: these are environment variables, so set them in your shell or your service config before you launch whatever gpiozero tool you're using. that's just how env vars work, no notes π
and that's the whole page!! this was gpiozero version 2.0.1, dated Feb 15, 2024, and honestly? she ate. π mwah, go blink an LED for me. πβ¨π¦
π¦ where this page comes from
- ubuntu noble: python3-gpiozero 2.0.1-0ubuntu1 Β· BSD-3-Clause
- ubuntu questing: python3-gpiozero 2.0.1-0ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms