# \[ANN\] Introducing BaremetalPi.jl - A package to access Raspberry Pi peripherals without external libraries

**URL:** https://discourse.julialang.org/t/ann-introducing-baremetalpi-jl-a-package-to-access-raspberry-pi-peripherals-without-external-libraries/41417
**Category:** General Usage
**Created:** [June 15, 2020, 12:08am UTC](https://discourse.julialang.org/t/ann-introducing-baremetalpi-jl-a-package-to-access-raspberry-pi-peripherals-without-external-libraries/41417 "2020-06-15T00:08:20Z")
**Posts on this page:** 1
**Showing post:** 29

<div class="post-metadata">

### Author: ![dlakelan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dlakelan/32/8491_2.png) [@dlakelan](https://discourse.julialang.org/u/dlakelan)
#### Post date: [June 17, 2020, 12:11am UTC](https://discourse.julialang.org/t/ann-introducing-baremetalpi-jl-a-package-to-access-raspberry-pi-peripherals-without-external-libraries/41417/29 "2020-06-17T00:11:02Z")

</div>

Based on the results of that discussion over on [the other thread on GC](https://discourse.julialang.org/t/multithreaded-gc/41541), it seems that an interface for software PWM might be to spawn a very simple C thread that reads some julia globals and constantly bit-bangs the appropriate values to the pins, calling nanosleep and doing some timing adjustments based on the OS clock. It should be fine for up to tens of kilohertz I would think. The thread could take real-time scheduling. I think the jitter should be handled well, even on the RPi zero.

---

_[View the full topic](https://discourse.julialang.org/t/ann-introducing-baremetalpi-jl-a-package-to-access-raspberry-pi-peripherals-without-external-libraries/41417)._
