# Running code on Raspberry Pi

**URL:** <https://discuss.bluerobotics.com/t/running-code-on-raspberry-pi/21656>\
**Category:** BlueOS\
**Tags:** blueos\
**Created:** [September 24, 2025, 3:57pm UTC](https://discuss.bluerobotics.com/t/running-code-on-raspberry-pi/21656 "2025-09-24T15:57:19Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![tony-white](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/tony-white/32/13297_2.png) [@tony-white](https://discuss.bluerobotics.com/u/tony-white)\
**Post date:** [September 24, 2025, 6:41pm UTC](https://discuss.bluerobotics.com/t/running-code-on-raspberry-pi/21656/4 "2025-09-24T18:41:59Z")

</div>

Hi @erkamtb -

Writing a lua script to accomplish your goals may be far faster and easier! There are some relevant threads [here](https://discuss.bluerobotics.com/t/using-joystick-buttons-in-lua-scripts/14727) on the [forum](https://discuss.bluerobotics.com/t/controlling-external-devices-with-lua-scripts-on-ardurover-blueboat-winch/17134), and I’ve been keeping useful scripts [here](https://github.com/vshie/luascript_library_BlueRobotics/tree/main). The official [examples](https://github.com/ArduPilot/ardupilot/tree/master/libraries/AP_Scripting/examples) are also helpful!

Basically this code lives in a specific place, and is run fresh with every autopilot restart. It can read values the autopilot has access too, and log things, control outputs, and react to user control of the vehicle, or take [actions in some scenarios.](https://discuss.bluerobotics.com/t/make-your-blueboat-self-righting-with-a-t500/17456)

---

_[View the full topic](https://discuss.bluerobotics.com/t/running-code-on-raspberry-pi/21656)._
